/* ==========================================================================
   Matininkai — 2026-10 revisions: branch routing, territory map, forms
   ========================================================================== */

/* ---------- header: "Konsultacija telefonu" branch menu ---------- */
.header-call--menu { position: relative; display: block; }
.header-call--menu > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.header-call--menu > summary::-webkit-details-marker { display: none; }
.header-call--menu > summary:hover .header-call__icon,
.header-call--menu[open] .header-call__icon { background: var(--green); border-color: var(--green); }
.header-call--menu > summary:hover .header-call__icon svg,
.header-call--menu[open] .header-call__icon svg { stroke: var(--paper); }
.header-call__number--pick { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.header-call__number--pick::after { content: ""; width: 7px; height: 7px; margin-top: -4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
.header-call--menu[open] .header-call__number--pick::after { margin-top: 3px; transform: rotate(-135deg); }

.branch-pop {
  position: absolute;
  top: calc(100% + 14px);
  right: -10px;
  z-index: 70;
  width: 330px;
  padding: 18px 18px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 28px 56px -24px rgba(8, 61, 35, .5), 0 2px 6px rgba(8, 61, 35, .06);
}
.branch-pop__title { margin-bottom: 10px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.branch-pop ul { display: grid; gap: 2px; }
.branch-pop a.branch-pop__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 6px; color: var(--forest); }
.branch-pop a.branch-pop__row:hover { background: var(--surface); color: var(--green); }
.branch-pop__city { font-weight: 600; font-size: 15px; }
.branch-pop__num { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.branch-pop__foot { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.branch-pop__foot a { color: var(--green); font-weight: 600; }
.branch-pop__foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- mobile menu: branch phones ---------- */
.mobile-branches { width: 100%; }
.mobile-branches__title { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.mobile-branches ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.mobile-branches a { display: grid; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--forest); line-height: 1.3; }
.mobile-branches a:hover { border-color: var(--green); }
.mobile-branches a strong { font-size: 14px; }
.mobile-branches a span { font-size: 14px; font-variant-numeric: tabular-nums; }
.mobile-nav__actions:has(.mobile-branches) { flex-wrap: wrap; }

/* ---------- aside: branch list instead of head office ---------- */
.aside-branches {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(159, 211, 180, .25);
}
.aside-branches a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; color: var(--paper); }
.aside-branches a:hover { color: var(--mint); }
.aside-branches__city { font-weight: 600; font-size: 15px; }
.aside-branches__num { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aside-cta__note { margin-top: 12px; color: #c3d9cc; font-size: 13.5px; line-height: 1.5; }
.aside-cta__note a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- kontaktai: hero quick list ---------- */
.qc-branches { display: grid; gap: 2px; margin-top: 14px; }
.qc-branches a { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); color: var(--forest); }
.qc-branches li:last-child a { border-bottom: 0; }
.qc-branches a:hover { color: var(--green); }
.qc-branches strong { font-weight: 600; font-size: 16px; }
.qc-branches span { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quick-contact__note { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.quick-contact__note a { color: var(--green); font-weight: 600; }

/* office HQ card: territory column */
.office-hq__areas { color: #d6e8dd; font-size: 14.5px; line-height: 1.55; }
.office-hq__areas a { color: var(--mint); font-weight: 600; white-space: normal; font-size: 14.5px; }

/* administration section note */
.people-note { margin-top: 28px; padding: 16px 20px; border-left: 3px solid var(--green); background: var(--surface); color: var(--ink); font-size: 15.5px; line-height: 1.55; }
.people-note a { color: var(--green); font-weight: 600; }
.people-grid--admin { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) { .people-grid--admin { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .people-grid--admin { grid-template-columns: 1fr; } }

/* form */
.contact-form__hint { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.contact-form__hint a { color: var(--green); font-weight: 600; }
.contact-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.contact-form__status { margin-top: 14px; padding: 12px 16px; border-radius: 6px; font-size: 15px; line-height: 1.5; }
.contact-form__status[hidden] { display: none; }
.contact-form__status.is-ok { background: var(--green-soft); color: var(--forest); }
.contact-form__status.is-error { background: #fbeceb; color: #8a1f17; }
.contact-form.is-sending button[type="submit"] { opacity: .6; pointer-events: none; }
#uzklausa, #skyriai, #zemelapis, #administracija { scroll-margin-top: 110px; }

/* ---------- territory map ---------- */
.tmap { padding-block: 104px; background: var(--surface); }
.tmap__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 48px; align-items: start; }
.tmap__figure { margin: 0; }
.tmap__svg { width: 100%; height: auto; overflow: visible; }
.tmap__muni { stroke: var(--paper); stroke-width: 1.1; stroke-linejoin: round; cursor: pointer; transition: fill .2s var(--ease), opacity .2s var(--ease); outline: none; }
.tmap__muni--vilnius { fill: #3f9a68; }
.tmap__muni--kaunas { fill: #4b7fc0; }
.tmap__muni--klaipeda { fill: #2aa5a8; }
.tmap__muni--siauliai { fill: #d4972f; }
.tmap__muni--panevezys { fill: #9a6cc9; }
.tmap__svg:hover .tmap__muni { opacity: .72; }
.tmap__svg .tmap__muni:hover,
.tmap__svg .tmap__muni:focus-visible,
.tmap__svg .tmap__muni.is-selected { opacity: 1; stroke: var(--forest); stroke-width: 2.4; }
.tmap__svg.has-selection .tmap__muni:not(.is-selected) { opacity: .55; }
.tmap__svg.has-selection .tmap__muni.is-branch { opacity: .9; }
.tmap__city { fill: var(--forest); font: 600 15px var(--font-body); paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: 4px; pointer-events: none; }
.tmap__dot { fill: var(--paper); stroke: var(--forest); stroke-width: 2.5; pointer-events: none; }
.tmap__legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; }
.tmap__legend li { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14.5px; }
.tmap__legend button { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.tmap__legend button:hover { color: var(--green); }
.tmap__swatch { width: 14px; height: 14px; border-radius: 3px; }
.tmap__swatch--vilnius { background: #3f9a68; }
.tmap__swatch--kaunas { background: #4b7fc0; }
.tmap__swatch--klaipeda { background: #2aa5a8; }
.tmap__swatch--siauliai { background: #d4972f; }
.tmap__swatch--panevezys { background: #9a6cc9; }
.tmap__note { margin-top: 14px; color: var(--muted); font-size: 13.5px; }

.tmap__panel { position: sticky; top: 120px; padding: 30px 30px 28px; border-radius: 12px; background: var(--paper); box-shadow: 0 30px 60px -40px rgba(8, 61, 35, .45); border: 1px solid var(--line); }
.tmap__hint { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.tmap__muniname { color: var(--green); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tmap__card[hidden] { display: none; }
.tmap__card h3 { margin-top: 6px; color: var(--forest); font: 500 28px/1.15 var(--font-display); }
.tmap__card address { margin-top: 10px; color: var(--muted); font-size: 15px; }
.tmap__card dl { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.tmap__card dl div { display: flex; justify-content: space-between; gap: 12px; }
.tmap__card dt { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tmap__card dd a { color: var(--forest); font-weight: 600; }
.tmap__card dd a:hover { color: var(--green); }
.tmap__actions { display: grid; gap: 10px; margin-top: 22px; }
.tmap__actions .button { width: 100%; justify-content: center; }
.tmap__more { display: inline-block; margin-top: 14px; color: var(--green); font-weight: 600; font-size: 14.5px; }

@media (max-width: 1024px) {
  .tmap { padding-block: 72px; }
  .tmap__grid { grid-template-columns: 1fr; gap: 28px; }
  .tmap__panel { position: static; }
}
@media (max-width: 560px) {
  .tmap__panel { padding: 22px 18px; }
  .tmap__city { font-size: 20px; }
  .branch-pop { width: min(330px, calc(100vw - 32px)); }
}

.people-grid--admin .person-card--lead { grid-column: auto; }
@media (max-width: 1100px) { .header-call--menu { display: none; } }

/* patirtis: yearly reports */
.stat-board__big--range { font-size: clamp(44px, 5.2vw, 68px); white-space: nowrap; }
.stat-board__text { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--forest); font-size: 15px; line-height: 1.55; }

/* topbar: long official list name (2026-10-16) */
.topbar__group:first-child > .topbar__item:first-child { flex-shrink: 0; white-space: nowrap; }
.topbar__badge { white-space: nowrap; }
@media (max-width: 1360px) { .topbar__address { display: none; } }
@media (max-width: 1000px) { .topbar__group:first-child > .topbar__item:first-child { font-size: 12px; white-space: normal; flex-shrink: 1; line-height: 1.25; } }
.stat-board__claim strong { font-weight: 700; color: var(--forest); }
@media (max-width: 1000px) { .topbar__inner { height: auto; min-height: 40px; padding-block: 6px; gap: 12px; } }
@media (max-width: 1000px) { .topbar__group:first-child > .topbar__item:first-child { display: block; } .topbar__group:first-child > .topbar__item:first-child .topbar__icon { display: none; } .topbar__badge { display: inline-block; margin-left: 4px; padding: 0 7px; } }

/* Settlement search (which branch serves my town) */
.gsearch { position: relative; margin: 24px 0 28px; max-width: 520px; }
.gsearch__label { display: block; margin-bottom: 8px; color: var(--forest); font-size: 14px; font-weight: 600; }
.gsearch__field input { width: 100%; box-sizing: border-box; padding: 13px 16px 13px 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%230b7e40' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px center; font: 16px var(--font-body); color: var(--ink); }
.gsearch__field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.gsearch__list { position: absolute; z-index: 30; left: 0; right: 0; margin: 4px 0 0; padding: 4px 0; list-style: none; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 28px rgba(8, 61, 35, .12); max-height: 320px; overflow-y: auto; }
.gsearch__list li { padding: 9px 16px; cursor: pointer; font-size: 15px; color: var(--ink); }
.gsearch__list li span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.gsearch__list li:hover, .gsearch__list li.is-on { background: var(--surface); }
.gsearch__list li.gsearch__none { cursor: default; color: var(--muted); font-size: 14px; }
.gsearch__result { margin-top: 12px; padding: 14px 16px; background: var(--green-soft); border-left: 3px solid var(--green); font-size: 15px; color: var(--ink); }
.gsearch__result p { margin: 0; }
.gsearch__actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px !important; }
.gsearch__actions a { color: var(--green); font-weight: 600; text-decoration: none; }
.gsearch__actions a:hover { text-decoration: underline; }
.gsearch--tmap { margin: 0 0 32px; }
