/* ============================================
   UPLOAD-SEITE STYLES
   Nutzt die gleichen CSS-Variablen wie style.css
   ============================================ */

.upload-page {
    min-height: 100vh;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.upload-header {
    text-align: center;
    padding: 40px 0 30px;
}

.upload-back {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: opacity 0.2s;
}

.upload-back:hover {
    opacity: 0.8;
}

.upload-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 2px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-subtitle {
    color: var(--text-muted);
    margin-top: 8px;
}

/* Sections & Cards */
.upload-section {
    margin-bottom: 20px;
}

.upload-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.05);
}

.upload-card h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--text);
}

/* Form-Elemente */
.upload-form-row {
    display: flex;
    gap: 10px;
}

.upload-form-group {
    margin-bottom: 16px;
}

.upload-form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--primary);
}

/* Tag-Checkboxen */
.tag-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Urlaubs-Auswahl (Trip) */
.trip-select {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
}

.trip-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease,
                border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.trip-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(233, 69, 96, 0.5);
    transform: translateY(-2px);
}

.trip-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 18px rgba(233, 69, 96, 0.4);
}

.trip-custom-input {
    margin-top: 2px;
    font-size: 0.92rem !important;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card-light);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}

.tag-checkbox:hover {
    background: rgba(233, 69, 96, 0.15);
}

.tag-checkbox input:checked + *,
.tag-checkbox:has(input:checked) {
    background: rgba(233, 69, 96, 0.25);
    border-color: var(--primary);
}

.tag-checkbox input[type="checkbox"] {
    accent-color: var(--primary);
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.btn-secondary {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.3);
}

.error-text {
    color: var(--primary);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Drag & Drop Zone */
.drop-zone {
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    position: relative;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(233, 69, 96, 0.05);
}

.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(245, 197, 24, 0.08);
    border-style: solid;
}

.drop-zone input[type="file"] {
    display: none;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.drop-zone-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.drop-zone-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.drop-zone-formats {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 12px;
    opacity: 0.6;
}

/* Datei-Liste */
.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.file-list-header h2 {
    margin-bottom: 0;
}

.file-list-actions {
    display: flex;
    gap: 10px;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-card-light);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.03);
}

.file-preview {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.file-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

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

.file-name {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(233, 69, 96, 0.15);
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove:hover {
    background: rgba(233, 69, 96, 0.3);
}

/* Fortschritt */
.progress-overall {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-card-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card-light);
    border-radius: 6px;
    font-size: 0.85rem;
}

.progress-item-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-item-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.progress-item-bar {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-item-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.2s;
    width: 0%;
}

.progress-item.done .progress-item-status {
    color: #4ade80;
}

.progress-item.done .progress-item-fill {
    background: #4ade80;
}

.progress-item.error .progress-item-status {
    color: var(--primary);
}

.progress-item.error .progress-item-fill {
    background: var(--primary);
}

/* Ergebnis */
#result-title {
    color: #4ade80;
}

#result-text {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 600px) {
    .upload-page {
        padding: 12px;
    }

    .upload-title {
        font-size: 1.8rem;
    }

    .upload-card {
        padding: 16px;
    }

    .drop-zone {
        padding: 40px 16px;
    }

    .file-list-header {
        flex-direction: column;
        align-items: stretch;
    }

    .file-list-actions {
        justify-content: stretch;
    }

    .file-list-actions button {
        flex: 1;
    }

    .upload-form-row {
        flex-direction: column;
    }

    .progress-item-bar {
        display: none;
    }
}
