/* Core containers */
.container {
    padding: 15px 15px 0 15px;
    background-color: #f4f4f4;
}

.header {
    margin-bottom: 20px;
}

/* Title and text styles */
.ms-font-m {
    font-size: 17px;
}

/* Logging toggle */
.logging-toggle {
    font-size: 15px;
    color: #666;
    padding-bottom: 20px;
    margin: 10px 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.toggle-label input {
    margin: 0;
    cursor: pointer;
}

/* Tab styles */
.tabs-container {
    margin: 15px 0;
    border-bottom: 1px solid #edebe9;
}

.tabs {
    display: flex;
    gap: 2px;
}

.tab-button {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #323130;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    background-color: #f3f2f1;
}

.tab-button.active {
    border-bottom: 2px solid #0078d4;
    color: #0078d4;
    font-weight: 600;
}

.tab-content {
    display: none;
    position: relative;
    min-height: 250px;
}

.tab-content.active {
    display: block;
}

.tab-content-census {
    display: none;
    position: relative;
    min-height: 250px;
}

.tab-content-census.active {
    display: block;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.loading-section .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0078d4; /* Use Microsoft blue color */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

/* Products section */
.products-section {
    margin: 20px 0;
}

.select-section, .census-type-section {
    margin-bottom: 15px;
}

/* Dropdown styles */
.ms-Dropdown {
    width: 100%;
    padding: 8px;
    border: 1px solid #8a8886;
    border-radius: 2px;
    background-color: #ffffff;
    min-height: 120px;
    font-size: 15px !important;
}

.ms-Dropdown option {
    padding: 10px;
    font-size: 15px !important;
}

/* Radio button styles */
.radio-container {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 15px !important;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 17px !important;
}

/* Button styles */
.button-group {
    margin-top: 15px;
    margin-bottom: 20px;
}

.ms-Button {
    min-width: 80px;
    padding: 4px 12px;
}

.ms-Button--primary {
    background-color: #0078d4;
    color: white;
    border: none;
    font-size: 18px;
}

.ms-Button--secondary {
    background-color: #0078d4;
    color: white;
    border: none;
    font-size: 15px;
}

.ms-Button--third {
    background-color: #ffffff;
    border: 1px solid #0078d4;
    color: #0078d4;
    font-size: 15px;
}

.ms-Button--default {
    background-color: #ffffff;
    border: 1px solid #0078d4;
    color: #0078d4;
}

/* Label styles */
.ms-Label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px !important;
}

.error-section {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    background-color: #fde7e9;
    border: 1px solid #f1707b;
    color: #d13438;
    font-weight: 600;
    font-size: 15px;
}

.error-message {
    color: #d13438;
    font-size: 15px;
    margin-top: 8px;
    margin-bottom: 8px;
    display: none;
    font-weight: 600;
    background-color: #fde7e9;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #f1707b;
}

/* Button container */
.button-container {
    margin-top: 15px;
    padding: 10px;
    text-align: right;
    background-color: #f8f9fa;
    border: 1px solid #edebe9;
    border-radius: 0 0 4px 4px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Class mapping container */
.class-mapping-container {
    margin-top: 15px;
    padding: 0 15px;
}

/* Table container with scroll */
.mapping-table {
    margin-top: 15px;
    border: 1px solid #edebe9;
    border-radius: 4px;
    max-height: 300px;    
    overflow-y: auto;     
    overflow-x: auto;     
}

/* Class mapping table styles */
.mapping-table .ms-Table {
    min-width: 400px;    
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

/* Fixed header */
.mapping-table .ms-Table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: white;
}

/* Class mapping column widths */
.mapping-table .ms-Table td:first-child,
.mapping-table .ms-Table th:first-child {
    min-width: 130px;    
    width: 130px;
}

.mapping-table .ms-Table td:nth-child(2),
.mapping-table .ms-Table th:nth-child(2) {
    min-width: 80px;
    width: 80px;
}

.mapping-table .ms-Table td:last-child,
.mapping-table .ms-Table th:last-child {
    min-width: 150px;
    width: 200px;        
}

/* Table cell styles */
.mapping-table .ms-Table td {
    padding: 6px 8px;  
    border-bottom: 1px solid #edebe9;
    font-size: 15px;   
}

.mapping-table .ms-Table th {
    padding: 6px 8px;  
    background-color: white;
    font-weight: 600;
    text-align: left;
    font-size: 15px;   
    border-bottom: 2px solid #edebe9;
}

/* Input field styles */
.mapping-table .ms-Table input {
    width: 100%;           
    padding: 4px 6px;      
    border: 1px solid #edebe9;
    border-radius: 2px;
    font-size: 15px;       
    box-sizing: border-box;
}

.mapping-table .ms-Table input:focus {
    border-color: #0078d4;
    outline: none;
}

/* Scrollbar styles */
.mapping-table::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.mapping-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mapping-table::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.mapping-table::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Census transformation response panel */
.response-panel {
    padding: 16px;
    background: white;
}


/* Census results table */
.response-panel .ms-Table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
}

.response-panel .ms-Table th,
.response-panel .ms-Table td {
    padding: 10px;
    vertical-align: top;
    border-bottom: 1px solid #edebe9;
    font-size: 15px;
}

/* Census results column widths */
.response-panel .ms-Table td:first-child,
.response-panel .ms-Table th:first-child {
    width: 25%;
    min-width: 150px;
    word-wrap: break-word;
    white-space: normal;
}

/* Census results column widths */
.response-panel .ms-Table td:last-child,
.response-panel .ms-Table th:last-child {
    width: 75%;
    word-wrap: break-word;
    min-width: 0px;
    white-space: normal;
    max-width: 200px;  /* Try increasing from 150px */
    padding-right: 25px; /* Add some right padding */
}
/* Census results header */
.response-panel .ms-Table th {
    font-weight: 600;
    background-color: white;
    border-bottom: 2px solid #edebe9;
}

/* Census transformation title */
.response-panel .title {
    font-size: 17px;  /* Reduced from 20px */
    margin-bottom: 12px;
    color: #0078d4;
}

/* Change summary section */
.change-summary {
    margin-top: 15px;
    border: 1px solid #edebe9;
    border-radius: 4px;
    background: white;
    max-height: 500px;
    overflow-y: auto;
}

.summary-header {
    background-color: white;
    padding: 10px;
    border-bottom: 1px solid #edebe9;
    margin-bottom: 12px;
    font-size: 15px;  /* Added font size */
}

.summary-header strong {
    font-size: 15px;  /* Slightly larger than regular text */
    display: block;
    margin-bottom: 8px;
}


/* Stats box */
.stats-box {
    font-weight: 600;
    color: #0078d4;
}

/* Success message */
.success-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #DFF6DD;
    color: #107C10;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Utility classes */
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-changes {
    padding: 16px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 16px;
}

/* Tab-specific content */
#class-mapping-tab .response-panel,
#class-mapping-tab #actions-panel {
    display: none !important;
}

