:root {
    --edge-gap: 0.75rem;
    --logo-size: 4.5rem;
}

html,
body {
    margin: 0;
    height: 100%;
}

arcgis-map {
    display: block;
    width: 100%;
    height: 100%;
}

/* County seal in the top-left corner, as in papa_map. */
.county-logo {
    position: absolute;
    top: var(--edge-gap);
    left: var(--edge-gap);
    z-index: 10;
    width: var(--logo-size);
    height: var(--logo-size);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ----- Result box (under the basemap switch) ----- */

.result-box {
    width: min(16rem, calc(100vw - 6rem));
    padding: 0.6rem 0.75rem 0.75rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #202124;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

.result-box[hidden] {
    display: none;
}

.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.result-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5f6368;
}

.result-close {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: -0.35rem;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #5f6368;
    cursor: pointer;
}

.result-close:hover,
.result-close:focus-visible {
    background: #f1f3f4;
}

.result-address {
    margin: 0 0 0.2rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Parcel number of the highlighted parcel. */
.result-parcel {
    margin: 0 0 0.6rem;
    font-size: 0.8rem;
    color: #5f6368;
    font-variant-numeric: tabular-nums;
}

/* Inside / outside badge. */
.result-status {
    display: inline-block;
    margin: 0;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.result-status.is-inside {
    background: #e6f4ea;
    color: #137333;
}

.result-status.is-outside {
    background: #fce8e6;
    color: #a50e0e;
}

.result-status.is-pending {
    background: #f1f3f4;
    color: #5f6368;
}

/* Status badge on the left, Street View link on the right. */
.result-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.result-streetview {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid #dadce0;
    border-radius: 999px;
    color: #1a73e8;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.result-streetview[hidden] {
    display: none;
}

.result-streetview:hover,
.result-streetview:focus-visible {
    background: #e8f0fe;
    border-color: #1a73e8;
}

/* Sits to the right of the logo, centred on it. The map's top-left corner
   already insets its contents by --corner-inset, so the margins subtract it
   to line up with the logo's --edge-gap. */
arcgis-search {
    --corner-inset: 1rem;
    --search-height: 2.75rem; /* Calcite's "l" scale, set in map.js */
    width: min(30rem, calc(100vw - var(--logo-size) - 6.25rem));
    margin-left: calc(var(--edge-gap) + var(--logo-size) + 0.5rem - var(--corner-inset));
    margin-top: calc(var(--edge-gap) + (var(--logo-size) - var(--search-height)) / 2 - var(--corner-inset));
    background: transparent;
    box-shadow: none;

    /* Rounded box with a soft shadow, matching papa_map's search bar.
       These Calcite variables reach the input inside the component. */
    --calcite-autocomplete-input-corner-radius: 0.75rem;
    --calcite-autocomplete-input-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    --calcite-autocomplete-corner-radius: 0.75rem;
}
