.explore-dialog, .search-dialog, .filters-dialog { color: #31504f; background: white; box-shadow: 0 14px 42px rgb(25 48 43 / 20%); }
[hidden] { display: none !important; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 5px; color: #16776f; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.dialog-heading h2 { margin: 0; color: #183438; font-size: 21px; font-weight: 750; letter-spacing: -.035em; }
.panel-close, .drawer-close { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 9px; color: #718780; background: #f1f5f1; font-size: 21px; line-height: 1; cursor: pointer; }
.panel-close:hover, .drawer-close:hover { color: #244542; background: #e8f0ea; }
.place-search { margin-top: 0; }
.place-search label, .radius-control, .filter-controls > label:not(.check-control) { display: block; margin-bottom: 7px; color: #31504f; font-size: 12px; font-weight: 700; }
.place-input-row { display: flex; gap: 7px; }
.place-search input, .filter-controls select, .radius-control select { min-width: 0; padding: 10px 11px; border: 1px solid #dce5df; border-radius: 9px; color: #193c3b; background: white; font-size: 13px; }
.place-search input { flex: 1; }
.place-input-row button { flex: 0 0 auto; min-height: 0; padding: 8px 10px; color: white; background: #167b72; font-size: 11px; }
.place-search p, .panel-disclaimer { margin: 7px 0 0; color: #71847d; font-size: 11px; line-height: 1.45; }
.place-suggestions { display: grid; gap: 3px; margin: 6px 0 0; padding: 0; list-style: none; }
.place-suggestions button { width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; color: #31504f; background: #f2f7f3; text-align: left; cursor: pointer; }
.location-summary:not(:empty) { margin-top: 15px; padding: 10px 12px; border-radius: 10px; color: #315451; background: #edf5ef; font-size: 12px; font-weight: 650; }
.radius-control { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 0; }
.radius-control select { padding: 6px 9px; }
.nearby-status { margin: 13px 0 7px; color: #71847d; font-size: 12px; line-height: 1.45; }
.nearby-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.nearby-list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid #e3ebe4; border-radius: 10px; color: #244542; background: #fbfcfb; text-align: left; cursor: pointer; }
.nearby-list button:hover, .nearby-list button:focus-visible { border-color: #b5d5c9; background: #edf5ef; }
.nearby-list small { flex: 0 0 auto; color: #71847d; font-size: 11px; }
.panel-disclaimer { margin-top: 14px; padding-top: 11px; border-top: 1px solid #e8eee9; }

.explore-dialog, .search-dialog, .filters-dialog { width: min(470px, calc(100% - 32px)); max-height: min(80vh, 720px); overflow: auto; padding: 20px; border: 1px solid #dce5df; border-radius: 18px; }
.explore-dialog::backdrop, .search-dialog::backdrop, .filters-dialog::backdrop { background: rgb(18 39 37 / 35%); backdrop-filter: blur(2px); }
.dialog-heading { align-items: center; margin-bottom: 15px; }
.dialog-heading h2 { font-size: 19px; }
.watercourse-search { position: relative; }
.search-label { display: block; margin-bottom: 8px; color: #31504f; font-size: 12px; font-weight: 700; }
.search-field { position: relative; display: flex; height: 48px; align-items: center; border: 1px solid #dce5df; border-radius: 12px; background: white; transition: border-color .18s, box-shadow .18s; }
.search-field:focus-within { border-color: #38948a; box-shadow: 0 0 0 3px rgb(56 148 138 / 12%); }
.search-field svg { width: 19px; height: 19px; margin-left: 14px; fill: none; stroke: #82958f; stroke-linecap: round; stroke-width: 1.7; }
.search-field input { width: 100%; min-width: 0; height: 100%; padding: 0 14px 0 11px; border: 0; outline: 0; color: #193c3b; background: transparent; font-size: 14px; }
.search-field input::placeholder { color: #a1b0aa; }
.search-help { margin: 8px 1px 0; color: #82938d; font-size: 11px; }
.search-spinner { display: none; width: 15px; height: 15px; margin-right: 14px; border: 2px solid #dbe8e1; border-top-color: #157b72; border-radius: 50%; animation: spin .7s linear infinite; }
[data-loading="show"] { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-results { display: grid; gap: 5px; max-height: 45vh; margin: 11px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.search-result { display: flex; width: 100%; align-items: center; padding: 11px 12px; border: 1px solid transparent; border-radius: 11px; color: #244542; background: transparent; text-align: left; cursor: pointer; }
.search-result:hover, .search-result.is-selected { border-color: #d7e7df; background: #edf5ef; }
.result-icon { display: grid; flex: 0 0 30px; height: 30px; place-items: center; margin-right: 11px; border-radius: 9px; color: #14776f; background: #deeee6; font-size: 17px; }
.result-copy { display: grid; min-width: 0; gap: 3px; }
.result-copy strong { overflow: hidden; color: #244542; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.result-copy small { color: #8a9c95; font-size: 10px; }
.result-arrow { margin-left: auto; color: #89a19b; font-size: 21px; }
.empty-results { padding: 13px; border-radius: 10px; color: #667c76; background: #eef3ef; font-size: 13px; }

.filter-controls { display: grid; gap: 16px; }
.filter-controls select { display: block; width: 100%; margin-top: 6px; }
.check-control, .optional-layer-options label { display: flex; align-items: center; gap: 7px; color: #526c65; font-size: 12px; }
.filter-controls input { accent-color: #187b75; }
.optional-layers { padding-top: 13px; border-top: 1px solid #e6ede8; }
.optional-layers summary { color: #315d57; font-size: 12px; font-weight: 700; cursor: pointer; }
.optional-layer-options { display: grid; gap: 10px; padding: 12px 2px 1px; }
.optional-layer-options label { flex-wrap: wrap; }
.layer-availability { color: #8c9d96; font-size: 10px; }
.optional-layer-options p, .regulatory-unavailable { margin: 0; color: #71827c; font-size: 11px; line-height: 1.45; }
.regulatory-unavailable { padding: 10px; border-radius: 9px; background: #f5f7f5; }
.map-status { position: absolute; z-index: 700; top: 70px; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); margin: 0; padding: 10px 14px; border: 1px solid #edd6b1; border-radius: 9px; color: #694d1c; background: #fff8e9; box-shadow: 0 5px 16px rgb(30 48 40 / 12%); font-size: 12px; }

@media (max-width: 800px) {
    .place-input-row { flex-direction: column; }
    .place-input-row button { width: 100%; }
    .explore-dialog, .search-dialog, .filters-dialog { position: fixed; right: 0; bottom: 0; left: 0; width: 100%; max-width: none; max-height: 82dvh; margin: auto 0 0; padding: 20px 18px max(22px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
}

@media (max-height: 760px) and (min-width: 801px) {
    .explore-dialog { max-height: calc(100% - 145px); padding: 16px; }
}
