/* ==========================================================================
   /islenskar/tokustadir/ — Tökustaðir v2 (template-tokustadir-v2.php, js/tokustadir.js)
   ========================================================================== */

.fl-page {
    --fl-ink: #1a1f24;
    --fl-muted: #6b7280;
    --fl-line: #e6eaed;
    --fl-bg: #f3f5f6;
    --fl-pin: var(--kvik-want, #e0654f);
    --fl-teal: #62b0ba;
    background: #fff;
    color: var(--fl-ink);
    padding-bottom: 48px;
}
.fl-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.fl-muted { color: var(--fl-muted); font-size: 14px; line-height: 1.5; }
.fl-muted a { color: inherit; text-decoration: underline; }

/* Hero */
.fl-hero { background: #15191e; color: #fff; padding: 36px 0 30px; margin-bottom: 18px; }
.fl-kicker { margin: 0 0 6px; color: var(--fl-pin); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.fl-hero__title { margin: 0 0 8px; color: #fff; font-size: clamp(26px, 4vw, 40px); line-height: 1.1; font-weight: 800; }
.fl-hero__sub { margin: 0; color: rgba(255,255,255,.75); font-size: 16px; max-width: 720px; }
.fl-hero__row { display: flex; gap: 22px; align-items: flex-end; }
.fl-hero__poster img { display: block; width: 120px; height: auto; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.fl-hero__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fl-back { display: inline-block; margin-bottom: 10px; color: rgba(255,255,255,.7); font-size: 13px; text-decoration: none; }
.fl-back:hover { color: #fff; }

/* Buttons + toolbar */
.fl-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--fl-line); border-radius: 999px;
          background: #fff; color: var(--fl-ink); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.fl-btn:hover { border-color: var(--fl-ink); }
.fl-btn--main { background: #fff; border-color: #fff; }
.fl-hero .fl-btn:not(.fl-btn--main) { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.fl-btn:disabled { opacity: .5; }
.fl-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.fl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fl-chip { padding: 7px 14px; border: 1px solid var(--fl-line); border-radius: 999px; background: #fff; font-size: 14px; cursor: pointer; color: var(--fl-ink); }
.fl-chip.is-on { background: var(--fl-ink); border-color: var(--fl-ink); color: #fff; }
.fl-select, .fl-input { height: 36px; padding: 0 12px; border: 1px solid var(--fl-line); border-radius: 999px; background: #fff; font-size: 14px; color: var(--fl-ink); }
.fl-input { flex: 1 1 200px; min-width: 0; }

/* Map + list */
.fl-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.fl-map { height: 72vh; min-height: 420px; border-radius: 12px; overflow: hidden; background: var(--fl-bg); z-index: 0; }
.fl-map--movie { height: 56vh; min-height: 360px; margin-bottom: 8px; }
.fl-list { height: 72vh; min-height: 420px; overflow-y: auto; border: 1px solid var(--fl-line); border-radius: 12px; padding: 10px; }
.fl-list__head { margin: 2px 4px 10px; font-size: 13px; font-weight: 700; color: var(--fl-muted); }
.fl-item { display: flex; gap: 10px; width: 100%; padding: 6px; margin: 0 0 4px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; color: var(--fl-ink); }
.fl-item:hover { background: var(--fl-bg); }
.fl-item img, .fl-item__ph { flex: 0 0 88px; width: 88px; height: 58px; object-fit: cover; border-radius: 6px; background: var(--fl-bg); }
.fl-item__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.3; }
.fl-item__txt b { font-size: 14px; }
.fl-item__txt span { color: var(--fl-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fl-item__km { color: var(--fl-teal) !important; font-weight: 600; }

/* Pins + popups */
.fl-pin span { display: block; width: 14px; height: 14px; margin: 4px; border-radius: 50%; background: var(--fl-pin, #e0654f); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.fl-pin--num span { width: 24px; height: 24px; margin: 0; color: #fff; font: 700 12px/20px system-ui, sans-serif; text-align: center; }
.fl-pop { font-size: 13px; line-height: 1.4; }
.fl-pop__img { display: block; width: 100%; padding: 0; margin: 0 0 8px; border: 0; background: none; cursor: zoom-in; }
.fl-pop__img img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 6px; }
.fl-pop__film { display: block; font-size: 15px; font-weight: 700; color: var(--fl-ink, #1a1f24) !important; text-decoration: none; }
.fl-pop__film span { font-weight: 400; color: #6b7280; }
.fl-pop__addr { color: #6b7280; }
.fl-pop__more { display: inline-block; margin-top: 6px; font-weight: 600; color: #0d9488 !important; text-decoration: none; }
.leaflet-popup-content { margin: 10px 12px; }

/* Sections */
.fl-sec { margin-top: 36px; }
.fl-h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fl-grid--small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 12px; }
.fl-card { border: 1px solid var(--fl-line); border-radius: 12px; overflow: hidden; background: #fff; }
.fl-card__img, .fl-photo button { display: block; width: 100%; padding: 0; border: 0; background: var(--fl-bg); cursor: zoom-in; }
.fl-card__img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fl-card__body { position: relative; padding: 12px 14px 14px 50px; }
.fl-num { position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--fl-pin); color: #fff; font-size: 12px; font-weight: 700; line-height: 26px; text-align: center; }
.fl-card__title { margin: 0; font-size: 15px; line-height: 1.3; }
.fl-card__addr { margin: 2px 0 0; color: var(--fl-muted); font-size: 13px; }
.fl-link { margin-top: 6px; padding: 0; border: 0; background: none; color: #0d9488; font-size: 13px; font-weight: 600; cursor: pointer; }
.fl-photo { margin: 0; }
.fl-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.fl-photo figcaption { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--fl-muted); }
.fl-photo figcaption a { display: block; color: var(--fl-ink); font-weight: 700; text-decoration: none; }
.fl-ask { background: var(--fl-bg); border-radius: 14px; padding-top: 22px; padding-bottom: 22px; }

/* Film tiles */
.fl-films { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.fl-film { display: flex; flex-direction: column; gap: 3px; color: var(--fl-ink); text-decoration: none; }
.fl-film[hidden] { display: none; }
.fl-film__img { display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--fl-bg); }
.fl-film__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.fl-film:hover .fl-film__img img { transform: scale(1.04); }
.fl-film__t { font-size: 13px; font-weight: 700; line-height: 1.25; }
.fl-film__n { font-size: 12px; color: var(--fl-muted); }

/* Lightbox */
.fl-zoom { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.88); cursor: zoom-out; }
.fl-zoom.is-on { display: flex; }
.fl-zoom img { max-width: 94vw; max-height: 90vh; border-radius: 6px; }
.fl-zoom button { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: #fff; font-size: 36px; cursor: pointer; }

/* "Ég veit hvar" button + suggestion modal */
.fl-know { margin-top: 6px; padding: 5px 12px; border: 1px solid var(--fl-ink); border-radius: 999px; background: #fff; color: var(--fl-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.fl-know:hover { background: var(--fl-ink); color: #fff; }
.fl-know:disabled { border-color: var(--fl-teal); color: var(--fl-teal); background: #fff; cursor: default; }
.fl-btn--ink { background: #1a1f24; border-color: #1a1f24; color: #fff; justify-content: center; }
.fl-sug { position: fixed; inset: 0; z-index: 99998; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.6); }
.fl-sug.is-on { display: flex; }
.fl-sug__box { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto;
               padding: 18px; border-radius: 14px; background: #fff; color: #1a1f24; }
.fl-sug__box h3 { margin: 4px 0 0; font-size: 18px; }
.fl-sug__box p { margin: 0; }
.fl-sug__box .fl-input { width: 100%; box-sizing: border-box; border-radius: 10px; height: auto; padding: 8px 12px; font: inherit; font-size: 14px; }
.fl-sug__x { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: #6b7280; }
.fl-sug__head { display: flex; gap: 12px; align-items: center; padding-right: 28px; }
.fl-sug__head img { width: 110px; height: 70px; object-fit: cover; border-radius: 6px; background: #f3f5f6; }
.fl-sug__head b { display: block; font-size: 15px; }
.fl-sug__head span { font-size: 13px; color: #6b7280; }
.fl-sug__map { height: 280px; border-radius: 10px; overflow: hidden; }
.fl-sug__find { position: relative; }
.fl-sug__res { position: absolute; left: 0; right: 0; top: 100%; z-index: 1000; background: #fff; border-radius: 0 0 10px 10px; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.fl-sug__res button { display: block; width: 100%; padding: 8px 12px; border: 0; border-top: 1px solid #e6eaed; background: none; text-align: left; font-size: 13px; cursor: pointer; }
.fl-sug__res button:hover { background: #f3f5f6; }
.fl-sug__msg { min-height: 1em; font-size: 14px; font-weight: 600; color: #0d9488; }
.fl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 860px) {
    .fl-main { grid-template-columns: 1fr; }
    .fl-map { height: 60vh; min-height: 340px; }
    .fl-list { height: auto; max-height: 60vh; }
    .fl-hero__poster img { width: 84px; }
    .fl-hero__row { align-items: flex-start; }
}
