@font-face {
  font-family: "IBM Plex Sans Thai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/branch/static/assets/fonts/IBMPlexSansThai-Regular.ttf?v=20260820-cj-ci-1") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Thai";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/branch/static/assets/fonts/IBMPlexSansThai-SemiBold.ttf?v=20260820-cj-ci-1") format("truetype");
}

@font-face {
  font-family: "IBM Plex Sans Thai";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/branch/static/assets/fonts/IBMPlexSansThai-Bold.ttf?v=20260820-cj-ci-1") format("truetype");
}

:root {
  --cj-green: #00ae41;
  --cj-green-dark: #007f31;
  --cj-yellow: #fcdb09;
  --ink: #201714;
  --gray: #5d5a56;
  --line: #dce3df;
  --surface: #ffffff;
  --soft: #f4f7f5;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

.gtm-noscript {
  display: none;
  visibility: hidden;
}

body {
  background: var(--soft);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", Tahoma, sans-serif;
  font-synthesis: none;
  margin: 0;
  min-height: 100vh;
}

.site-header {
  background: var(--surface);
  border-bottom: 6px solid var(--cj-green);
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 14px;
  margin: 0 auto;
  max-width: 1320px;
  padding: 10px 14px;
}

.header-inner img {
  display: block;
  height: 54px;
  object-fit: contain;
  width: auto;
}

.eyebrow {
  color: var(--cj-green-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  margin: 0 0 2px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-family: "IBM Plex Sans Thai", Tahoma, sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0;
}

main {
  margin: 0 auto;
  max-width: 1380px;
  padding: 14px;
}

.finder {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(32, 23, 20, .1);
  overflow: hidden;
}

.controls {
  border-bottom: 1px solid var(--line);
  padding: 20px 16px;
}

.branch-mode-switch {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.branch-mode-switch a {
  align-items: center;
  background: var(--surface);
  border: 1px solid #b9c5be;
  border-radius: 10px;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  line-height: 1.35;
  min-height: 44px;
  padding: 9px 12px;
  text-align: center;
  text-decoration: none;
}

.branch-mode-switch a:hover {
  background: rgba(0, 174, 65, .08);
  border-color: var(--cj-green);
}

.branch-mode-switch a[aria-current="page"] {
  background: var(--cj-green);
  border-color: var(--cj-green);
  color: white;
}

.branch-mode-switch a:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 174, 65, .15);
  outline: none;
}

.intro {
  border-top: 6px solid var(--cj-yellow);
  padding-top: 14px;
}

.intro p {
  color: var(--gray);
  line-height: 1.55;
  margin-bottom: 20px;
}

.field-grid {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label > span {
  font-size: 15px;
  font-weight: 600;
}

input,
select {
  appearance: none;
  background-color: var(--surface);
  border: 1px solid #b9c5be;
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gray) 50%), linear-gradient(135deg, var(--gray) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  padding-right: 36px;
}

input:focus,
select:focus,
button:focus-visible {
  border-color: var(--cj-green);
  box-shadow: 0 0 0 4px rgba(0, 174, 65, .15);
  outline: none;
}

input:disabled,
select:disabled {
  background-color: #eef1ef;
  color: #777;
  cursor: not-allowed;
}

.combobox-field {
  display: grid;
  gap: 8px;
}

.combobox-field > label {
  font-size: 15px;
  font-weight: 600;
}

.combobox {
  position: relative;
}

.branch-options {
  background: var(--surface);
  border: 1px solid #b9c5be;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(32, 23, 20, .16);
  left: 0;
  list-style: none;
  margin: 6px 0 0;
  max-height: min(300px, 42vh);
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 5;
}

.branch-options[hidden] { display: none; }

.branch-option {
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.35;
  padding: 9px 10px;
}

.branch-option:hover,
.branch-option[aria-selected="true"] { background: rgba(0, 174, 65, .11); }

.branch-option strong,
.branch-option small { display: block; }

.branch-option small {
  color: var(--gray);
  margin-top: 2px;
}

.location-tools {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.location-tools[hidden] { display: none; }

.location-button {
  background: var(--surface);
  border: 1px solid var(--cj-green);
  border-radius: 10px;
  color: var(--cj-green-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 14px;
  width: 100%;
}

.location-button:hover:not(:disabled) { background: rgba(0, 174, 65, .08); }

.location-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.location-help {
  color: var(--gray);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.location-help[hidden] { display: none; }

.selected-branch {
  background: #f1fbf5;
  border: 2px solid var(--cj-green);
  border-radius: 14px;
  margin-top: 18px;
  padding: 16px;
}

.selected-branch[hidden] { display: none; }

.selected-branch h3 {
  font-family: "IBM Plex Sans Thai", Tahoma, sans-serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 6px;
}

.selected-distance {
  color: var(--cj-green-dark);
  font-weight: 600;
  margin-bottom: 6px;
}

.selected-address {
  color: var(--gray);
  line-height: 1.45;
  margin-bottom: 14px;
}

.selected-actions {
  display: grid;
  gap: 10px;
}

.directions-button {
  align-items: center;
  background: var(--cj-green);
  border-radius: 10px;
  color: white;
  display: flex;
  font-weight: 600;
  justify-content: center;
  min-height: 50px;
  padding: 11px 14px;
  text-align: center;
  text-decoration: none;
}

.directions-button:hover { background: var(--cj-green-dark); }

.directions-button:focus-visible,
.selected-phone:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 174, 65, .18);
  outline: none;
}

.selected-phone {
  color: var(--cj-green-dark);
  font-weight: 600;
  text-align: center;
  text-underline-offset: 3px;
}

.selected-phone[hidden] { display: none; }

.status {
  border-left: 5px solid var(--cj-green);
  color: var(--gray);
  line-height: 1.45;
  margin-top: 18px;
  min-height: 44px;
  padding: 10px 12px;
}

.status[data-state="error"] {
  background: #fff1f0;
  border-left-color: #c62828;
  color: #8e1b1b;
}

.status[data-state="empty"] {
  background: #fffbea;
  border-left-color: #d2aa00;
  color: #604d00;
}

.retry-button {
  background: var(--cj-green);
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  margin-top: 14px;
  min-height: 46px;
  padding: 10px 20px;
}

.retry-button:hover {
  background: var(--cj-green-dark);
}

.map-shell {
  min-height: max(420px, 62vh);
  position: relative;
}

#map {
  height: 100%;
  min-height: max(420px, 62vh);
  width: 100%;
}

.map-message {
  align-items: center;
  background: linear-gradient(145deg, rgba(241, 251, 245, .97), rgba(255, 255, 255, .97));
  color: var(--gray);
  display: flex;
  flex-direction: column;
  font-weight: 600;
  gap: 16px;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: absolute;
  text-align: center;
  z-index: 2;
}

.map-message::before {
  animation: logo-pulse 1.8s ease-in-out infinite;
  background: url("/branch/static/assets/brand/cj_more_logo.png?v=20260818") center / contain no-repeat;
  content: "";
  display: block;
  height: 92px;
  width: 116px;
}

@keyframes logo-pulse {
  0%, 100% { opacity: .68; transform: scale(.98); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .map-message::before { animation: none; }
}

.map-message[hidden] {
  display: none;
}

.popup {
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", Tahoma, sans-serif;
  line-height: 1.45;
  max-width: 280px;
  padding: 4px 2px;
}

.popup strong {
  display: block;
  font-family: "IBM Plex Sans Thai", Tahoma, sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.popup p {
  margin: 5px 0;
}

.popup a {
  color: var(--cj-green-dark);
  font-weight: 600;
}

.popup .popup-directions {
  background: var(--cj-green);
  border-radius: 8px;
  color: white;
  display: block;
  margin-top: 10px;
  padding: 9px 12px;
  text-align: center;
  text-decoration: none;
}

footer {
  align-items: flex-start;
  background: var(--cj-green);
  color: white;
  display: flex;
  font-weight: 600;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  min-height: 66px;
  padding: 16px 18px;
}

footer div,
footer nav {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

footer a {
  color: white;
  text-underline-offset: 3px;
}

.footer-link-button {
  background: transparent;
  border: 0;
  color: white;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 640px) {
  .branch-mode-switch {
    grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  }

  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .location-tools {
    align-items: center;
    display: flex;
    gap: 12px;
  }

  .location-button {
    width: auto;
  }

  .map-shell,
  #map {
    min-height: 520px;
  }
}

@media (min-width: 900px) {
  .site-header { border-bottom-width: 8px; }

  .header-inner {
    gap: 22px;
    padding: 16px 28px;
  }

  .header-inner img {
    height: 72px;
  }

  .eyebrow { font-size: 14px; }

  h1 { font-size: 40px; }

  main { padding: 28px; }

  .finder {
    border-radius: 20px;
    display: grid;
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
    min-height: 680px;
  }

  .controls {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 30px;
  }

  .branch-mode-switch {
    grid-template-columns: 1fr;
  }

  .intro {
    border-top-width: 7px;
    padding-top: 20px;
  }

  .intro p { margin-bottom: 26px; }

  .field-grid { grid-template-columns: 1fr; }

  .map-shell,
  #map { min-height: 680px; }

  footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 30px;
    padding: 16px max(28px, calc((100vw - 1324px) / 2));
  }

  footer div,
  footer nav {
    align-items: center;
    flex-direction: row;
    gap: 18px;
  }
}
