/* assets/style.css */
.modern-checklist {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.modern-checklist label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 0;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #3d3d3f;  /* Changed to darker grey */
    background-color: transparent;
}
.modern-checklist label:hover {
    background-color: rgba(0, 122, 255, 0.08);
}
.modern-checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-color: white;
    border: 2px solid #d2d2d7;
    border-radius: 6px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.modern-checklist input[type="checkbox"]:checked {
    background-color: #007AFF;
    border-color: #007AFF;
}
.modern-checklist input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
#confirm-button:hover {
    background-color: #0051D5 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3) !important;
}
#confirm-button:active {
    transform: translateY(0);
}
/* Territory container styling */
#territory-container {
    margin-left: 24px;
    margin-top: 8px;
    padding: 12px;
    background-color: rgba(245, 245, 247, 0.5);
    border-radius: 8px;
    border-left: 3px solid #007AFF;
}
#territory-container .modern-checklist {
    margin-bottom: 0;
}
#territory-container label {
    font-size: 14px;
    color: #3c3c43;
}

/* Override Dash Loading component's default white overlay */
#map-loading {
    background-color: transparent !important;
    pointer-events: none !important;
}

#map-loading > div {
    background-color: transparent !important;
}

/* Target the overlay div that Dash creates */
#map-loading > div > div {
    background-color: transparent !important;
}

/* Specific targeting for the loading overlay */
._dash-loading-callback {
    background-color: transparent !important;
    opacity: 1 !important;
}

/* Keep the spinner visible with a semi-transparent white background */
#map-loading .dash-spinner {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
}

/* Ensure map stays visible during loading */
#map-loading._dash-loading {
    visibility: visible !important;
    background-color: transparent !important;
}

#map-loading._dash-loading .dash-graph {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any default loading styles */
#map-loading._dash-loading > div {
    background-color: transparent !important;
}

/* Animation for spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Force the graph to stay visible even when Dash tries to hide it */
#map-loading._dash-loading #interactive-map {
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
}

/* Target the graph container more specifically */
#map-loading._dash-loading .js-plotly-plot {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override Dash's default loading behavior */
._dash-loading {
    opacity: 1 !important;
}

._dash-loading-callback {
    opacity: 1 !important;
    background-color: transparent !important;
}

/* Force the loading container to be transparent */
#map-loading._dash-loading::before {
    background-color: transparent !important;
}
/* Reduce vertical spacing between country options - MORE AGGRESSIVE */
.modern-checklist {
    display: flex;
    flex-direction: column;
    gap: 0px !important;
}

.modern-checklist label {
    display: flex;
    align-items: center;
    padding: 6px 12px !important;  /* Reduced from 8px 16px */
    margin: 0 !important;
    margin-bottom: 2px !important;  /* Small gap between items */
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #3d3d3f;
    background-color: transparent;
}

/* Even tighter for territories */
.territory-checklist label {
    padding: 4px 10px !important;
    font-size: 14px;
    margin-bottom: 1px !important;
}

/* Reduce container padding too */
#dynamic-country-list > div {
    margin-bottom: 0px !important;
}
/* ADD THESE NEW RULES TO YOUR EXISTING style.css */

/* Target the actual overlay div that Dash creates */
#map-loading > div[style*="visibility"] {
    background-color: transparent !important;
}

/* Target any div with opacity styling */
#map-loading div[style*="opacity"] {
    background-color: transparent !important;
}

/* Force the graph container to stay visible */
.js-plotly-plot {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Target the dash loading overlay more specifically */
#map-loading > div > div {
    background-color: transparent !important;
}

/* Ensure the map container itself stays visible */
#map-loading .dash-graph {
    opacity: 1 !important;
    visibility: visible !important;
    background-color: transparent !important;
}

/* Override inline styles that Dash might add */
#map-loading[data-dash-is-loading="true"] {
    visibility: visible !important;
}

#map-loading[data-dash-is-loading="true"] > .dash-graph {
    visibility: visible !important;
    opacity: 1 !important;
}
/* Ensure the user identification modal is always on top */
#user-id-modal {
    z-index: 10000 !important;  /* Higher than the loading spinner */
}

/* Keep the loading spinner below modals */
#map-loading .dash-spinner {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    padding: 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 2000 !important;  /* Lower than modals which are at 2100+ */
}
/* Add to your assets/style.css or in a html.Style component */
.modern-checklist input[type="checkbox"] {
    will-change: transform;
    transition: none !important;
}

.modern-checklist label {
    transition: background-color 0.1s ease !important;
}