/* Actions panel */
#actions-panel {
    margin-top: 20px;
}

/* Ensure proper spacing in both tabs */
#census-tab,
#class-mapping-tab {
    margin-top: 15px;
}

/* Hide elements when needed */
.hidden {
    display: none !important;
}

/* Validation Error Panel Styles */
.validation-error-panel {
    padding: 20px;
    background-color: #FDF3F4;
    border: 1px solid #F1707B;
    border-radius: 4px;
    margin: 15px 0;
}

.error-title {
    color: #D13438;
    font-size: 18px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.error-subtitle {
    color: #323130;
    font-size: 15px;
    margin: 0 0 15px 0;
}

.error-product-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.error-product-section {
    background: white;
    padding: 12px;
    border: 1px solid #EDEBE9;
    border-radius: 2px;
}

.error-product-name {
    color: #323130;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.error-column-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: none;
}

.error-column-list li {
    color: #605E5C;
    font-size: 15px;
    margin: 4px 0;
    position: relative;
}

.error-column-list li::before {
    content: "•";
    color: #D13438;
    position: absolute;
    left: -12px;
    font-weight: bold;
}

/* Response panel tabs */
.response-tabs {
    display: flex;
    gap: 2px;
    margin: 15px 0;
    border-bottom: 1px solid #edebe9;
}

.response-tabs .tab-button {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    color: #323130;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.response-tabs .tab-button:hover {
    background-color: #f3f2f1;
}

.response-tabs .tab-button.active {
    border-bottom: 2px solid #0078d4;
    color: #0078d4;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
.tab-content-census {
    display: none;
    margin-top: 15px;
}

.tab-content-census.active {
    display: block;
}
.validation-issues li {
    padding: 8px 12px;
    margin: 4px 0;
    background: #f3f2f1;
    border-radius: 2px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
}

.validation-issues li:hover {
    background: #edebe9;
}

.validation-issues li:active {
    background: #e1dfdd;
}

/* Add loading state */
.validation-issues li.loading {
    pointer-events: none;
    opacity: 0.7;
}

.validation-issues li.loading::after {
    content: "...";
    position: absolute;
    right: 8px;
    animation: loading 1s infinite;
}

@keyframes loading {
    0% { content: "."; }
    33% { content: ".."; }
    66% { content: "..."; }
}

/* Success feedback */
.validation-issues li.highlighted {
    background: #DFF6DD;
    color: #107C10;
}


.tab-button {
    position: relative;
}

.mapping-table .ms-Table td:first-child,
.mapping-table .ms-Table th:first-child {
    width: 50%;
}

.mapping-table .ms-Table td:last-child,
.mapping-table .ms-Table th:last-child {
    width: 50%;
}

.source-column-select {
    width: 100%;
}

.custom-mappings-divider {
    margin: 24px 0 16px 0;
    padding-top: 16px;
    border-top: 1px solid #edebe9;
}

.custom-mappings-title {
    font-size: 15px;
    font-weight: 600;
    color: #323130;
    margin: 0 0 12px 0;
}

.custom-mappings {
    margin-top: 12px;
}

.custom-mappings .ms-Table {
    border: 1px solid #edebe9;
    border-radius: 2px;
}

/* Button styling */
.ms-Button--default {
    padding: 6px 12px;
    background: white;
    border: 1px solid #0078d4;
    color: #0078d4;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 15px;
}

.ms-Button--default:hover {
    background: #f3f2f1;
}

.ms-Button-icon {
    margin-right: 8px;
    font-weight: bold;
}

.add-mapping-button-container {
    margin-top: 10px;
    padding: 5px 0;
}

.add-mapping-button {
    background: none;
    border: none;
    color: #0078d4;
    padding: 5px 0;
    cursor: pointer;
    font-size: 15px;
    text-align: left;
}

.add-mapping-button:hover {
    text-decoration: underline;
}

.missing-columns-badge {
    background-color: #ff4d4d;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 10px;
}

.column-count-badge {
    background-color: #f0f0f0;
    color: #666;
    padding: 1px 5px;
    border-radius: 10px;
    font-size: 0.7em;
    margin-left: 10px;
}

.error-action-panel {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.error-action-panel .ms-Button {
    margin-right: 10px;
}

.mapping-overrides-container {
    padding: 15px;
}

#mapping-overrides-tab .mapping-table {
    margin-top: 0;
}

.mapping-overrides-container {
    padding: 15px;
}

#mapping-overrides-tab .mapping-table {
    margin-top: 0;
    border: 1px solid #edebe9;
    border-radius: 4px;
    background: white;
}

#mapping-overrides-tab .ms-Table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#mapping-overrides-tab .ms-Table th,
#mapping-overrides-tab .ms-Table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #edebe9;
}

