/* ============================================================
   Send by digitalNORD GmbH - Haupt-Stylesheet
   Modernes Design mit automatischem Dark Mode
   ============================================================ */

/* === CSS Custom Properties (Theming) === */
:root {
    /* Farben - Helles Theme */
    --color-bg: #f0f2f5;
    --color-bg-card: #ffffff;
    --color-bg-input: #f5f6f8;
    --color-bg-hover: #e8eaed;
    --color-text: #1a1a2e;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-accent: #0099cc;
    --color-accent-hover: #007aa3;
    --color-accent-light: rgba(0, 153, 204, 0.1);
    --color-accent-gradient: linear-gradient(135deg, #0099cc, #00b4d8);
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --color-success: #10b981;
    --color-success-light: rgba(16, 185, 129, 0.1);
    --color-warning: #f59e0b;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* Schatten */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-focus: 0 0 0 3px rgba(0, 153, 204, 0.25);

    /* Abstande */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Radien */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Typografie */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;

    /* Layout */
    --max-width: 680px;
    --header-height: 64px;

    /* Transition */
    --transition: 0.2s ease;
}

/* === Dark Mode === */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f1117;
        --color-bg-card: #1a1d27;
        --color-bg-input: #252836;
        --color-bg-hover: #2a2d3a;
        --color-text: #e8eaed;
        --color-text-secondary: #9ca3af;
        --color-text-muted: #6b7280;
        --color-accent: #00b4d8;
        --color-accent-hover: #00c9f0;
        --color-accent-light: rgba(0, 180, 216, 0.12);
        --color-border: #2a2d3a;
        --color-border-light: #1f2230;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
        --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
    }

}

/* === Reset & Basis === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--color-accent-hover);
}

/* === Header === */
.header {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header__inner {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text);
}

.header__logo svg {
    width: 32px;
    height: 32px;
}

.header__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.header__logo-name {
    font-size: var(--text-lg);
    font-weight: 700;
}

.header__logo-sub {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: 400;
}

.header__slogan {
    font-size: var(--text-sm);
    color: #1c4484;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.btn--new-send {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all var(--transition);
}

.btn--new-send:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

.btn--new-send svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
    .header__slogan {
        color: #019cc8;
    }
}

@media (max-width: 768px) {
    .header__slogan {
        display: none;
    }

    .btn--new-send span {
        display: none;
    }
}

/* === Main Content === */
.main {
    flex: 1;
    padding: var(--space-2xl) var(--space-xl);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* === Card === */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.card__header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card__title {
    font-size: var(--text-lg);
    font-weight: 600;
}

.card__body {
    padding: var(--space-xl);
}

/* === Drop Zone === */
.dropzone {
    border: 2px dashed var(--color-accent);
    border-radius: var(--radius-md);
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    transition: all var(--transition);
    position: relative;
    background: linear-gradient(135deg, rgba(0, 153, 204, 0.15), rgba(0, 180, 216, 0.22), rgba(0, 153, 204, 0.15));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.dropzone:hover,
.dropzone.drag-over {
    border-color: rgba(0, 153, 204, 0.3);
    background: linear-gradient(135deg, rgba(0, 153, 204, 0.08), rgba(0, 180, 216, 0.14), rgba(0, 153, 204, 0.08));
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.dropzone__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    color: var(--color-text-muted);
    transition: color var(--transition);
}

@media (prefers-color-scheme: dark) {
    .dropzone__icon {
        color: #019cc8;
    }
}

.dropzone:hover .dropzone__icon,
.dropzone.drag-over .dropzone__icon {
    color: var(--color-accent);
}

.dropzone__text {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.dropzone__hint {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.dropzone--compact {
    padding: var(--space-md) var(--space-xl);
}

.dropzone--compact .dropzone__icon {
    display: none;
}

.dropzone--compact .dropzone__text {
    font-size: var(--text-md);
    margin-bottom: 0;
}

.dropzone--compact .dropzone__hint {
    display: none;
}

.dropzone--highlight {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    animation: highlightPulse 0.5s ease 3;
}

@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 153, 204, 0); }
    50% { box-shadow: 0 0 0 6px rgba(0, 153, 204, 0.15); }
}

/* Dropzone Buttons (Dateien / Ordner) */
.dropzone__buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
}

