#file-counter {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

#page-counter {
    font-weight: 600;
    color: var(--primary-color);
}

/* Use centralized .upload-file-pages in upload-panel.css */

@media (max-width: 768px) {
    .stack-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Results Dialog Styles */
.mdc-dialog__surface {
    width: 90vw !important;
    max-width: 900px !important;
    display: flex;
    flex-direction: column;
    height: 90vh !important;
}

.mdc-dialog__title {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    margin: 0;
    color: var(--primary-color);
}

/* Tab Strip Styles */
.tab-container {
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
}

.tab-strip {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: color 0.2s;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.mdc-dialog__content {
    flex: 1;
    padding: 0 !important;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 1rem !important;
}

.tab-panel {
    display: none;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

.tab-panel--active {
    display: flex;
}

/* CSV Table Styles */
.csv-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
    height: 100%;
    position: relative;
}

.csv-table-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.csv-table-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-x: auto;
    overflow-y: auto;
}

.csv-table {
    width: auto;
    border-collapse: collapse;
    font-size: 0.813rem;
    font-family: Inter, sans-serif;
    table-layout: fixed;
    min-width: 100%;
}

.csv-table th,
.csv-table td {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100px;
    min-width: 100px;
    max-width: 200px;
}

.csv-table th:first-child,
.csv-table td:first-child {
    background: inherit;
}

.csv-table th {
    background: var(--background-light);
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.csv-table tr:nth-child(even) {
    background-color: #fafafa;
}

.csv-table tr:hover {
    background-color: #f0f7ff;
}

.csv-table td {
    color: #444;
}

/* Custom scrollbars for better Excel feel */
.csv-table-container::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.csv-table-container::-webkit-scrollbar-track {
    background: var(--background-light);
    border-left: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
}

.csv-table-container::-webkit-scrollbar-thumb {
    background: #cdcdcd;
    border: 3px solid #f5f5f5;
    border-radius: 7px;
}

.csv-table-container::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.csv-table-container::-webkit-scrollbar-corner {
    background: #f5f5f5;
    border-left: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
}

/* Ensure download button is visible */
.csv-preview .download-button {
    position: sticky;
    bottom: 0;
    align-self: center;
    margin-top: 1rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* PDF Preview Styles */
.pdf-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
}

.pdf-preview iframe {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

/* Action Buttons */
.mdc-dialog__actions {
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
}

.download-button {
    align-self: center;
    min-width: 200px;
    height: 36px;
    background-color: var(--primary-color) !important;
    color: white !important;
    text-transform: none;
    font-size: 0.875rem;
    letter-spacing: 0.25px;
}

.download-button .material-icons {
    font-size: 18px;
    margin-right: 8px;
}


.report-options {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 1rem 0;
}




.mdc-form-field > label {
    padding-left: 8px;
    margin: 0;
}

/* Credit Dialog Styles */
.credit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.credit-dialog-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.credit-info-box {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.credit-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.credit-row.shortfall {
    color: #d32f2f;
    font-weight: bold;
}

.credit-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    
}

.credit-buttons button {
    margin: 5px 0;
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Quality Assurance Failure Dialog Styles */
.qa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.qa-dialog-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.qa-dialog-container h2 {
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 24px;
}

.qa-dialog-container p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.qa-files-container {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0 20px 0;
    text-align: left;
    overflow-y: auto;
    max-height: 50vh;
}

.qa-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qa-file-item {
    padding: 12px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qa-file-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    word-break: break-word;
}

.qa-file-error {
    color: #d32f2f;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.qa-button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.qa-button-container .mdc-button {
    min-width: 120px;
    background-color: var(--primary-color);
}

.upload-drop-zone.disabled {
    background-color: #f5f5f5; /* Lighter background */
    border-color: #e0e0e0; /* Lighter border */
    cursor: not-allowed;
}

.upload-drop-zone.disabled .material-icons {
    color: #bdbdbd !important; /* Grey out icon */
}

.upload-drop-zone.disabled p {
    color: #bdbdbd; /* Lighter text color for disabled state */
}

/* Styles for disabled checkbox options */
.checkbox-option.disabled label {
    color: #bdbdbd; /* Grey out the label text */
    cursor: not-allowed;
}

.checkbox-option.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

/* Styles for disabled selected files panel */
.upload-selected-files.disabled {
    background-color: #f5f5f5; /* Match drop zone disabled bg */
    border-color: #e0e0e0; /* Match drop zone disabled border */
    /* cursor: not-allowed; /* Optional: if the whole panel should indicate this */
}

.upload-selected-files.disabled .upload-empty-state .material-icons,
.upload-selected-files.disabled .upload-empty-state p {
    color: #bdbdbd !important; /* Grey out empty state icon and text */
}

/* Style for file items when the panel is disabled */
.upload-selected-files.disabled .upload-file-item .upload-file-info .material-icons,
.upload-selected-files.disabled .upload-file-item .upload-file-info .upload-file-name,
.upload-selected-files.disabled .upload-file-item .upload-file-info .upload-file-pages {
    color: #bdbdbd !important; /* Grey out file item details */
}

.upload-selected-files.disabled .upload-file-item .upload-remove-file .material-icons {
    color: #bdbdbd !important; /* Grey out remove button icon */
    cursor: not-allowed;
}

.upload-selected-files.disabled .upload-file-item .upload-remove-file {
    pointer-events: none; /* Prevent clicks on remove button */
}

.notes-and-reports-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: flex-start;
    margin: 1rem 0;
}

.notes-and-reports-section .form-section {
}

.form-section .mdc-text-field {
    width: 100%;
}

.notes-and-reports-section .report-options {
    margin-top: 0;
    padding-top: 1rem; /* to align with textfield */
} 