#mapping-overrides-tab .ms-Table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
.tab-content-census {
    display: none;
}

.tab-content-census.active {
    display: block;
}
#mapping-overrides-tab .mapping-table {
    margin-top: 0;
}

.inference-issues {
    margin-top: 10px;
}

.inference-issues li {
    padding: 8px 12px;
    margin: 4px 0;
    background: #f3f2f1;
    border-radius: 2px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
}

.inference-issues li:hover {
    background: #edebe9;
}

.inference-issues h4 {
    color: #323130;
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 8px 0;
}

.inference-issues ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.change-details {
    margin-top: 4px;
    font-size: 15px;
    color: #605e5c;
}

.old-value {
    color: #d13438;
    text-decoration: line-through;
}

.new-value {
    color: #107c10;
    font-weight: 500;
}

.inference-summary p {
    font-size: 15px;
    margin-bottom: 8px;
}

.inference-success {
    font-size: 15px;
    color: #107c10;
    padding: 12px;
    background: #DFF6DD;
    border-radius: 4px;
}

.settings-container {
    padding: 20px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 12px;
}

.setting-item {
    margin-bottom: 16px;
}

.radio-with-help {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.help-icon {
    color: #605e5c;
    cursor: help;
    padding: 4px;
    font-size: 17px;
}

.help-icon:hover {
    color: #323130;
}

.confidence-score {
    margin-top: 12px;
    margin-left: 24px;
    padding: 8px 0;
}

.confidence-score label {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    color: #605e5c;
}

.confidence-score input {
    width: 100px;
    padding: 4px 8px;
    border: 1px solid #8a8886;
    border-radius: 2px;
    font-size: 16px;
}

.confidence-score input:focus {
    border-color: #0078d4;
    outline: none;
}

.response-section {
    padding-top: 0;
}

#tab-content-container {
    min-height: 100px;
}