.dropzone__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-card);
    color: var(--color-accent);
    border: 1.5px solid var(--color-accent);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.dropzone__btn:hover {
    background: var(--color-accent);
    color: #fff;
}

.dropzone__btn svg {
    flex-shrink: 0;
}

.dropzone--compact .dropzone__buttons {
    margin-top: var(--space-xs);
    margin-bottom: 0;
}

.dropzone--compact .dropzone__btn {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
}

/* === Dateiliste === */
.file-list {
    list-style: none;
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition);
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--color-bg-hover);
}

.file-item__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--color-accent-light);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-item__icon--thumb {
    background: none;
    overflow: hidden;
}

.file-item__icon--thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.file-item__info {
    flex: 1;
    min-width: 0;
}

.file-item__name {
    font-weight: 500;
    word-break: break-word;
}

.file-item__meta {
    display: flex;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.file-item__meta span::before {
    content: '\00b7';
    margin-right: var(--space-sm);
}

.file-item__meta span:first-child::before {
    content: none;
}

.file-item__scan {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.file-item__scan.scan-ok {
    color: var(--color-success);
}

.file-item__scan.scan-infected {
    color: var(--color-danger);
    font-weight: 600;
}

.file-item__scan.scan-error {
    color: var(--color-warning);
}

.file-item__scan .scan-label-full {
    display: inline;
}

.file-item__scan .scan-label-short {
    display: none;
}

@media (max-width: 600px) {
    .file-item__scan .scan-label-full {
        display: none;
    }
    .file-item__scan .scan-label-short {
        display: inline;
    }
}

.file-item__remove {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.file-item__remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
}

/* === Progress Bar === */
.progress {
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-xs);
}

.progress__bar {
    height: 100%;
    background: var(--color-accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    width: 0%;
}

.progress--thick {
    height: 8px;
}

.file-list-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-sm) 0;
}

.file-list-actions a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: none;
}

.file-list-actions a:hover {
    color: var(--color-danger);
    text-decoration: underline;
}

#btn-cancel-upload {
    color: var(--color-danger);
}

#btn-cancel-upload:hover {
    color: var(--color-danger-hover);
}

/* === Formular-Elemente === */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.65rem var(--space-md);
    font-size: var(--text-md);
    font-family: var(--font);
    background: var(--color-bg-input);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    appearance: none;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-focus);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Rich-Text-Editor */
.richtext-toolbar {
    display: flex;
    gap: 2px;
    padding: var(--space-xs);
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.richtext-toolbar button {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    font-size: var(--text-sm);
    line-height: 1;
}

.richtext-toolbar button:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border);
}

.richtext-editor {
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    line-height: 1.5;
}

.richtext-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-muted);
    pointer-events: none;
}

.richtext-editor ul,
.richtext-editor ol {
    padding-left: 1.5em;
    margin: 0.3em 0;
}

.richtext-editor a {
    color: var(--color-accent);
}

.form-input-group {
    display: flex;
    gap: var(--space-sm);
}

.form-input-group .form-input {
    flex: 1;
}

.form-label-link {
    font-size: var(--text-sm);
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.form-label-link:hover {
    text-decoration: underline;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap .form-input {
    padding-right: 2.5rem;
}

.password-copy-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: color var(--transition);
}

.password-copy-btn:hover {
    color: var(--color-accent);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.65rem var(--space-lg);
    font-size: var(--text-md);
    font-family: var(--font);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    background: linear-gradient(135deg, #0099cc, #00b4d8, #0099cc);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 153, 204, 0.3);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 153, 204, 0.4);
}

.btn--secondary {
    background: var(--color-bg-input);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn--secondary:hover:not(:disabled) {
    background: var(--color-bg-hover);
}

.btn--download {
    background: linear-gradient(135deg, rgba(0, 153, 204, 0.15), rgba(0, 180, 216, 0.15), rgba(0, 153, 204, 0.15));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: var(--color-accent);
    border: 1px solid rgba(0, 153, 204, 0.25);
}

.btn--download:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 153, 204, 0.25), rgba(0, 180, 216, 0.25), rgba(0, 153, 204, 0.25));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 153, 204, 0.15);
}

