/**
 * OrangeFiles - Upload Styles
 */
.category-section {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-select,
.category-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.category-select:focus,
.category-input:focus {
    border-color: #FF512F;
    box-shadow: 0 0 0 4px rgba(255, 81, 47, 0.1);
    transform: translateY(-1px);
}

.category-input {
    display: none;
    background: #fff8f6;
    border-style: dashed;
}

.category-input.show {
    display: block;
    /* Fix visibility */
    animation: fadeIn 0.3s ease;
}

/* New Wrapper for Icon + Select */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #FF512F;
    pointer-events: none;
    z-index: 10;
    width: 20px;
    height: 20px;
}

.category-select,
.category-input {
    padding-left: 45px;
    /* Make room for icon */
}

.category-input::placeholder {
    color: #94a3b8;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.drop-zone {
    border: 2px dashed #FF512F;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #fff5ec 0%, #ffe0cc 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.drop-zone:hover {
    border-color: #F09819;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 81, 47, 0.3);
}

.drop-zone.drag-over {
    background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
    border-color: white;
}

.drop-zone.drag-over * {
    color: white !important;
}

.drop-zone-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #FF512F;
}

.drop-zone h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 4px;
    font-weight: 800;
}

.drop-zone p {
    color: #64748b;
    font-size: 0.9rem;
}

#fileInput {
    display: none;
}

/* Progress Section */
.progress-section {
    display: none;
    padding: 25px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 450px;
    margin: 30px auto;
    border: 1px solid #f1f5f9;
}

.progress-section.visible {
    display: block !important;
}

/* Circular Progress Bar */
.circular-progress-container {
    display: none;
    position: relative;
    width: 200px;
    height: auto;
    margin: 0 auto 15px;
    background: transparent;
    padding-top: 50px;
    /* Space for the percentage text above */
    text-align: center;
}

.circular-progress-container.visible,
.circular-progress-container.active {
    display: block !important;
}

.overall-percentage {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: #FF512F;
    text-shadow: 0 0 20px rgba(255, 81, 47, 0.4);
    font-family: 'Outfit', sans-serif;
    z-index: 10;
    line-height: 1;
}

.circular-progress-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-bg-circle {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 3;
}

.inner-bg {
    fill: none;
}

.circular-progress-overall {
    fill: none;
    stroke: rgba(255, 255, 255, 0.4);
    /* Make it semi-transparent so background segments show */
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
    z-index: 8;
}

.circular-progress-circle {
    fill: none;
    stroke: url(#fileGradient);
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(76, 161, 175, 0.3));
    z-index: 9;
}

/* Dynamic Donut Segments */
.donut-segment {
    fill: none;
    stroke-width: 5;
    stroke-linecap: butt;
    /* Flat edges for segments */
    transition: stroke-dashoffset 0.5s ease, stroke 0.5s ease;
}

.circular-center {
    position: relative;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 5;
    overflow: hidden;
}

.center-logo {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.center-preview {
    display: none !important;
}

/* Pulsating Animation for Active Upload */
.circular-progress-container.active .center-logo,
.circular-progress-container.visible .center-logo {
    animation: pulsateGlow 2s infinite ease-in-out;
}

@keyframes pulsateGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 81, 47, 0));
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 15px rgba(255, 81, 47, 0.8));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 81, 47, 0));
    }
}

/* File Detail Rows - Mini Grid Layout */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 25px;
    justify-content: center;
}

.preview-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
    color: #64748b;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #FF512F;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.file-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    width: 80px;
    height: 80px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    border-color: #FF512F;
}

.file-info {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* Inner radius matching parent */
}

.file-preview-icon {
    font-size: 1.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Hide text details in mini grid, show on hover maybe? */
.file-details {
    display: none;
}

.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #ef4444;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    opacity: 0;
    /* Hidden by default */
    transform: scale(0.8);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.file-item:hover .remove-file {
    opacity: 1;
    transform: scale(1);
}

.remove-file:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.file-progress-details {
    margin-top: 25px;
}

.file-count-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
    border-radius: 12px;
    margin-bottom: 10px;
    color: white;
    font-weight: 700;
    overflow: hidden;
}

.active-upload-header {
    animation: fadeIn 0.3s ease;
}

#uploadDetailThumb {
    transition: all 0.3s ease;
}

.file-size-progress {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.progress-row-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1;
    background: rgba(255, 255, 255, 0.15);
    transition: width 0.3s ease, background 0.5s ease;
}

.file-count-label,
.file-count-percentage,
.file-size-current,
.file-size-percentage {
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.uploading-icon {
    animation: pulse 2s infinite;
}

/* Premium Upload Actions */
.upload-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

.btn-cancel {
    flex: 1;
    padding: 16px;
    border-radius: 15px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-cancel:hover {
    background: #f1f5f9;
    color: #ef4444;
    border-color: #ef4444;
}

.btn-upload {
    flex: 2;
    padding: 16px;
    border-radius: 15px;
    background: linear-gradient(135deg, #FF512F 0%, #F09819 100%);
    color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 81, 47, 0.2);
    font-family: 'Outfit', sans-serif;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 81, 47, 0.3);
    filter: brightness(1.1);
}

.btn-upload:active {
    transform: translateY(0);

}

.file-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.active-upload-thumbnail {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.active-upload-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name-display {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}