/* Update existing tab content rule */
.tab-content {
    display: none;
    position: relative;
}

.tab-content.active {
    display: block;
}
#tab-content-census-container {
    min-height: 100px;
}

/* Update existing tab content rule */
.tab-content-census {
    display: none;
    position: relative;
    padding-bottom: 20px;
}

.tab-content-census.active {
    display: block;
}
/* Ensure response panel stays visible */
#actions-panel {
    position: relative;
    z-index: 1;
}

.custom-tooltip {
    position: relative;
    display: inline-block;
}

.custom-tooltip .tooltip-text {
    visibility: hidden;
    background-color: #555;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    width: 250px;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.custom-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.custom-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.api-url-container {
    margin-bottom: 10px;
}

#api-url {
    width: 300px;  /* Changed from 100% */
    padding: 6px 8px;
    border: 1px solid #8a8886;
    border-radius: 2px;
    font-size: 14px;
}

.connectivity-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.connectivity-result {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #edebe9;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.connectivity-result.error {
    background-color: #fde7e9;
    border-color: #f1707b;
}

.connectivity-result.success {
    background-color: #dff6dd;
    border-color: #107c10;
}

#mapping-overrides-tab .mapping-table .ms-Table td,
#mapping-overrides-tab .mapping-table .ms-Table th {
    width: 45%;  /* Give each column equal width except for the remove button column */
}

#mapping-overrides-tab .mapping-table .ms-Table td:last-child,
#mapping-overrides-tab .mapping-table .ms-Table th:last-child {
    width: 10%;  /* Width for the remove button column */
}

/* Make both select elements full width of their cells */
.source-column-select,
.destination-column-select {
    width: 100%;
    min-width: 200px;  /* Minimum width to ensure readability */
    padding: 6px 8px;
    font-size: 15px;
}