.btn--danger {
    background: var(--color-danger);
    color: #fff;
}

.btn--danger:hover:not(:disabled) {
    background: var(--color-danger-hover);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
    padding: var(--space-sm) var(--space-md);
}

.btn--ghost:hover {
    background: var(--color-bg-hover);
    color: var(--color-text);
}

.btn--block {
    width: 100%;
}

.btn--sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
}

.btn--lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-lg);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* === Upload-Optionen (Akkordeon) === */
.upload-options {
    padding: var(--space-xl);
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr 1fr;
}

.upload-options .form-group {
    margin-bottom: 0;
}

.upload-options .form-group--full {
    grid-column: 1 / -1;
}

/* === Share-Bereich === */
.share-card {
    margin-top: var(--space-xl);
}

.share-card .card__body {
    text-align: center;
}

.share-success {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-success);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.share-success svg {
    width: 28px;
    height: 28px;
}

.share-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-accent-light);
    border: 1px solid rgba(0, 153, 204, 0.15);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xl);
}

.share-link__url {
    flex: 1;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--color-accent);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    text-decoration: none;
}

.share-link__url:hover {
    text-decoration: underline;
}

.share-link .btn--secondary {
    background: transparent;
    border: 1px solid rgba(0, 153, 204, 0.2);
    color: var(--color-accent);
    flex-shrink: 0;
    white-space: nowrap;
}

.share-link .btn--secondary:hover {
    background: rgba(0, 153, 204, 0.08);
}

.share-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.share-actions .btn--secondary {
    background: transparent;
    border: 1px solid var(--color-border-light);
    color: var(--color-accent);
    transition: all 0.2s ease;
}

.share-actions .btn--secondary:hover {
    background: var(--color-accent-light);
    border-color: rgba(0, 153, 204, 0.2);
    transform: translateY(-1px);
}

/* Scan-Progressbar im Share-Bereich */
.scan-progress {
    margin-bottom: var(--space-lg);
}

.scan-progress__text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.scan-progress__text span:first-child {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.scan-progress__text svg {
    width: 28px;
    height: 28px;
}

.scan-progress .progress {
    margin-top: 0;
    height: 4px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Scan-Gesamtergebnis */
.scan-result {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
}

.scan-result--ok {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-success);
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

.scan-result--ok svg {
    width: 28px;
    height: 28px;
}

.scan-result--warn {
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.scan-result--danger {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dateizeilen-Einfaerbung bei Scan-Problemen */
.file-item--infected {
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid var(--color-danger);
}

.file-item--scan-error {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid var(--color-warning);
}

/* Aufbewahrungsdauer + Passwort in einer Zeile */
.share-inline-row {
    display: flex;
    gap: var(--space-md);
    text-align: left;
    margin-bottom: var(--space-sm);
}

.share-inline-row .form-group {
    margin-bottom: 0;
}

.share-options__saved {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--color-success);
    margin-top: 0;
    margin-bottom: var(--space-sm);
    justify-content: flex-end;
}

/* Modus-Switch (Link erstellen / E-Mail versenden) */
.share-mode {
    display: flex;
    gap: var(--space-xs);
    background: var(--color-bg-input);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: var(--space-lg);
}

.share-mode__option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.share-mode__option input[type="radio"] {
    display: none;
}

.share-mode__option:hover {
    color: var(--color-text-secondary);
}

.share-mode__option--active {
    background: var(--color-bg-card);
    color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

/* E-Mail-Felder (ausklappbar) */
.share-email-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}

.share-email-fields--open {
    max-height: 400px;
    opacity: 1;
}

.share-email-fields .form-group {
    margin-bottom: var(--space-md);
}

.share-recipient + .share-recipient {
    margin-top: var(--space-xs);
}

/* E-Mail + Verifizieren Zeile */
.share-email-verify {
    display: flex;
    gap: var(--space-sm);
}
.share-email-verify .form-input {
    flex: 1;
}
.share-email-verify .btn--secondary {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Verifiziert-Badge */
.share-verified-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--color-success);
    margin-top: var(--space-xs);
}

/* Verifizierungs-Bereich */
.share-verify {
    margin-top: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    text-align: center;
}

.share-verify h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.share-verify p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    line-height: 1.5;
}

.share-verify__code-input {
    text-align: center;
    font-size: var(--text-xl) !important;
    letter-spacing: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.share-verify__legal {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-lg);
    line-height: 1.5;
}

.share-verify__legal a {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.share-verify__legal a:hover {
    color: var(--color-accent);
}

.share-forgot {
    margin-top: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.share-forgot a {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.share-forgot a:hover {
    color: var(--color-accent);
}

/* === QR-Code === */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.qr-modal.active {
    display: flex;
}

.qr-modal__content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 360px;
    width: 90%;
    position: relative;
}

.qr-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    line-height: 0;
}

.qr-modal__close:hover {
    color: var(--color-text);
    background: var(--color-bg-hover);
}

.qr-modal__content #qr-canvas {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    display: inline-block;
    margin: var(--space-md) auto;
}

/* Canvas verstecken (Bibliothek zeigt img), img stylen */
.qr-modal__content #qr-canvas canvas {
    display: none !important;
}

