﻿/**
 * Branches & ATMs modal — public site (footer #ourLocations + AJAX results)
 */

:root {
  --fc-loc-radius: 16px;
  --fc-loc-shadow: 0 24px 48px rgba(15, 35, 69, 0.18);
  --fc-loc-border: rgba(15, 42, 86, 0.12);
  --fc-loc-ink: #0f2744;
  --fc-loc-muted: #5c6b7f;
  --fc-loc-surface: #ffffff;
  --fc-loc-soft: #f4f7fc;
}

body.fc-loc-modal-open {
  overflow: hidden;
}

.fc-loc-modal.our-locations-wrapper {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.fc-loc-modal .our-locations-background,
.our-locations-background.ourLocationsBack {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(15, 35, 55, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.fc-loc-modal .our-locations-background.mt-put-background,
.our-locations-background.mt-put-background {
  background: rgba(10, 25, 45, 0.58);
}

.fc-loc-modal .our-locations {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(920px, 100%);
  max-height: min(92vh, 880px);
  display: flex;
  flex-direction: column;
  margin: 0;
}

.fc-loc-modal .our-locations-inner {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 880px);
  background: var(--fc-loc-surface);
  border-radius: var(--fc-loc-radius);
  box-shadow: var(--fc-loc-shadow), 0 0 0 1px var(--fc-loc-border);
  overflow: hidden;
}

.fc-loc-modal .our-locations-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--fc-loc-header-bg, var(--mt-theme-default-background));
  color: var(--fc-loc-header-fg, #fff);
  border: none;
  border-radius: 0;
}

.fc-loc-modal .our-lct-title {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.fc-loc-modal .fc-loc-header-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1.35;
  max-width: 36em;
}

.fc-loc-modal .exit-lct-win {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.fc-loc-modal .exit-lct-win:hover {
  background: rgba(255, 255, 255, 0.22);
}

.fc-loc-modal .exit-lct-win:active {
  transform: scale(0.96);
}

.fc-loc-modal .exit-lct-win svg {
  width: 22px;
  height: 22px;
}

.fc-loc-modal .our-locations-body {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--fc-loc-soft);
  border-radius: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.fc-loc-modal .our-locations-body-inner {
  padding: 16px 18px 20px;
  min-height: 0;
}

.fc-loc-modal .our-locations-content-first {
  margin-bottom: 0;
}

.fc-loc-modal .b-location-form {
  background: var(--fc-loc-surface);
  border: 1px solid var(--fc-loc-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.fc-loc-modal .b-location-form label.d-block {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fc-loc-muted);
  margin-bottom: 8px;
}

.fc-loc-modal .lct-flex-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.fc-loc-modal .lct-input-control,
.fc-loc-modal select.lct-input-control {
  flex: 1 1 200px;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  font-size: 15px;
  line-height: 48px;
  color: var(--fc-loc-ink);
  background: var(--fc-loc-soft);
  border: 1px solid var(--fc-loc-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fc-loc-modal .lct-input-control:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--fc-loc-header-bg, var(--mt-theme-default-background)) 45%, #a8c0e0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-loc-header-bg, var(--mt-theme-default-background)) 18%, transparent);
}

.fc-loc-modal .lct-form-submit {
  flex: 0 0 auto;
  margin-left: 0;
  min-height: 48px;
  padding-left: 22px;
  padding-right: 22px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--fc-loc-header-bg, var(--mt-theme-default-background)) 28%, transparent);
}

.fc-loc-modal #locationSecond {
  margin-top: 14px;
}

/* AJAX results */
.fc-loc-results {
  margin-top: 4px;
}

.fc-loc-results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 767.98px) {
  .fc-loc-results-grid {
    grid-template-columns: 1fr;
  }

  .fc-loc-results-grid .fc-loc-map-shell {
    order: -1;
    min-height: 220px;
  }
}

.fc-loc-details {
  background: var(--fc-loc-surface);
  border: 1px solid var(--fc-loc-border);
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.fc-loc-details-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fc-loc-ink);
}

.fc-loc-dl {
  margin: 0;
}

.fc-loc-dl-row {
  padding: 10px 0;
  border-top: 1px solid rgba(15, 42, 86, 0.08);
}

.fc-loc-dl-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.fc-loc-dl-row dt {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fc-loc-muted);
}

.fc-loc-dl-row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--fc-loc-ink);
  line-height: 1.45;
  word-break: break-word;
}

a.fc-loc-link {
  color: color-mix(in srgb, var(--fc-loc-header-bg, var(--mt-theme-default-background)) 75%, #0f2744);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

a.fc-loc-link:hover {
  border-bottom-color: currentColor;
}

.fc-loc-map-shell {
  background: var(--fc-loc-surface);
  border: 1px solid var(--fc-loc-border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 280px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.fc-loc-map,
.fc-loc-modal #mapid {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: none;
  border-radius: 0;
}

@media (min-width: 768px) {
  .fc-loc-map-shell {
    min-height: 340px;
  }

  .fc-loc-modal #mapid,
  .fc-loc-map {
    min-height: 340px;
  }
}

.fc-loc-error {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid #fecdce;
  color: #9b1c1c;
  font-size: 14px;
  font-weight: 600;
}

.fc-loc-map-note {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--fc-loc-muted);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--fc-loc-border);
}

.find-location-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  padding: 2rem 1rem;
}