/* Collapsible Validation Groups */
.validation-panel .issue-group {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.validation-panel .group-header {
    padding: 10px 15px;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
}

.validation-panel .group-header:hover {
    background-color: #e8e8e8;
}

.validation-panel .expand-icon {
    margin-right: 10px;
    font-size: 10px;
    transition: transform 0.2s;
}

.validation-panel .group-title {
    font-weight: bold;
    margin-right: 10px;
}

.validation-panel .group-count {
    background-color: #e0e0e0;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 10px;
}

.validation-panel .group-description {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.validation-panel .group-content {
    padding: 0 15px;
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.validation-panel .group-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.validation-panel .examples ul {
    margin: 10px 0;
    padding-left: 20px;
}

.validation-panel .examples li {
    cursor: pointer;
    padding: 5px 0;
}

.validation-panel .examples li:hover {
    text-decoration: underline;
}

.validation-panel .view-all-btn {
    background-color: transparent;
    border: 1px solid #0078d4;
    color: #0078d4;
    padding: 5px 10px;
    border-radius: 2px;
    cursor: pointer;
    margin: 5px 0 15px;
}

.validation-panel .view-all-btn:hover {
    background-color: #f0f8ff;
}

/* Modal for full list */
.issue-modal {
    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: 1000;
}

.issue-modal .modal-content {
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    background-color: white;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.issue-modal .modal-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.issue-modal .close-modal {
    font-size: 24px;
    cursor: pointer;
}

.issue-modal .modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.issue-modal .scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 15px;
}

.issue-modal .modal-body ul {
    margin: 0;
    padding-left: 20px;
}

.issue-modal .modal-body li {
    cursor: pointer;
    padding: 5px 0;
}

.issue-modal .modal-body li:hover {
    text-decoration: underline;
}

.issue-modal .modal-footer {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.issue-modal .highlight-all-btn {
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 2px;
    cursor: pointer;
}

.issue-modal .highlight-all-btn:hover {
    background-color: #106ebe;
}

/* Collapsible Validation Groups */
.validation-panel .issue-group,
.inference-panel .inference-group {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.validation-panel .group-header,
.inference-panel .group-header {
    padding: 10px 15px;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
}

.validation-panel .group-header:hover,
.inference-panel .group-header:hover {
    background-color: #e8e8e8;
}

.validation-panel .expand-icon,
.inference-panel .expand-icon {
    margin-right: 10px;
    font-size: 10px;
    transition: transform 0.2s;
}

.validation-panel .group-title,
.inference-panel .group-title {
    font-weight: bold;
    margin-right: 10px;
}

.validation-panel .group-count,
.inference-panel .group-count {
    background-color: #e0e0e0;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 12px;
    margin-right: 10px;
}

.validation-panel .group-description,
.inference-panel .group-description {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.validation-panel .group-content,
.inference-panel .group-content {
    padding: 0 15px;
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.validation-panel .group-content.collapsed,
.inference-panel .group-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.validation-panel .examples ul,
.inference-panel .examples ul,
.individual-issues,
.individual-changes {
    margin: 10px 0;
    padding-left: 20px;
}

.validation-panel .examples li,
.inference-panel .examples li,
.individual-issues li,
.individual-changes li {
    cursor: pointer;
    padding: 5px 0;
}

.validation-panel .examples li:hover,
.inference-panel .examples li:hover,
.individual-issues li:hover,
.individual-changes li:hover {
    text-decoration: underline;
}

.view-all-btn {
    background-color: transparent;
    border: 1px solid #0078d4;
    color: #0078d4;
    padding: 5px 10px;
    border-radius: 2px;
    cursor: pointer;
    margin: 5px 0 15px;
}

.view-all-btn:hover {
    background-color: #f0f8ff;
}

/* Modal improvements */
.issue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.issue-modal .modal-content {
    width: 90%;
    max-width: 700px; /* Wider modal */
    max-height: 85vh;
    min-height: 300px; /* Ensure minimum height */
    background-color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.issue-modal .modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.issue-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #323130;
}

.issue-modal .close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 8px;
}

.issue-modal .close-modal:hover {
    color: #333;
}

.issue-modal .modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: white; /* Ensure background is solid white */
    min-height: 200px; /* Minimum height for content */
}

.issue-modal .scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px;
    min-height: 100%;
}

/* Style for empty state in modals */
.issue-modal .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 20px;
    color: #605e5c;
    text-align: center;
}

.issue-modal .empty-state p {
    font-size: 16px;
    margin: 10px 0;
}

/* Increase modal height */
.issue-modal .modal-content {
    width: 90%;
    max-width: 800px; /* Slightly wider */
    max-height: 85vh; /* Increased from previous value */
    min-height: 500px; /* Significantly taller minimum height */
    background-color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Make the modal body take more space */
.issue-modal .modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: white;
    min-height: 400px; /* Ensure plenty of content space */
}

/* Make scroll area larger */
.issue-modal .scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px;
    min-height: 100%;
}

/* Adjust modal position to ensure it's centered even with larger size */
.issue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Better styling for modal items */
.issue-modal .modal-list li {
    padding: 12px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.5;
}

/* More space for header and footer */
.issue-modal .modal-header {
    padding: 18px 20px;
}

.issue-modal .modal-footer {
    padding: 18px 20px;
}

/* Ensure header text is large enough */
.issue-modal .modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

/* Improve button styling */
.issue-modal .highlight-all-btn {
    padding: 10px 24px;
    font-size: 16px;
}

.issue-modal .highlight-all-btn:hover {
    background-color: #106ebe;
}

/* Improved styling for change details */
.change-details {
    margin-top: 6px;
    font-size: 15px;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #0078d4;
}

.old-value {
    color: #d13438;
    text-decoration: line-through;
    font-weight: normal;
}

.new-value {
    color: #107c10;
    font-weight: 600;
}

/* Improved error message styling */
.error-message {
    color: #d13438;
    font-size: 15px;
    margin: 12px 0;
    padding: 12px 16px;
    display: none;
    font-weight: 600;
    background-color: #fde7e9;
    border-radius: 4px;
    border: 1px solid #f1707b;
    animation: fadeIn 0.3s ease-in-out;
}

.error-message.visible {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Add a container for error messages in the mapping table */
.mapping-errors-container {
    margin: 10px 0;
}

/* Toast notification for API errors */
.error-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fde7e9;
    color: #d13438;
    padding: 12px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 350px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Override cursor for disabled elements */
button:disabled,
select:disabled {
    cursor: not-allowed !important;
}

/* Add loading state to mapping rows */
.mapping-row-loading td {
    opacity: 0.6;
    position: relative;
}

.mapping-row-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* API error indicator */
.api-error-indicator {
    color: #d13438;
    margin-left: 8px;
    font-size: 16px;
    cursor: help;
}

.api-error-indicator:hover::after {
    content: attr(data-error);
    position: absolute;
    background: #fde7e9;
    padding: 8px 12px;
    border-radius: 4px;
    z-index: 100;
    width: 250px;
    font-size: 14px;
    top: -30px;
    left: 20px;
}

#waiting-timer {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
    font-family: monospace;
}

#connection-warning {
    color: #ff9900;
    margin-top: 5px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.timeout-setting {
    margin-bottom: 8px;
}

.timeout-setting input {
    width: 80px;
    padding-bottom: 8px;
    border: 1px solid #8a8886;
    border-radius: 2px;
    font-size: 16px;
}

.timeout-setting input:focus {
    border-color: #0078d4;
    outline: none;
}

/* Sheet positioning specific styles */
.settings-section .radio-container[style*="flex-direction: column"] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.settings-section .radio-container[style*="flex-direction: column"] .radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 15px !important;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.settings-section .radio-container[style*="flex-direction: column"] .radio-label:last-child {
    border-bottom: none;
}

.settings-section .radio-container[style*="flex-direction: column"] .radio-label input[type="radio"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Ensure proper spacing for sheet positioning section */
.settings-section h3 + .setting-item {
    margin-top: 10px;
}

/* Highlight selected sheet position option */
.settings-section .radio-container .radio-label:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
}

.settings-section .radio-container .radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #0078d4;
}

/* Better visual separation between settings sections */
.settings-section {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edebe9;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}