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

/* The map page is a fixed-viewport app shell: the document itself must not
   scroll, so wheel gestures reach the map canvas as zoom instead of page
   scroll. Set by MainLayout on the /map route only — every other page keeps
   normal document scrolling. */
html.map-shell,
html.map-shell body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI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Zz48L3N2Zz4=) 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;
}

code {
    color: #c02d76;
}

/* Hide NavMenu only when the layout has the map-page class */
/* Collapse MainLayout sidebar entirely on map page */
.map-page .sidebar {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove ALL padding/margin from MainLayout's article wrapper on map page */
.map-page article.content {
    padding: 0 !important;
    margin: 0 !important;
}
/* ============================================================
   Image-review carousel (ImageCarouselComp).
   Lives here, in a plain host-linked stylesheet, on purpose:
   the scoped-CSS bundle can go stale independently of the WASM
   assembly, and an embedded <style> element is blocked by any
   Content-Security-Policy without style-src 'unsafe-inline'.
   All selectors are gk-carousel- prefixed: Bootstrap owns the bare
   carousel-* namespace (.carousel-item is display:none, float:left,
   margin-right:-100% - which stacked every tile into the same spot).
   ============================================================ */

.gk-carousel-panel {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: 3px solid #22A65B;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    margin-top: 10px;
    /* The map page is a fixed-height flex column with overflow:hidden, so the
       panel must assert its own height or the thumbnail row collapses to zero
       and only the header stays visible. One fixed height for every state
       (loading note, scene/NDVI strip, LiDAR tab): any change in the panel's
       height resizes the map canvas above it, which repaints the map and
       refetches basemap tiles. Sized to header + tab row + 6.75rem strip. */
    flex: 0 0 auto;
    height: 12.1rem;
    overflow: hidden;
}

.gk-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.gk-carousel-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.gk-carousel-count {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #888;
}

.gk-carousel-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gk-carousel-band-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-right: 0.25rem;
}

.gk-carousel-band {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    margin: 0;
}

.gk-carousel-band input {
    accent-color: #22A65B;
    cursor: pointer;
    margin: 0;
}

.gk-carousel-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #22A65B;
    cursor: pointer;
}

.gk-carousel-link:hover {
    text-decoration: underline;
}

.gk-carousel-rerun {
    background-color: #22A65B;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.gk-carousel-rerun:hover:not(:disabled) {
    background-color: #1a7d45;
}

.gk-carousel-rerun:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Capture years, NDVI composites, and the selected run's LiDAR. */
.gk-carousel-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
}

.gk-carousel-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 3px 3px 0 0;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    /* Overlap the row's border so the active tab reads as attached to it. */
    margin-bottom: -1px;
}

.gk-carousel-tab:hover {
    color: #22A65B;
}

.gk-carousel-tab-on {
    color: #22A65B;
    background-color: #fff;
    border-color: #ddd;
    border-bottom: 1px solid #fff;
}

.gk-carousel-tab-count {
    font-size: 0.65rem;
    font-weight: 400;
    color: #888;
}

.gk-carousel-note {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    padding: 0.5rem 0;
}

.gk-carousel-body {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 0;
    /* Tall enough for a thumbnail plus its caption; without an explicit height
       this row can be squeezed flat by the page's fixed-viewport layout. */
    height: 6.75rem;
    /* Shrinks (never grows the panel) when the tab row wraps to two lines. */
    min-height: 0;
    flex: 0 1 auto;
}

.gk-carousel-arrow {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 4.5rem;
    font-size: 1.4rem;
    line-height: 1;
    color: #666;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.gk-carousel-arrow:hover {
    background-color: #e8f5ed;
    color: #22A65B;
    border-color: #22A65B;
}

.gk-carousel-lidar {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    /* Scrolls inside the fixed-height panel instead of growing it. */
    min-height: 0;
    flex: 0 1 auto;
    overflow-y: auto;
}
.gk-carousel-lidar p { margin: 0 0 0.5rem; }
.gk-carousel-lidar-status { font-weight: 600; }
.gk-carousel-lidar-choice { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0 0.35rem; }
.gk-carousel-lidar-preview {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.35rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}
.gk-carousel-lidar-preview:focus-visible { outline: 2px solid #247849; outline-offset: 2px; }

.gk-carousel-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    flex: 1;
    min-width: 0;
    padding-bottom: 0.25rem;
    /* Tiles are absolute-free flex children, so the track needs its own height:
       inside the map page's fixed-height column it otherwise collapses (to ~4px,
       just the padding) and the thumbnails render but are invisible. */
    height: 6.75rem;
    min-height: 6.75rem;
    align-items: flex-start;
}

/* Keep the visual space inside each tile's hover area, with no dead gap
   between neighbors that can flash the map back to its zones preview. */
.gk-carousel-slot {
    flex: 0 0 auto;
    padding-right: 0.5rem;
    cursor: pointer;
}

.gk-carousel-item {
    position: relative;
    flex: 0 0 auto;
    width: 5.5rem;
    min-width: 5.5rem;
    /* Explicit height so the tile never depends on the parent for sizing. */
    height: 6.25rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 2px solid #22A65B;
    border-radius: 3px;
    padding: 2px;
    background-color: #f0faf4;
    transition: opacity 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.gk-carousel-item-off {
    border-color: #ccc;
    background-color: #fafafa;
    opacity: 0.45;
}

.gk-carousel-slot:hover .gk-carousel-item {
    border-color: #1a7d45;
}

.gk-carousel-thumb {
    display: block;
    width: 100%;
    height: 4.5rem;
    min-height: 4.5rem;
    flex: 0 0 4.5rem;
    object-fit: cover;
    border-radius: 2px;
    background-color: #eee;
}

.gk-carousel-thumb-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #aaa;
    font-style: italic;
}

.gk-carousel-caption {
    font-size: 0.65rem;
    color: #555;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 2px;
    flex: 0 0 auto;
}

.gk-carousel-check {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Pricing, Terms of Use, Privacy Policy and Refund Policy pages */
.legal-page {
    max-width: 52rem;
    line-height: 1.6;
}
.legal-page .pricing-table th:nth-child(2),
.legal-page .pricing-table td:nth-child(2) { white-space: nowrap; }
.legal-page h1 { font-size: 1.75rem; margin-bottom: 1rem; }
.legal-page h2 { font-size: 1.2rem; margin-top: 1.75rem; }
.legal-page h3 { font-size: 1rem; margin-top: 1.25rem; }
.legal-page address { font-style: normal; }
