/* Hero Container with Gradient Background */
.modern-hero-section {
    background: var(--white);
    border-radius: 2rem;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    border: 1px #3b82f6;
    transition: all 0.3s ease;
}

.modern-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.modern-hero-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Modern Upload Zone */
.modern-upload-zone {
    background: #61a5fa12;
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 2px dashed transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.modern-upload-zone:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow:
        0 10px 15px -3px rgba(99, 102, 241, 0.1),
        0 4px 6px -2px rgba(99, 102, 241, 0.05);
}

/* Modern Drop Zone */
.modern-drop-zone {
    border: 2px dashed rgb(99 138 241 / 48%);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgb(99 144 241 / 13%);
    cursor: pointer;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.modern-drop-zone:hover,
.modern-drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.1);
}

.drop-zone-icon {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.modern-drop-zone:hover .drop-zone-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.drop-zone-icon i {
    font-size: 2.5rem;
    color: var(--primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.drop-zone-text {
    font-size: 1.125rem;
    color: var(--gray-600);
    font-weight: 500;
}

.drop-zone-text .highlight {
    color: var(--primary);
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.drop-zone-subtext {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-top: -0.5rem;
}

/* Hidden Input Wrappers */
.file-input-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

/* Folder Selection Link */
.folder-select-link {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.folder-select-link:hover {
    color: var(--primary);
    background: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-hero-section {
        padding: 2.5rem 1.5rem;
        border-radius: 1.5rem;
    }

    .modern-upload-zone {
        padding: 2rem 1.5rem;
    }

    .modern-upload-btn {
        width: 100%;
        padding: 1.125rem 2rem;
        font-size: 1rem;
    }

    .modern-folder-btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }

    .upload-icon-decoration {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }

    .upload-icon-decoration i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .modern-hero-section {
        padding: 2rem 1rem;
    }

    .modern-upload-zone {
        padding: 1.5rem 1rem;
    }
}

/* Feature Tags */
.upload-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-tag {
    background: rgba(99, 102, 241, 0.08);
    color: #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-tag i {
    font-size: 0.875rem;
}

/* Pulse Animation for Upload Icon */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.modern-upload-btn:hover .upload-pulse {
    animation: pulse 2s ease-in-out infinite;
}


/* ========================================
   UPLOAD PREVIEW WRAPPER - MODERN UI
   ======================================== */

/* Progress Section (below dropzone) */
#upload_progress_section {
    margin-top: 2rem;
}

.progress-section {
    background: rgba(99, 102, 241, 0.03);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.progress-header .file-count {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.progress-header .file-size {
    font-weight: 500;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.progress-header button {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.progress-header button:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

/* Main Preview Container */
#upload_previews_wrapper {
    margin-top: 3rem;
}

.upload-preview-card {
    background: #61a5fa12;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Transfer Type Container (Full Width) */
.transfer-type-container {
    width: 100%;
}

.transfer-type-container .type-selection-tabs {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: var(--white);
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.transfer-type-container .type-selection-tabs .btn {
    flex: 1;
    text-align: center;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    background: transparent;
    color: var(--gray-700);
    position: relative;
    z-index: 11;
}

.transfer-type-container .type-selection-tabs .btn:hover {
    background: rgba(99, 102, 241, 0.05);
}

.transfer-type-container .type-selection-tabs .btn.active {
    background: #3b82f6 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.transfer-type-container .type-selection-tabs .btn input {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.transfer-type-container .type-selection-tabs i {
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

/* Form Fields Container */
.form-fields-container {
    margin-top: 2rem;
}

/* Settings Section */
.preview-settings-section {
    background: rgba(99, 102, 241, 0.02);
    border-radius: 1.25rem;
    padding: 2rem;
    height: 100%;
}

/* Type Selection Tabs */
.type-selection-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.375rem;
    border-radius: 0.875rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    background: white;
    /* Ensure background is white */
}

.type-selection-tabs .btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.75rem;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9375rem;
    margin: 0;
    position: relative;
    z-index: 11;
    pointer-events: all;
    border: none;
    /* Remove default bootstrap btn border */
    background: transparent;
    /* Default background */
    color: var(--gray-700);
}

.type-selection-tabs .btn:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--gray-700);
}

.type-selection-tabs .btn.active {
    background: #3b82f6 !important;
    /* Force override bootstrap active styles */
    color: white !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.type-selection-tabs .btn input {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.type-selection-tabs i {
    margin-right: 0.375rem;
}

/* Modern Form Controls */
.modern-form-group {
    margin-bottom: 1.25rem;
}

.modern-form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
}

.modern-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
}

.modern-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modern-form-control::placeholder {
    color: var(--gray-400);
}

/* Icon Tabs Navigation */
.icon-tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: white;
    padding: 0.375rem;
    border-radius: 0.875rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.icon-tab-link {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.625rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-500);
    border: none;
    background: transparent;
}

.icon-tab-link:hover {
    background: rgba(99, 102, 241, 0.05);
    color: #667eea;
}

.icon-tab-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.icon-tab-link i {
    font-size: 1.125rem;
}

/* Files Preview Section */
.files-preview-section {
    border-radius: 1.25rem;
    height: 100%;
}

.files-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #ffffff17;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.files-preview-header .file-count {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.files-preview-header .file-size {
    font-weight: 500;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.files-preview-header button {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.files-preview-header button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* File Preview Items */
.upload-previews {
    max-height: 22rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.upload-preview-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    /* Light purple background from reference */
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
}

.upload-preview-item:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.upload-preview-item .file-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-200);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 1.25rem;
}

.upload-preview-item .file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Prevent flex overflow */
}

.upload-preview-item .file-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-preview-item .file-size {
    font-size: 0.8125rem;
    color: var(--black);
    font-weight: 500;
}

.upload-preview-item .file-remove {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #9ca3af;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.upload-preview-item .file-remove:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

/* Progress Bar */
.file-progress {
    width: 100%;
    height: 6px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
    flex-basis: 100%;
    /* Force to new line */
}

.file-progress-bar {
    height: 100%;
    background: #667eea;
    /* Solid purple matching reference */
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Submit Button */
.upload-submit-btn {
    background: #3b82f6;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    border-radius: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -5px rgba(99, 102, 241, 0.3);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.upload-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -5px rgba(99, 102, 241, 0.4);
}

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

/* Responsive */
@media (max-width: 992px) {
    .upload-preview-card {
        padding: 2rem;
    }

    .preview-settings-section,
    .files-preview-section {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    #upload_previews_wrapper {
        margin-top: 2rem;
    }

    .upload-preview-card {
        padding: 1.5rem;
    }

    .preview-settings-section,
    .files-preview-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .icon-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .icon-tab-link {
        flex: 0 0 auto;
        min-width: 60px;
    }
}