.qr-modal__content #qr-canvas img {
    display: block;
    border-radius: 4px;
    width: 100%;
    height: auto;
}

/* === Upload-Status === */
.upload-status {
    padding: var(--space-xl);
    display: none;
}

.upload-status.active {
    display: block;
}

.upload-status__overall {
    margin-bottom: var(--space-lg);
}

.upload-status__text {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

/* === Toast / Benachrichtigungen === */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-bg-card);
    color: var(--color-text);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    z-index: 2000;
    transition: transform 0.3s ease;
    font-weight: 500;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
}

.toast--success {
    border-left: 4px solid var(--color-success);
}

.toast--error {
    border-left: 4px solid var(--color-danger);
}

.toast--warn {
    border-left: 4px solid #f0a030;
}

/* === Fehlerseiten === */
.error-page {
    text-align: center;
    padding: var(--space-2xl);
}

.error-page__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-xl);
    color: var(--color-text-muted);
}

.error-page__title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.error-page__message {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

/* === Download-Seite === */
.download-header {
    text-align: center;
    padding: var(--space-xl);
}

.download-header__size {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.download-actions {
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    border-top: 1px solid var(--color-border);
}

/* === Passwort-Seite === */
.password-card {
    max-width: 420px;
    margin: var(--space-2xl) auto;
}

.password-card .card__body {
    text-align: center;
}

.password-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    color: var(--color-accent);
}

.password-card .form-group {
    text-align: left;
}

/* === Filedrop-Seite === */
.filedrop-header {
    text-align: center;
    padding: var(--space-xl) var(--space-xl) 0;
}

.filedrop-header__title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.filedrop-header__desc {
    color: var(--color-text-secondary);
}

.filedrop-success {
    text-align: center;
    padding: var(--space-2xl);
}

.filedrop-success__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    color: var(--color-success);
}

/* === Honeypot (unsichtbar) === */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* === Footer === */
.footer {
    text-align: center;
    padding: var(--space-lg) var(--space-xl);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

/* === Responsive === */
@media (max-width: 640px) {
    .main {
        padding: var(--space-lg) var(--space-md);
    }

    .header {
        padding: 0 var(--space-md);
    }

    .upload-options {
        grid-template-columns: 1fr;
        padding: var(--space-lg);
    }

    .card__body {
        padding: var(--space-lg);
    }

    .dropzone {
        padding: var(--space-xl) var(--space-md);
    }

    .share-inline-row {
        flex-direction: column;
    }

    .share-mode__option {
        font-size: var(--text-md);
        padding: var(--space-sm) var(--space-xs);
    }

    .share-actions {
        flex-direction: column;
    }

    .share-actions .btn {
        width: 100%;
    }

    .btn--lg {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--text-md);
    }

    .file-item {
        padding: var(--space-md) var(--space-lg);
    }
}

/* === Animationen === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* === Spinner === */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

.btn--primary .spinner {
    border-color: rgba(255,255,255,0.3);
    border-top-color: #fff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
