/* Upload Page Styles */

/* Back to Dashboard button */
.back-to-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-secondary, #F5F5F5);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.back-to-dashboard-btn:hover {
    background: rgba(228, 194, 0, 0.1);
    border-color: var(--accent-primary, #e4c200);
    color: var(--accent-primary, #e4c200);
}

.back-to-dashboard-btn span {
    font-size: 1.1rem;
}

.upload-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-upload-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    border: 1px solid #1d4ed8;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.top-upload-cta-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
}

.top-upload-cta-btn .cta-icon {
    font-size: 0.95rem;
}

/* Login link styling for upload page - less prominent */
.nav-list li a.login-link {
    font-size: 0.9rem !important;
    color: rgba(0, 0, 0, 0.6) !important;
    font-weight: 400 !important;
    text-decoration: underline;
    padding: 0.3rem 0.5rem !important;
}

.nav-list li a.login-link:hover {
    color: var(--accent-primary) !important;
    text-decoration: none;
}

/* Ensure proper spacing for the new navigation items */
.nav-list {
    gap: 1rem;
}

.nav-list li {
    margin: 0 0.5rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .nav-list li a.login-link {
        font-size: 1rem !important;
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

.upload-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #a48625 0%, #221e13 100%);
    min-height: 100vh;
}

/* Page Header Styling */
.upload-page-header {
    text-align: center;
    background: #f8fafc;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.upload-page-header .header-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-page-header h1 {
    color: #1f2937;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: none;
}

.upload-page-header .upload-description {
    color: #374151;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}


/* File Upload Area */
.file-upload-area {
    border: 2px dashed #b6c2d2;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8fafc;
    margin: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-upload-area:hover {
    border-color: #2563eb;
    background: #eef5ff;
}

.file-upload-area.dragover {
    border-color: #2563eb;
    background: #e0edff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-upload-area h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.file-upload-area p {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

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

.choose-file-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.choose-file-btn:hover {
    background: #1d4ed8;
}

/* Preview Area */
.preview-area {
    margin: 2rem;
    text-align: center;
    position: relative;
}

.preview-area img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-file-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: #c82333;
}

/* Metadata Form */
.metadata-form {
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.metadata-form h3 {
    color: #111827;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1f2937;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Collapsible Sections */
.collapsible-section {
    margin: 1.5rem 0;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fbff;
}

.section-toggle {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.section-toggle:hover {
    background: #e5edfb;
}

.section-toggle.expanded {
    background: #dbeafe;
    border-bottom: 1px solid #c7d2fe;
}

.toggle-icon {
    font-size: 0.9rem;
    color: #1d4ed8;
    transition: transform 0.3s ease;
}

.section-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.field-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 400;
}

.section-content {
    padding: 1.5rem 1.25rem;
    animation: slideDown 0.3s ease;
}

.section-description {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Template Selector */
.template-selector {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.template-selector label {
    color: #9a3412 !important;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.template-selector select {
    background: #ffffff;
    color: #111827;
    border-color: #fdba74;
}

.template-selector select:focus {
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.field-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Form Actions */
.form-actions {
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: #f8fafc;
}

.upload-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 18px 44px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: min(460px, 100%);
    min-height: 62px;
    max-width: 100%;
    border: 2px solid #1e40af;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    animation: uploadPulse 2s ease-in-out infinite;
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.45);
}

.upload-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: none;
}

.upload-btn.loading .btn-text {
    display: none;
}

.upload-btn.loading .btn-loading {
    display: inline;
}

@keyframes uploadPulse {
    0%, 100% { box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35); }
    50% { box-shadow: 0 14px 28px rgba(37, 99, 235, 0.5); }
}

/* Upload Status */
.upload-status {
    margin: 2rem auto;
    max-width: 600px;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.upload-status.success {
    background: var(--accent-dark);
    border: 1px solid var(--color-light-gold);
    color: #155724;
}

.upload-status.error {
    background: var(--bg-dark);
    border: 1px solid var(--color-error);
    color: #721c24;
}

.status-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.status-message {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-details {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Recent Uploads */
.recent-uploads {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-dark);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recent-uploads h3 {
    color: #495057;
    margin-bottom: 1.5rem;
    text-align: center;
}

.uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.upload-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.upload-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upload-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.upload-item-info {
    padding: 1rem;
}

.upload-item-info h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 1rem;
}

.upload-item-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-section {
        padding: 100px 0 60px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .file-upload-area {
        margin: 1rem;
        padding: 2rem 1rem;
    }
    
    .metadata-form {
        padding: 1.5rem;
    }
    
    .form-actions {
        padding: 1.5rem;
    }

    .upload-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .top-upload-cta-btn {
        width: 100%;
    }
    
    .uploads-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .upload-container {
        margin: 0 1rem;
    }
    
    .file-upload-area {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
    }
    
    .metadata-form {
        padding: 1rem;
    }
    
    .form-actions {
        padding: 1rem;
    }
    
    .upload-btn {
        width: 100%;
    }
}