.find-location-loader .spinner-border {
  width: 48px;
  height: 48px;
  border-width: 3px;
  border-color: color-mix(in srgb, var(--fc-loc-header-bg, var(--mt-theme-default-background)) 35%, #cbd5e1);
  border-right-color: transparent;
}

/* Leaflet tweaks inside modal */
.fc-loc-map-shell .leaflet-container {
  font-family: inherit;
}

.fc-loc-map-shell .leaflet-popup-content-wrapper {
  border-radius: 10px;
}

/* 1.4.3: compact location finder for Theme Two only. */
body.fc-layout-theme-two .fc-loc-modal.our-locations-wrapper {
  padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
body.fc-layout-theme-two .fc-loc-modal .our-locations-background,
body.fc-layout-theme-two .our-locations-background.ourLocationsBack {
  background:rgba(4,22,43,.48);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
body.fc-layout-theme-two .fc-loc-modal .our-locations {
  max-width:min(720px,100%);
  max-height:min(84vh,700px);
}
body.fc-layout-theme-two .fc-loc-modal .our-locations-inner {
  max-height:min(84vh,700px);
  border-radius:18px;
  box-shadow:0 24px 60px rgba(4,22,43,.24),0 0 0 1px rgba(15,42,86,.1);
}
body.fc-layout-theme-two .fc-loc-modal .our-locations-header {
  align-items:center;
  padding:13px 15px 12px 17px;
  background:linear-gradient(135deg,var(--fc-loc-header-bg,var(--mt-theme-default-background)),color-mix(in srgb,var(--fc-loc-header-bg,var(--mt-theme-default-background)) 74%,#071d38));
}
body.fc-layout-theme-two .fc-loc-modal .our-lct-title { font-size:1.08rem; letter-spacing:-.01em; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-header-sub { margin-top:2px; font-size:11.5px; opacity:.84; }
body.fc-layout-theme-two .fc-loc-modal .exit-lct-win {
  width:36px;
  height:36px;
  margin:0;
  border-radius:10px;
}
body.fc-layout-theme-two .fc-loc-modal .exit-lct-win svg { width:18px; height:18px; }
body.fc-layout-theme-two .fc-loc-modal .our-locations-body { background:#f5f7fa; }
body.fc-layout-theme-two .fc-loc-modal .our-locations-body-inner { padding:12px; }
body.fc-layout-theme-two .fc-loc-modal .b-location-form {
  padding:10px 11px;
  border-radius:12px;
  box-shadow:none;
}
body.fc-layout-theme-two .fc-loc-modal .b-location-form label.d-block {
  margin-bottom:6px;
  font-size:10px;
  letter-spacing:.08em;
}
body.fc-layout-theme-two .fc-loc-modal .lct-flex-group { flex-wrap:nowrap; gap:8px; }
body.fc-layout-theme-two .fc-loc-modal .lct-input-control,
body.fc-layout-theme-two .fc-loc-modal select.lct-input-control {
  height:42px;
  padding:0 12px;
  border-radius:9px;
  font-size:13px;
  line-height:42px;
  background:#fff;
}
body.fc-layout-theme-two .fc-loc-modal .lct-form-submit {
  min-height:42px;
  padding:0 18px;
  border-radius:9px;
  font-size:13px;
  box-shadow:none;
}
body.fc-layout-theme-two .fc-loc-modal #locationSecond { margin-top:10px; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-results-grid { grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr); gap:10px; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-details {
  padding:12px;
  border-radius:12px;
  box-shadow:none;
}
body.fc-layout-theme-two .fc-loc-modal .fc-loc-details-title { margin-bottom:8px; font-size:13px; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-dl-row { padding:7px 0; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-dl-row dt { margin-bottom:2px; font-size:9px; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-dl-row dd { font-size:13px; line-height:1.35; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-map-shell,
body.fc-layout-theme-two .fc-loc-modal #mapid,
body.fc-layout-theme-two .fc-loc-modal .fc-loc-map { min-height:250px; border-radius:12px; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-map-shell { box-shadow:none; }
body.fc-layout-theme-two .fc-loc-modal .fc-loc-map-note { padding:6px 9px; font-size:10px; }
body.fc-layout-theme-two .fc-loc-modal .find-location-loader { min-height:130px; }

@media (max-width: 767.98px) {
  body.fc-layout-theme-two .fc-loc-modal .our-locations { max-height:min(88vh,680px); }
  body.fc-layout-theme-two .fc-loc-modal .our-locations-inner { max-height:min(88vh,680px); border-radius:15px; }
  body.fc-layout-theme-two .fc-loc-modal .fc-loc-header-sub { max-width:250px; }
  body.fc-layout-theme-two .fc-loc-modal .lct-flex-group { flex-wrap:wrap; }
  body.fc-layout-theme-two .fc-loc-modal .lct-form-submit { flex:1 1 100%; }
  body.fc-layout-theme-two .fc-loc-modal .fc-loc-results-grid { grid-template-columns:1fr; }
  body.fc-layout-theme-two .fc-loc-modal .fc-loc-results-grid .fc-loc-map-shell { order:-1; }
  body.fc-layout-theme-two .fc-loc-modal .fc-loc-map-shell,
  body.fc-layout-theme-two .fc-loc-modal #mapid,
  body.fc-layout-theme-two .fc-loc-modal .fc-loc-map { min-height:210px; }
}
