/* File Uploader UI - Dark Theme for Modal */
.nts-file-uploader {
    border: 2px dashed #495057; /* Darker dashed border */
    border-radius: .375rem;
    padding: 1.5rem;
    text-align: center;
    background-color: #212529; /* Dark background matching form inputs */
    color: var(--light-text);  /* Light text for readability */
    transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
}

.nts-file-uploader:hover,
.nts-file-uploader.dragover {
    border-color: var(--brand-red);      /* Use brand red for hover/active state */
    background-color: #343a40;         /* Slightly lighter dark background on hover */
}

/* Ensure the icon inside the uploader is also visible */
.nts-file-uploader .fa-cloud-upload-alt {
    color: var(--light-text) !important;
}

#nts-file-list, #modal-nts-file-list {
    margin-top: 1.5rem;
}

/* Style for the preview items of uploaded files */
.nts-file-preview-item {
    display: flex;
    align-items: center;
    padding: .75rem;
    background-color: #343a40;      /* Dark background for file items */
    border: 1px solid #495057;        /* Darker border */
    border-radius: .375rem;
    margin-bottom: .5rem;
    font-size: 0.9rem;
}

.nts-file-preview-item .file-icon {
    font-size: 1.5rem;
    margin-right: .75rem;
    width: 25px; /* Alignment */
    text-align: center;
    color: var(--light-text); /* Ensure icon is light */
}

.nts-file-preview-item .file-details {
    flex-grow: 1;
    text-align: left;
    min-width: 0; /* Prevents long names from breaking layout */
}

.nts-file-preview-item .file-name {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff; /* White file name for contrast */
}

.nts-file-preview-item .file-size {
    display: block;
    font-size: .875em;
    color: #adb5bd; /* Muted light color for file size */
}

.nts-file-preview-item .remove-file-btn {
    padding: .25rem .5rem;
    line-height: 1;
}

/* Spinner overlay for submission */
#submission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1060; /* Higher than most elements */
    color: white;
    flex-direction: column;
}

#submission-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}


/* SweetAlert2 Modal Specific Styles */
.quote-modal.swal2-popup {
    background: var(--dark-bg);
    color: var(--light-text);
    border: 1px solid #444;
}
.quote-modal .swal2-title {
    color: #fff;
}
.quote-modal .swal2-html-container {
    color: var(--light-text);
    text-align: left;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1em; /* space for scrollbar */
}

.quote-modal label { color: #f8f9fa; }
.quote-modal .form-control,
.quote-modal .form-select {
    background-color: #212529;
    color: #fff;
    border: 1px solid #495057;
}
.quote-modal .form-control:focus,
.quote-modal .form-select:focus {
    background-color: #212529;
    color: #fff;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 0.25rem rgba(217, 35, 50, 0.25);
}

/* Redundant styles below this point can be removed, but are kept for clarity */
.quote-modal .nts-file-uploader {
    background-color: #212529;
    border-color: #495057;
}
.quote-modal .nts-file-uploader:hover,
.quote-modal .nts-file-uploader.dragover {
    background-color: #343a40;
    border-color: var(--brand-red);
}
.quote-modal .nts-file-preview-item {
    background-color: #343a40;
    border-color: #495057;
}
.quote-modal .file-name { color: #fff; }
.quote-modal .file-size { color: #adb5bd; }

/* Scrollbar for modal content */
.quote-modal .swal2-html-container::-webkit-scrollbar {
  width: 8px;
}
.quote-modal .swal2-html-container::-webkit-scrollbar-track {
  background: #212529;
}
.quote-modal .swal2-html-container::-webkit-scrollbar-thumb {
  background-color: var(--brand-red);
  border-radius: 4px;
}