html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}/* 
Geographic Analytics Styles */
.geographic-chart-container {
    position: relative;
    height: 369px;
}

.map-popup {
    min-width: 200px;
}

.map-popup h6 {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.map-popup p {
    margin-bottom: 4px;
    font-size: 0.9em;
}

.geographic-filters .btn-group .btn {
    font-size: 0.8em;
    padding: 0.25rem 0.5rem;
}

.city-breakdown-table .table th {
    font-size: 0.85em;
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.city-breakdown-table .table td {
    font-size: 0.9em;
    vertical-align: middle;
}

.geographic-stats-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.geographic-stats-summary .stat-item {
    text-align: center;
}

.geographic-stats-summary .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.geographic-stats-summary .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.leaflet-container {
    border-radius: 8px;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.geographic-component-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.geographic-component-loading .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .geographic-chart-container {
        height: 250px;
    }
    
    .geographic-stats-summary .stat-value {
        font-size: 1.5rem;
    }
    
    .city-breakdown-table .table-responsive {
        font-size: 0.85em;
    }
    
    .leaflet-container {
        height: 300px !important;
    }
}

/* Chart legend positioning */
.geographic-chart-container .chart-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* Filter badge styles */
.filter-badge {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Country/City selection highlighting */
.geographic-filters .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Map controls styling */
.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.map-controls .btn-group .btn {
    font-size: 0.8em;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.map-controls .btn-group .btn:hover {
    background: rgba(255, 255, 255, 1);
}/* Geog
raphic Statistics Styles */
.geographic-stats .card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.geographic-stats .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.geographic-stats .text-center h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.geographic-stats .text-muted {
    font-size: 0.875rem;
}

/* Map popup styles */
.map-popup h6 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.map-popup p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.map-popup small {
    color: #6c757d;
}

/* Country stats table */
.country-stats-table .badge {
    font-size: 0.75rem;
}

.country-stats-table td {
    vertical-align: middle;
}

.country-stats-table .text-truncate {
    max-width: 150px;
}

/* Chart containers */
.geographic-chart-container {
    position: relative;
    height: auto; /* Let the card determine the height */
    min-height: 400px; /* Minimum height to ensure proper display */
    max-height: 500px; /* Prevent infinite growth */
    overflow: hidden; /* Prevent content overflow */
    z-index: 1; /* Ensure charts stay above maps */
}

.geographic-chart-container .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.geographic-chart-container .card-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.geographic-chart-container canvas {
    max-height: 320px; /* Adjusted to fit within card body */
    max-width: 100%;
    height: auto !important;
    width: auto !important;
}

/* Prevent infinite growth of chart canvases */
canvas {
    max-height: 400px !important;
    overflow: hidden;
}

/* Specific rules for visit frequency chart */
#visitFrequencyChart {
    max-height: 300px !important;
    max-width: 100% !important;
}

/* Map containers - Critical for preventing overlaps */
.map-container {
    position: relative;
    overflow: hidden;
    z-index: 0; /* Keep maps below other content */
    isolation: isolate; /* Create new stacking context */
}

.map-container .leaflet-container {
    position: relative !important; /* Override Leaflet's absolute positioning */
    width: 100% !important;
    height: 400px !important;
    z-index: 0;
}

/* Specific map containers */
.unique-visitor-map-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    z-index: 0;
    isolation: isolate;
}

.interactive-map-container {
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    z-index: 0;
    isolation: isolate;
}

/* Ensure Leaflet popups don't interfere */
.leaflet-popup-pane {
    z-index: 1000 !important;
}

.leaflet-control-container {
    z-index: 1000 !important;
}

/* Equal height for geographic chart containers */
.geographic-charts-row {
    display: flex;
    align-items: stretch;
}

.geographic-charts-row .col-md-6 {
    display: flex;
}

.geographic-charts-row .geographic-chart-container {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .geographic-stats .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .geographic-chart-container {
        min-height: 300px;
        margin-bottom: 1rem;
    }
    
    .geographic-chart-container canvas {
        max-height: 250px;
    }
    
    .country-stats-table {
        font-size: 0.875rem;
    }
    
    .country-stats-table .text-truncate {
        max-width: 100px;
    }
    
    /* Mobile map adjustments */
    .map-container .leaflet-container {
        height: 300px !important;
    }
    
    .unique-visitor-map-container,
    .interactive-map-container {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile: stack charts vertically */
    .geographic-charts-row {
        flex-direction: column;
    }
}

/* Ensure proper stacking order on all screen sizes */
@media (min-width: 769px) {
    .geographic-chart-container {
        margin-bottom: 1rem;
    }
}