/* Preserve existing styles from the original app.css */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.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;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* === AUTO-SAVE STATUS STYLING WITH EMOJI SUPPORT === */
.auto-save-status {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    /* EMOJI SUPPORT: Comprehensive font stack for Unicode emoji */
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    /* Ensure emoji characters render properly */
    unicode-bidi: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-feature-settings: "liga" on, "kern" on;
    font-feature-settings: "liga" on, "kern" on;
}

.auto-save-status.success {
    background-color: #d1f2d1;
    color: #0d5016;
    border: 1px solid #4caf50;
}

.auto-save-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f44336;
}

.auto-save-status.saving {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #2196f3;
}

/* === LOADING OVERLAY STYLING === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Preserve Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    /* EMOJI SUPPORT for error UI */
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
        /* Ensure the X emoji renders correctly */
        font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI', system-ui, sans-serif;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMtNTc2IDg2LjA1NDdDNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
/* Preserve Blazor Loading Progress (Hourglass) */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }
/* Preserve Blazor default styles for code blocks */
code {
    color: #c02d76;
}

/* ========================================= */
/* CESIUM CONTROLS VISIBILITY FIXES */
/* ========================================= */

/* High specificity selectors to override MudBlazor and other frameworks */
body .cesium-viewer .cesium-viewer-toolbar,
body .cesium-viewer .cesium-viewer-bottom,
body .cesium-viewer .cesium-toolbar-button,
body .cesium-viewer .cesium-button,
body .cesium-viewer .cesium-home-button,
body .cesium-viewer .cesium-sceneModePicker-wrapper,
body .cesium-viewer .cesium-navigationHelpButton-wrapper,
body .cesium-viewer .cesium-viewer-geocoderContainer,
body .cesium-viewer .cesium-baseLayerPicker-wrapper,
body .cesium-viewer .cesium-viewer-fullscreenContainer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10000 !important;
    position: absolute !important;
}

/* Fix for the toolbar positioning */
body .cesium-viewer-toolbar {
    top: 5px !important;
    right: 5px !important;
}

/* Ensure the container allows overflow for tooltips and dropdowns */
body .cesium-viewer {
    overflow: visible !important;
}

/* Fix for the baseLayerPicker dropdown */
body .cesium-baseLayerPicker-dropDown {
    z-index: 10001 !important;
}

/* Fix for geocoder results */
body .cesium-geocoder-searchResults {
    z-index: 10002 !important;
}

/* Make sure buttons have hover states */
body .cesium-button:hover {
    color: #fff !important;
    background: #48b !important;
    border-color: #aef !important;
}

/* Fix any conflicts with MudBlazor that might be hiding Cesium controls */
.mud-drawer {
    z-index: 1000 !important; /* Lower than Cesium controls */
}

.mud-overlay {
    z-index: 999 !important; /* Lower than Cesium controls */
}

/* Custom styling for our backup controls */
.custom-cesium-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9999;
    background-color: rgba(38, 38, 38, 0.75);
    padding: 5px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

    .custom-cesium-controls button {
        width: 32px;
        height: 32px;
        margin: 2px;
        color: white;
        background: rgba(80, 80, 80, 0.75);
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        outline: none;
    }

        .custom-cesium-controls button:hover {
            background-color: rgba(120, 120, 120, 0.9) !important;
        }

        .custom-cesium-controls button:active {
            background-color: rgba(140, 140, 140, 0.9) !important;
        }

/* Map container styling */
.map-section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-container {
    width: 100%;
    height: 600px;
    position: relative;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

#google-map-container,
#cesium-map-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.toggle-container {
    display: flex;
    margin-bottom: 10px;
}

