/* AzoresAtlas map */
.aza-wrap { --aza-accent: #0f766e; position: relative; margin: 0 0 2rem; font-family: inherit; }
.aza-map { width: 100%; min-height: 420px; border-radius: 14px; overflow: hidden; background: #e8f1f2; box-shadow: 0 2px 14px rgba(0,0,0,.08); }

/* Search floats over the top of the map; map's top-left controls sit underneath it */
/* One symmetric bar across the top: [Filters] [search] [Near me] — same height, equal side margins */
.aza-map .aza-toolbar { --tb-h: 44px; position: absolute; z-index: 4; top: 12px; left: 12px; right: 12px; margin: 0;
  display: flex; align-items: stretch; gap: 8px; max-width: 760px; margin-inline: auto; }
.aza-searchbox { position: relative; flex: 1 1 auto; min-width: 0; }
.aza-map .aza-search { height: var(--tb-h); border: 0; box-shadow: 0 2px 10px rgba(20,24,27,.18); }
.aza-tb-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: var(--tb-h);
  width: 122px; padding: 0 .8rem; border: 0; /* equal widths keep the bar symmetric */ border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700;
  background: #fff !important; color: #1d2327 !important; box-shadow: 0 2px 10px rgba(20,24,27,.18); transition: transform .12s, box-shadow .12s; }
.aza-tb-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(20,24,27,.22); }
.aza-tb-btn:focus-visible { outline: 2px solid var(--aza-accent); outline-offset: 2px; }
.aza-map .maplibregl-ctrl-top-right { top: 64px; } /* zoom etc. sit below the bar */
.aza-map .maplibregl-ctrl-bottom-left, .aza-map .maplibregl-ctrl-bottom-right { bottom: var(--chips-h, 0px); }
.aza-search { width: 100%; box-sizing: border-box; padding: .7rem 1rem .7rem 2.4rem; border: 1px solid #d1d5db; border-radius: 999px; font-size: 1rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat .85rem center; }
.aza-search:focus { outline: 2px solid var(--aza-accent); border-color: transparent; }
.aza-results { position: absolute; z-index: 20; left: 0; right: 0; margin: .3rem 0 0; padding: .3rem; list-style: none; background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.aza-wrap .aza-results, .aza-wrap .aza-chips { list-style: none !important; padding-left: .3rem !important; }
.aza-results li { margin: 0; padding: 0; list-style: none !important; }
.aza-results button { width: 100%; text-align: left; padding: .55rem .7rem; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: .95rem; color: #111827; }
.aza-results button:hover, .aza-results button:focus { background: #f0fdfa; }

/* Category chips float as a translucent bar along the bottom of the map (desktop) */
.aza-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; overflow: visible; }
.aza-map .aza-chips { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 10px; margin: 0; padding: .5rem !important;
  background: rgba(255, 253, 248, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 14px; box-shadow: 0 4px 18px rgba(20,24,27,.16); }
.aza-map .aza-chip { font-size: .8rem; padding: .32rem .62rem; }
.aza-chip { flex: 0 1 auto; max-width: 100%; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border-radius: 999px; border: 1.5px solid var(--c, #9ca3af);
  background: #fff; color: #374151; font-size: .88rem; line-height: 1.2; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.aza-chip small { opacity: .7; font-size: .78em; }
.aza-chip[aria-pressed="true"] { background: var(--c, #374151); color: #fff; }
.aza-chip[aria-pressed="false"] { opacity: .75; }
.aza-chip-all { border-style: dashed; border-color: #6b7280; }
.aza-ico { font-size: 1rem; }

.maplibregl-popup-content { padding: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.maplibregl-popup-close-button { font-size: 1.3rem; padding: 0 .45rem; color: #374151; background: rgba(255,255,255,.85); border-radius: 0 12px 0 8px; }
.aza-pop-img { display: block; width: 100%; height: 150px; object-fit: cover; }

/* Photo credit overlay on place pages */
.aza-photo { position: relative; display: block; line-height: 0; }
.aza-photo > img { display: block; width: 100%; }
.aza-photo-credit { position: absolute; right: 0; bottom: 0; max-width: 85%; padding: 3px 8px; border-top-left-radius: 6px;
  background: rgba(0,0,0,.38); color: rgba(255,255,255,.85); font-size: 11px; line-height: 1.35; opacity: .8; transition: opacity .2s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aza-photo-credit:hover { opacity: 1; background: rgba(0,0,0,.6); }
.aza-photo-credit a { color: inherit !important; text-decoration: none !important; }
.aza-photo-credit a:hover { text-decoration: underline !important; }
.aza-pop { padding: .8rem .9rem .9rem; }
.aza-pop h3 { margin: .35rem 0 .3rem; font-size: 1.05rem; line-height: 1.25; color: #111827; padding: 0; }
.aza-pop p { margin: 0 0 .5rem; font-size: .88rem; line-height: 1.4; color: #4b5563; padding: 0; }
.aza-pop-cat { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--c); }
.aza-status { color: #b91c1c !important; font-weight: 600; }
.aza-pop .aza-addr { font-size: .8rem; color: #6b7280; margin-top: -.15rem; }
.aza-pop-btns { display: flex; gap: .4rem; margin-top: .6rem; }
.aza-btn { flex: 1; display: inline-block; text-align: center; padding: .5rem .7rem; border-radius: 8px; background: var(--aza-accent, #0f766e); color: #fff !important; text-decoration: none !important; font-size: .88rem; font-weight: 600; }
.aza-btn-alt { background: #fff; color: var(--aza-accent, #0f766e) !important; border: 1.5px solid var(--aza-accent, #0f766e); }

/* First-visit chooser overlay */
.aza-map { position: relative; }
.aza-chooser { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px;
  background: rgba(11, 30, 45, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); overflow-y: auto; }
.aza-chooser[hidden] { display: none; }
.aza-chooser-card { box-sizing: border-box; width: min(640px, 100%); max-height: 100%; overflow-y: auto; background: #fffdf8; border-radius: 18px;
  padding: 1.4rem 1.4rem 1.1rem; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: aza-pop .25s ease-out; }
@keyframes aza-pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.aza-chooser-eyebrow { margin: 0 0 .2rem !important; padding: 0 !important; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #1f8a7a; }
.aza-chooser h3 { margin: 0 0 1rem; padding: 0; font-size: 1.6rem; line-height: 1.15; color: #14181b; }
.aza-presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.aza-preset { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1rem; border-radius: 999px; border: 0; cursor: pointer;
  background: #0b3d5c; color: #fff; font: inherit; font-weight: 700; font-size: .92rem; transition: transform .12s, background .12s; }
.aza-preset:hover, .aza-preset:focus-visible { background: #6461d6; transform: translateY(-1px); }
.aza-chooser-subrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 .55rem; }
.aza-chooser-sub { margin: 0 !important; padding: 0 !important; font-size: .85rem; color: #5d686f; }
.aza-pick-all { border: 1.5px solid #d6d0c3; border-radius: 999px; background: #fff !important; color: #1d2327 !important; font: inherit;
  font-size: .8rem; font-weight: 700; padding: .3rem .8rem; cursor: pointer; }
.aza-pick-all:hover { border-color: #6461d6; color: #6461d6 !important; }
.aza-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .45rem; }
.aza-pick-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1.5px solid #e6e0d3; background: #fff; font: inherit; font-size: .88rem; font-weight: 650; color: #1d2327; transition: border-color .12s, background .12s; }
.aza-pick-item small { margin-left: auto; font-size: .72rem; color: #8b9499; }
.aza-pick-ico { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--c); font-size: .95rem; }
.aza-pick-label { min-width: 0; line-height: 1.2; }
.aza-pick-item[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.aza-pick-item[aria-pressed="true"] .aza-pick-ico { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }
.aza-chooser-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.1rem; }
.aza-chooser-skip { border: 0; background: none; color: #5d686f; font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; padding: .4rem 0; }
.aza-chooser-go { border: 0; border-radius: 999px; padding: .75rem 1.4rem; background: #6461d6; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.aza-chooser-go:disabled { background: #c9c6ee; cursor: default; }
.aza-toast { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 6; max-width: 90%;
  background: rgba(20,24,27,.9); color: #fff; padding: .6rem 1rem; border-radius: 10px; font-size: .88rem; text-align: center; }
.aza-ctrl-near { clear: none !important; }
.aza-ctrl-choose button { width: auto !important; padding: 0 .7rem !important; font-weight: 700; font-size: .85rem; white-space: nowrap; }
@media (max-width: 600px) {
  .aza-chooser { padding: 10px; place-items: start center; }
  .aza-chooser-card { padding: 1.1rem; }
  .aza-chooser h3 { font-size: 1.3rem; }
  .aza-preset { padding: .55rem .8rem; font-size: .85rem; }
  .aza-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aza-pick-item { min-width: 0; padding: .45rem .5rem; gap: .4rem; font-size: .82rem; }
  .aza-pick-ico { width: 26px; height: 26px; font-size: .85rem; }
  .aza-pick-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .aza-pick-item small { display: none; }
}

.aza-list { margin-top: 2rem; }
/* Folder-style tabs: the selected tab merges into the panel below */
.aza-tabs { display: none; flex-wrap: wrap; align-items: flex-end; gap: 2px 3px; margin: 1.2rem 0 0; padding: 0 .4rem; position: relative; z-index: 1; }
.aza-tabs-ready .aza-tabs { display: flex; }
.aza-tab { position: relative; display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 -1px; padding: .6rem .9rem .55rem;
  border: 1px solid #e6e0d3; border-bottom: 0; border-radius: 10px 10px 0 0; background: #efeadf !important; color: #5d686f !important;
  font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; transition: background .15s, color .15s; }
.aza-tab small { font-size: .75em; opacity: .7; font-weight: 600; }
.aza-tab:hover { background: #f7f3ea !important; color: #1d2327 !important; }
.aza-tab[aria-selected="true"], .aza-tab[aria-selected="true"]:focus, .aza-tab[aria-selected="true"]:hover {
  background: #fff !important; color: #14181b !important; font-weight: 800; padding-top: .7rem;
  box-shadow: inset 0 3px 0 var(--c); border-bottom: 1px solid #fff; z-index: 2; } /* !important beats theme button:focus styles */
.aza-tab[aria-selected="true"] small { color: var(--c); opacity: 1; }
.aza-tab:focus-visible { outline: 2px solid var(--c); outline-offset: -2px; }
.aza-tab-ico { font-size: 1rem; }
.aza-tabpanel { padding: 1.3rem 1.5rem 1rem; }
.aza-tabs-ready .aza-tabpanel { background: #fff; border: 1px solid #e6e0d3; border-radius: 0 12px 12px 12px; box-shadow: 0 6px 20px rgba(20,24,27,.05); }
.aza-tabpanel[hidden] { display: none; }
.aza-tabs-ready .aza-tabpanel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* tab already names it */
.aza-tabpanel-title { font-size: 1.25rem; margin: .4rem 0 .6rem; }
.aza-list ul { columns: 3 220px; column-gap: 2rem; margin: 0; padding-left: 1.1rem !important; }
.aza-list li { break-inside: avoid; padding: .18rem 0; }
@media (max-width: 600px) {
  .aza-tabs { padding: 0; }
  .aza-tab { font-size: .78rem; padding: .5rem .55rem .45rem; gap: .25rem; }
  .aza-tab small { display: none; }
  .aza-tabpanel { padding: 1rem 1rem .8rem; }
  .aza-tabs-ready .aza-tabpanel { border-radius: 0 0 12px 12px; }
  .aza-list ul { columns: 1; }
}

.aza-place-box { margin: 1.5rem 0; padding: 1.2rem 1.4rem; border-radius: 12px; background: #f0fdfa; border: 1px solid #ccfbf1; }
.aza-place-box dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.aza-place-box dt { font-weight: 600; color: #134e4a; }
.aza-place-box dd { margin: 0; }
.aza-place-box .aza-btn { flex: none; }

@media (max-width: 600px) {
  .aza-map { border-radius: 10px; height: 74vh !important; min-height: 420px; }
  /* Phones: no chip bar — categories are chosen in the Filters pop-up only */
  .aza-map .aza-chips { display: none; }
  .aza-map .aza-toolbar { --tb-h: 42px; top: 10px; left: 10px; right: 10px; gap: 6px; }
  .aza-tb-btn { padding: 0; width: var(--tb-h); font-size: 1.05rem; } /* symmetric round icon buttons */
  .aza-tb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .aza-map .aza-search { font-size: 16px; } /* 16px stops iOS zoom-on-focus */
  .aza-map .maplibregl-ctrl-top-right { top: 58px; }
}
.aza-wrap, .aza-wrap * { box-sizing: border-box; }
.aza-wrap { max-width: 100%; overflow-x: clip; }

/* Hide/show tab for the bottom category bar (desktop) */
.aza-map .aza-chips { transition: transform .3s ease; }
.aza-map.aza-chips-hidden .aza-chips { transform: translateY(calc(100% + 10px)); }
.aza-chips-toggle { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); width: 52px; height: 26px; padding: 0; border: 0;
  border-radius: 12px 12px 0 0; background: rgba(255,255,255,.95); color: #0b0f14; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 -3px 10px rgba(11,15,20,.12); }
.aza-chips-toggle:hover { background: #fff; color: #0a6cff; }
.aza-chips-toggle:focus-visible { outline: 2px solid #0a6cff; outline-offset: 2px; }
.aza-map.aza-chips-hidden .aza-chips-toggle { border-radius: 12px 12px 0 0; }

/* "Go to <island> map" button on the dimmed neighbouring islands */
.aza-goto-island { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; border-radius: 999px; background: #fff; color: #0b0f14 !important;
  font: 800 .82rem/1.1 Manrope, system-ui, sans-serif; text-decoration: none !important; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.28); }
.aza-goto-island:hover { background: #0a6cff; color: #fff !important; }

/* Must-see preset: first and full width */
.aza-preset[data-i="0"] { flex-basis: 100%; justify-content: center; background: #e8a400 !important; color: #0b0f14 !important; }
.aza-preset[data-i="0"]:hover { background: #ffb800 !important; }
.aza-presets { display: grid; grid-template-columns: 1fr 1fr; }
.aza-preset { justify-content: center; min-width: 0; white-space: nowrap; }
.aza-preset[data-i="0"] { grid-column: 1 / -1; }
