/* Your existing styles - unchanged */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --accent-primary: #ff3333;
    --accent-hover: #ff6666;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
}

/* Additional styles for the retention options */
.retention-options {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.retention-options h3 {
    color: var(--accent-primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.radio-option {
    display: inline-block;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-label {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-label {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.radio-option:hover .radio-label {
    border-color: var(--accent-primary);
}

.retention-note {
    color: var(--text-secondary);
    font-size: 0.9em;
    font-style: italic;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

h1 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.upload-area {
    width: 100%;
    min-height: 200px;
    border: 3px solid var(--accent-primary);
    border-radius: 12px;
    position: relative;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
}

.upload-area:hover, .upload-area.drag-over {
    border-style: dashed;
    background-color: rgba(255, 51, 51, 0.1);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.5);
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-message {
    font-size: 1.5em;
    color: var(--accent-primary);
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

.upload-submessage {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 8px;
    text-align: center;
    width: 100%;
}

#progressContainer {
    width: 80%;
    height: 8px;
    background-color: var(--bg-primary);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
    display: none;
}

#progressBar {
    width: 0%;
    height: 100%;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-top: 8px;
    text-align: center;
    width: 100%;
    display: none;
}

.additional-notes {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.additional-notes h3 {
    color: var(--accent-primary);
    margin-top: 0;
    font-size: 1.2em;
}

.additional-notes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.additional-notes li {
    color: var(--text-secondary);
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.additional-notes li::before {
    content: "•";
    color: var(--accent-primary);
    position: absolute;
    left: 0;
}

.error-message {
    color: var(--accent-primary);
    margin-top: 10px;
    text-align: center;
}

/* FilePond Custom Styles */
.filepond--root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Main panel background */
.filepond--panel-root {
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
}

/* Drop label text */
.filepond--drop-label {
    color: var(--text-primary);
}

.filepond--drop-label label {
    color: var(--text-secondary);
    font-size: 1.3em;
}

/* Label action (browse button text) */
.filepond--label-action {
    color: var(--accent-primary);
    text-decoration-color: var(--accent-primary);
}

.filepond--label-action:hover {
    color: var(--accent-hover);
}

/* File item background */
.filepond--item-panel {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
}

/* File info text */
.filepond--file-info-main {
    color: var(--text-primary);
}
.filepond--file-info .filepond--file-info-main {
    font-size: 1.0em;
    line-height: 1.4;
}


.filepond--file-info-sub {
    color: var(--text-secondary);
    opacity: 1 !important;
}

/* File status text */
.filepond--file-status-main {
    color: var(--accent-primary);
}

.filepond--file-status-sub {
    color: var(--text-secondary);
    opacity: 1 !important;

}

/* Progress indicator */
.filepond--progress-indicator {
    color: white;
    width: 1.7em !important;
    height: 1.7em !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}
.filepond--progress-indicator[data-align*='right'] {
    top: 1.3em !important;
    right: 1.13em !important; /* Adjusted to center 1.8em indicator over 2em button */
}
.filepond--file .filepond--progress-indicator {
    margin-top: 0.0em;
}

/* Progress indicator path (the actual loading circle) */
.filepond--progress-indicator path {
    stroke: white;
}

/* Action buttons */
.filepond--file-action-button {
    background-color: rgba(255, 51, 51, 0.8);
    color: white;
    width: 2em !important;
    height: 2em !important;
    align-self: center;
}
.filepond--file-action-button:hover {
    background-color: var(--accent-primary);
    box-shadow: 0 0 0 0.125em rgba(255, 51, 51, 0.5);
}
/* todo Adjust position for larger buttons */
.filepond--action-abort-item-load,
.filepond--action-retry-item-load,
.filepond--action-process-item,
.filepond--action-abort-item-processing,
.filepond--action-retry-item-processing,
.filepond--action-revert-item-processing,
.filepond--processing-complete-indicator,
.filepond--process-indicator
{
    right: 1em !important;
}
.filepond--action-remove-item,
.filepond--load-indicator
{
    left: 1em !important;
}

/* Align action buttons vertically with file row text */
.filepond--file-wrapper {
    min-height: 70px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.filepond--file {
    padding-left: 1.2em;
    padding-right: 1.2em;
    display: flex;
    align-items: center;
}
.filepond--file-info {
    flex-wrap: wrap; /* Allow file name to wrap */
}

/* Drip animation color */
.filepond--drip-blob {
    background-color: var(--accent-primary);
}

/* Override success state - no green! */
.filepond--item-panel[data-filepond-item-state="processing-complete"] {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
}

.filepond--item-panel[data-filepond-item-state*="processing-complete"] {
    background-color: var(--bg-primary);
}

[data-filepond-item-state*='invalid'] .filepond--item-panel,
[data-filepond-item-state*='error'] .filepond--item-panel {
    background-color: var(--bg-primary) !important;
    border-color: var(--accent-primary) !important;
}

.filepond--item {
    min-height: 70px; /* Minimum height */
    height: auto !important; /* Allow expansion */
}

/* Success status text should be white/gray, not green */
.filepond--item[data-filepond-item-state="processing-complete"] .filepond--file-status-main {
    color: var(--text-primary);
}

.filepond--item[data-filepond-item-state="processing-complete"] .filepond--file-status-sub {
    color: var(--text-secondary);
}

/* Remove green background from completed items */
.filepond--item[data-filepond-item-state="processing-complete"] .filepond--item-panel {
    background-color: var(--bg-primary) !important;
}

.curl-command-box {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.curl-command-box h3 {
    color: var(--accent-primary);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.command-display {
    background-color: var(--bg-primary);
    padding: 15px;
    border-radius: 6px;
    font-family: monospace;
    color: var(--text-primary);
    word-break: break-all;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-box {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    border: 3px solid var(--border-color);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.auth-box input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
}

.auth-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-2px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(4px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-8px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(8px, 0, 0);
    }
}

.hidden {
    display: none;
}

.url-display {
    margin-top: 15px;
    background-color: var(--bg-primary);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: none;
}

.url-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    font-size: 1em;
}

.file-display {
    flex: 0 0 30%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px;
    color: var(--text-primary);
}

.link-container {
    flex: 1;
    display: flex;
    gap: 10px;
}

.url-link {
    flex: 1;
    padding: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    font-size: inherit;
}

.url-link:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

.copy-button {
    padding: 8px 15px;
    background-color: var(--accent-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.copy-button:hover {
    background-color: var(--accent-hover);
}

@media (max-width: 600px) {
    .url-container {
        flex-direction: column;
    }

    .file-display {
        width: 100%;
        flex: auto;
    }

    .link-container {
        width: 100%;
    }
}
.filepond--credits {
    display: none !important;
}
/* Ensure URL links are clickable */
.filepond--file-status {
    pointer-events: all !important;
}

.filepond--file-status-main {
    pointer-events: all !important;
}

.filepond--file-status-main a {
    font-size: 1.1em !important;
    pointer-events: all !important;
    cursor: pointer !important;
    color: var(--accent-hover) !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

.filepond--file-status-main a:hover {
    color: var(--accent-primary) !important;
    text-decoration: underline !important;
}
/* Replace the revert button icon with custom SVG */
.filepond--action-revert-item-processing svg {
    opacity: 0;
    display: none;
}

.filepond--action-revert-item-processing {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="-5 -4 34 34" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 9V6.2002C9 5.08009 9 4.51962 9.21799 4.0918C9.40973 3.71547 9.71547 3.40973 10.0918 3.21799C10.5196 3 11.0801 3 12.2002 3H17.8002C18.9203 3 19.4801 3 19.9079 3.21799C20.2842 3.40973 20.5905 3.71547 20.7822 4.0918C21.0002 4.51962 21.0002 5.07967 21.0002 6.19978V11.7998C21.0002 12.9199 21.0002 13.48 20.7822 13.9078C20.5905 14.2841 20.2839 14.5905 19.9076 14.7822C19.4802 15 18.921 15 17.8031 15H15M9 9H6.2002C5.08009 9 4.51962 9 4.0918 9.21799C3.71547 9.40973 3.40973 9.71547 3.21799 10.0918C3 10.5196 3 11.0801 3 12.2002V17.8002C3 18.9203 3 19.4801 3.21799 19.9079C3.40973 20.2842 3.71547 20.5905 4.0918 20.7822C4.5192 21 5.07899 21 6.19691 21H11.8036C12.9215 21 13.4805 21 13.9079 20.7822C14.2842 20.5905 14.5905 20.2839 14.7822 19.9076C15 19.4802 15 18.921 15 17.8031V15M9 9H11.8002C12.9203 9 13.4801 9 13.9079 9.21799C14.2842 9.40973 14.5905 9.71547 14.7822 10.0918C15 10.5192 15 11.079 15 12.1969L15 15" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.retention-options input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    box-sizing: border-box;
}

.retention-options input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Lock button in bottom right corner */
.show-auth-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
}

.show-auth-button:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

.show-auth-button svg {
    width: 24px;
    height: 24px;
}

.filepond--file-action-button:focus {
    outline: none;
    box-shadow: 0 0 0 0.125em rgba(255, 51, 51, 0.5);
}