
#file-upload .card-main div:nth-child(1) > span:nth-child(1):before{
    content: "";
    position: absolute;
    top: -4px;
    left: -9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: -1;
    background-color: var(--Secondary-Yellow-400);
}
.dark-page #file-upload .card-main div:nth-child(1) > span:nth-child(1)::before{
    content: "";
    position: absolute;
    top: -4px;
    left: -9px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: 1;
    background-color: var(--Secondary-Yellow-100);
}

#fileDiv-URL > span{
    font-size: 14px;
    display: flex;
    justify-content: center;
    width: 100%;
}

#fileDiv-URL .drag-area{
    border: 2px dashed var(--Primary-Blue-300);
    border-radius: 24px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.02) 0%, rgba(25, 118, 210, 0.05) 100%);
    min-height: 280px;
    cursor: pointer;
}

#fileDiv-URL .drag-area:hover {
    border-color: var(--Primary-Blue-500);
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(25, 118, 210, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.15);
}

#fileDiv-URL .drag-area.dragover {
    border-color: var(--Primary-Blue-600);
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1) 0%, rgba(25, 118, 210, 0.15) 100%);
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(25, 118, 210, 0.25);
}

/* Upload Icon Container */
.upload-icon-container {
    transition: transform 0.3s ease;
}

.drag-area:hover .upload-icon-container {
    transform: scale(1.1);
}

/* Upload Instructions */
.upload-instructions h5 {
    color: var(--Primary-Blue-700);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.upload-instructions p {
    color: var(--Gray-Gray-600);
    line-height: 1.5;
}

.upload-instructions .text-muted {
    color: var(--Gray-Gray-400) !important;
    font-size: 0.875rem;
}

/* Browse Button */
.btn-upload-browse {
    /* Auto layout */
   /* state=hover, disabled=false, compact=true, Plain=false, Outline=False */

/* Auto layout */
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 12px 32px;
gap: 8px;



background: #FFC000;
border: 2px solid #FFC000;
border-radius: 64px;

}

.btn-upload-browse:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 112, 183, 0.4);
}

.btn-upload-browse:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 112, 183, 0.3);
}

/* File Count Display */
.file-count-display {
    background: var(--Primary-Blue-50);
    border: 1px solid var(--Primary-Blue-200);
    border-radius: 20px;
    padding: 8px 16px;
    margin-top: 16px;
}

.file-count-badge {
    display: flex;
    align-items: center;
    color: var(--Primary-Blue-700);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Upload Button States */
#upload-button {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

#upload-button.show {
    opacity: 1;
    transform: translateY(0);
}

/* File Preview Improvements */
#file-preview {
    background-color: var(--Primary-Blue-50);
    border: 1px solid var(--Primary-Blue-100);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

#file-preview #fileTypeBox {
    border-radius: 8px;
    width: fit-content;
    padding: 12px 16px;
    height: 42px;
    margin: auto;
    background: linear-gradient(135deg, var(--Primary-Blue-500), var(--Primary-Blue-600));
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* File Preview Items */
.file-preview-item {
    transition: all 0.2s ease;
    border: 1px solid var(--Primary-Blue-100) !important;
}

.file-preview-item:hover {
    border-color: var(--Primary-Blue-200) !important;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1) !important;
    transform: translateY(-1px);
}

/* Remove File Button */
.btn-remove-file {
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: rgba(220, 53, 69, 0.15) !important;
    transform: scale(1.1);
}

/* Dark Theme Adjustments */
.dark-page #fileDiv-URL .drag-area {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, rgba(25, 118, 210, 0.08) 100%);
    border-color: var(--Primary-Blue-400);
}

.dark-page #fileDiv-URL .drag-area:hover {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.08) 0%, rgba(25, 118, 210, 0.12) 100%);
    border-color: var(--Primary-Blue-500);
}

.dark-page .upload-instructions h5 {
    color: var(--Primary-Blue-300);
}