.map-toggle-button {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

    .map-toggle-button:first-child {
        border-radius: 4px 0 0 4px;
    }

    .map-toggle-button:last-child {
        border-radius: 0 4px 4px 0;
    }

    .map-toggle-button.active {
        background-color: #1b6ec2;
        color: white;
        border-color: #1861ac;
    }

.pdf-viewer-container {
    width: 100%;
    height: 800px;
    display: flex;
    flex-direction: column;
}

    .pdf-viewer-container iframe {
        flex-grow: 1;
        border: none;
        background-color: #f7f7f7;
    }
/* ========================================= */
/* MUDBLAZOR AUTOCOMPLETE STYLING - SearchTabRefactored.razor */
/* ========================================= */

/* MudBlazor Custom Styles - Sunken Input with Yellow L-Border */
.custom-mud-autocomplete {
    width: 100% !important;
    height: 32px !important;
    border: none !important;
    border-right: 2px solid #FFD700 !important;
    border-bottom: 2px solid #FFD700 !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    background-color: white !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.sunken-input.custom-mud-autocomplete {
    background-color: white !important;
}

.sunken-input.custom-mud-autocomplete .mud-input-control {
    background-color: white !important;
}

.sunken-input.custom-mud-autocomplete .mud-input-control-input-container {
    background-color: white !important;
}

.sunken-input.custom-mud-autocomplete .mud-input {
    background-color: white !important;
    color: black !important;
}

.sunken-input.custom-mud-autocomplete .mud-input-slot {
    background-color: white !important;
    color: black !important;
}

.sunken-input.custom-mud-autocomplete input {
    background-color: white !important;
    color: black !important;
}

.sunken-input.custom-mud-autocomplete input::placeholder {
    color: #999 !important;
}

.mud-select.mud-autocomplete.custom-mud-autocomplete {
    border: 2px solid #FFD700 !important;
    border-radius: 4px !important;
    height: 32px !important;
    display: flex !important;
    align-items: stretch !important;
    background-color: white !important;
    padding: 0 !important;
}

.custom-mud-autocomplete .mud-input-control {
    background-color: white !important;
    border: none !important;
    border-radius: 0 !important;
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
}

.custom-mud-autocomplete .mud-input-control-input-container {
    height: 100% !important;
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    padding: 0 !important;
}

.custom-mud-autocomplete .mud-input {
    background-color: white !important;
    border: none !important;
    border-radius: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    flex: 1 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.custom-mud-autocomplete .mud-input-underline {
    background-color: white !important;
}

.custom-mud-autocomplete .mud-input-underline::before,
.custom-mud-autocomplete .mud-input-underline::after {
    display: none !important;
}

.custom-mud-autocomplete .mud-input-root {
    background-color: white !important;
    border: none !important;
    height: 100% !important;
}

.custom-mud-autocomplete .mud-input-slot {
    background-color: white !important;
    color: black !important;
    border: none !important;
    height: 100% !important;
    padding: 6px 8px !important;
    margin: 0 !important;
}

input[id="number-input"],
input[id="street-input"],
input[id="town-input"],
input[id="section-input"],
input[id="block-input"],
input[id="lot-input"],
input[id="owner-name-input"] {
    background-color: white !important;
    color: black !important;
    border: none !important;
    padding: 6px 8px !important;
    height: 100% !important;
    box-shadow: none !important;
}

.custom-mud-autocomplete .mud-input-adornment {
    color: #808080 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.custom-mud-autocomplete .mud-input-adornment-end {
    border-radius: 0 !important;
    border: none !important;
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.custom-mud-autocomplete .mud-icon-button {
    padding: 0 8px !important;
    height: 100% !important;
    width: auto !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
}

.custom-mud-autocomplete .mud-icon-button:hover {
    background-color: rgba(255, 215, 0, 0.1) !important;
}

.custom-mud-autocomplete .mud-icon-size-medium {
    font-size: 1.1rem !important;
}

.mud-popover {
    z-index: 1500;
}

.mud-list {
    padding: 0 !important;
    width: 100% !important;
    min-width: 300px !important;
    background-color: white !important;
    border: 2px solid #FFD700 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.mud-list-item {
    padding: 8px 16px !important;
    width: 100% !important;
    white-space: nowrap !important;
    background-color: white !important;
}

.mud-list-item:hover {
    background-color: #f0f0f0 !important;
}

/* ========================================= */
/* SEARCH RESULTS GRID STYLING - SearchResultsGrid.razor */
/* ========================================= */

.glossy-blue-header {
    font-size: 11px;
}

/* Grid header styling */
.glossy-blue-header .k-grid-header {
    background: linear-gradient(to bottom, #6bb7f3, #1e73be) !important;
}

.glossy-blue-header .k-grid-header-table {
    background: linear-gradient(to bottom, #6bb7f3, #1e73be) !important;
}

/* Header cells - Apply blue gradient to TH elements */
.glossy-blue-header .k-table-th {
    background: linear-gradient(to bottom, #6bb7f3, #1e73be) !important;
    color: white !important;
    font-weight: bold !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 10px !important;
    text-align: left !important;
    vertical-align: middle !important;
}

/* Header cells - also target k-header class used by Telerik */
.glossy-blue-header .k-header {
    background: linear-gradient(to bottom, #6bb7f3, #1e73be) !important;
    color: white !important;
    font-weight: bold !important;
}

/* Round the first cell */
.glossy-blue-header .k-table-th:first-child {
    border-top-left-radius: 20px !important;
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Round the last cell */
.glossy-blue-header .k-table-th:last-child {
    border-top-right-radius: 20px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Ensure text in header is white */
.glossy-blue-header .k-table-th .k-link,
.glossy-blue-header .k-table-th .k-column-title,
.glossy-blue-header .k-header .k-link,
.glossy-blue-header .k-header .k-column-title {
    color: white !important;
    text-align: left !important;
}

/* Data cells */
.glossy-blue-header .k-table-td {
    padding: 2px 8px !important;
    text-align: left !important;
}

/* Row height */
.glossy-blue-header .k-table-row {
    height: 20px !important;
}

/* Alternating row colors */
.glossy-blue-header .k-grid-content tbody tr:nth-child(even) {
    background: #f9f9f9 !important;
}

/* ========================================= */
/* VOICE INPUT BUTTON ANIMATION */
/* ========================================= */

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
}