/* ================================================================
   Surma Business Tech — contact page (loaded after website.css)
   Built on the homepage primitives: statusbar, topnav, .btn, .field / .inp, .foot.
   Tokens only: see /assets/tokens.css. No hex, no rgba literals.
   ================================================================ */

[hidden] { display: none !important; }

/* ── Hero band ─────────────────────────────────────────── */
.contact-hero {
  background:
    radial-gradient(ellipse 70% 120% at 85% 0%, rgba(var(--secondary-rgb), 0.2), transparent 60%),
    radial-gradient(ellipse 50% 100% at 10% 100%, rgba(var(--tertiary-rgb), 0.18), transparent 60%),
    var(--background);
  padding: 72px var(--gutter) 56px;
  border-bottom: 1px solid var(--border-subtle);
}
.contact-hero-inner { max-width: var(--content); margin: 0 auto; display: grid; gap: 16px; justify-items: start; }
.contact-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.035em;
  color: var(--primary); max-width: 16ch;
}
.contact-hero p { font-size: 19px; line-height: 1.5; color: var(--muted); max-width: 560px; }

/* ── Form + map: two columns from 900 px, one below ────── */
.contact-body { background: var(--canvas); padding: 64px var(--gutter) 88px; }
.contact-layout { max-width: var(--content); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }

.contact-card {
  background: var(--background); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-3); padding: 40px; box-shadow: var(--shadow-2);
}
.contact-card-title {
  font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--primary);
}
.contact-card-sub { color: var(--muted); margin: 6px 0 28px; }
.contact-form { display: grid; gap: 20px; }
.contact-submit { justify-self: start; min-width: 220px; }

.form-success { display: grid; gap: 14px; justify-items: start; padding: 8px 0; }
.form-success:focus-visible { outline: var(--focus-ring); outline-offset: 8px; }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; }
.success-mark svg { width: 28px; height: 28px; }
#success-text { font-size: 18px; line-height: 1.5; color: var(--ink); max-width: 46ch; }

.contact-map-col { min-width: 0; }
.map-card {
  position: relative; min-height: 360px; height: 100%;
  background: var(--background); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-3); overflow: hidden; box-shadow: var(--shadow-2);
}
.gmap { position: absolute; inset: 0; }
.gmap iframe { width: 100%; height: 100%; border: 0; }
.map-fallback {
  height: 100%; padding: 32px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center;
  background: var(--canvas); color: var(--ink);
}
.map-fallback svg { width: 44px; height: 44px; color: var(--primary); }
.map-fallback-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--primary); }
.map-fallback-addr { color: var(--muted); max-width: 32ch; }
.map-fallback .btn { margin-top: 8px; }

@media (min-width: 900px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: stretch; }
  .map-card { min-height: 480px; }
}

/* ── Locations ─────────────────────────────────────────── */
.locations { background: var(--background); padding: 80px var(--gutter); scroll-margin-top: var(--header-h); }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.loc-empty { color: var(--muted); }
.loc-card {
  background: var(--background); border: 1px solid var(--border-subtle); border-radius: var(--radius-3);
  padding: 24px; box-shadow: var(--shadow-1); display: grid; gap: 12px; align-content: start;
}
.loc-card-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--primary); }
.loc-badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--secondary); color: var(--ink); padding: 2px 8px; border-radius: 999px; }
.loc-detail { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; line-height: 1.5; }
.loc-detail svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--primary); }
.loc-detail a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.loc-detail a:hover { color: var(--primary); }

/* ── Chat widget (off unless the setting is on) ────────── */
#ai-chat-widget { --chat-accent: var(--primary); position: fixed; right: 16px; bottom: 16px; z-index: 90; }
.chat-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--chat-accent); color: var(--background); display: grid; place-items: center; box-shadow: var(--shadow-3); }
.chat-btn:hover { box-shadow: var(--shadow-4); }
.chat-box {
  position: absolute; right: 0; bottom: 68px; width: 360px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 120px);
  background: var(--background); border: 1px solid var(--border-subtle); border-radius: var(--radius-3);
  box-shadow: var(--shadow-4); display: flex; flex-direction: column; overflow: hidden;
}
.chat-header { background: var(--chat-accent); color: var(--background); padding: 8px 8px 8px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-bot-name { font-weight: 600; font-size: 15px; }
.chat-status { font-size: 12px; color: var(--muted-on-dark); display: flex; align-items: center; gap: 6px; }
.chat-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-2); color: var(--background); }
.chat-close:hover { background: rgba(var(--background-rgb), 0.14); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 10px; align-content: start; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: var(--radius-3); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg-bot { background: var(--canvas); color: var(--ink); justify-self: start; }
.chat-msg-user { background: var(--primary); color: var(--background); justify-self: end; }
.chat-input-wrap { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-subtle); }
.chat-input { flex: 1; min-width: 0; }

/* ── Small screens ─────────────────────────────────────── */
@media (pointer: coarse), (max-width: 768px) {
  .loc-detail a { min-height: 44px; }
}
@media (max-width: 640px) {
  .contact-hero { padding: 48px 20px 40px; }
  .contact-hero p { font-size: 17px; }
  .contact-body { padding: 40px 16px 56px; }
  .contact-card { padding: 24px 20px; }
  .contact-submit { justify-self: stretch; width: 100%; }
  .locations { padding: 56px 20px; }
  .loc-grid { grid-template-columns: 1fr; }
  .map-card { min-height: 320px; }
}