.dark-page .upload-instructions p {
    color: var(--Gray-Not-White);
}

.dark-page .upload-instructions .text-muted {
    color: var(--Gray-Gray-500) !important;
}

.dark-page .file-count-display {
    background: var(--Primary-Blue-900);
    border-color: var(--Primary-Blue-700);
}

.dark-page .file-count-badge {
    color: var(--Primary-Blue-200);
}

/* Modal Styles */
#modalBox #submit,
#modalBox #cancelButton {
    background: var(--Light-Gradient);
    border: 1px solid var(--Light-Gradient);
    color: var(--Gray-Not-White);
    width: fit-content;
}

#modalBox #confirmButton{
    background: var(--Error-600);
    border: 1px solid var(--Error-600);
    color: var(--Gray-Not-White);
    width: fit-content;
}

#preview-button{
    background: transparent;
    border: 2px solid var(--Primary-Blue-500);
    color: var(--Primary-Blue-500);
    width: fit-content;
}

.dark-page #modalBox #submit,
.dark-page #modalBox #cancelButton  {
    background: var(--Dark-Gradient);
    border: 1px solid var(--Light-Gradient);
    color: var(--Gray-Not-White);
    width: fit-content;
}

#modalBox{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--Gray-Not-White) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.dark-page #modalBox{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--Gray-Gray-900) !important;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.dark-page #select-folder ,
.dark-page #relevant-files,
.dark-page #clause-type,
.dark-page #standard-list,
.dark-page #regulatory-list,
.dark-page #Keyword-type,
.dark-page #files-type,
.dark-page #contract-base,
.dark-page .detailsRelavence-row select {
    background-image: url('/static/img/arrow_drop_down.png');
    background-repeat: no-repeat;
}

#deleteItem{
    background: var(--Error-500);
    border: 1px solid var(--Error-400);
    color: var(--Gray-Not-White);
    width: fit-content;
}

#selectAll{
    background: var(--Secondary-Yellow-500);
    border: 1px solid var(--Secondary-Yellow-400);
    color: var(--Gray-Not-Black);
    width: fit-content;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top: 2px solid var(--Gray-Not-Black);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    -webkit-animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #fileDiv-URL .drag-area {
        min-height: 240px;
        padding: 20px;
    }

    .upload-instructions h5 {
        font-size: 1.1rem;
    }

    .upload-instructions p {
        font-size: 0.9rem;
    }

    .btn-upload-browse {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Animation for file selection */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-count-display.show {
    animation: fadeInUp 0.4s ease-out;
}

/* Drag and Drop Visual Feedback */
.drag-area.dragover .upload-icon-container {
    transform: scale(1.2);
}

.drag-area.dragover .upload-instructions h5 {
    color: var(--Primary-Blue-600);
}

.drag-area.dragover .btn-upload-browse {
    background: var(--Primary-Blue-600);
    transform: scale(1.05);
}

/* Dark Theme File Preview */
.dark-page #file-preview {
    background-color: var(--Primary-Blue-900);
    border-color: var(--Primary-Blue-700);
}

.dark-page .file-preview-item {
    background: var(--Gray-Gray-800) !important;
    border-color: var(--Primary-Blue-600) !important;
}

.dark-page .file-preview-item:hover {
    border-color: var(--Primary-Blue-500) !important;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2) !important;
}

.dark-page .file-preview-item .text-muted {
    color: var(--Gray-Gray-400) !important;
}

/* btn/Primary/Dark */
.btn-primary-dark {
    /* Auto layout */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 32px;
    gap: 8px;

    width: 145px;
    height: 46px;

    /* Dark Gradient */
    background: linear-gradient(90deg, #61A8E6 0%, #1D70B7 100%);
    border-radius: 64px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;

    /* Inside auto layout */
    flex: none;
    order: 1;
    flex-grow: 0;
}

.btn-primary-dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 112, 183, 0.4);
}

.btn-primary-dark:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 112, 183, 0.3);
}
