/* ──────────────────────────────────────────────────────────────────
 * Hyde Contact — public contact form (v2.24.5.16)
 *
 * Mirrors the intake booker's considered-luxury vocabulary: white
 * cards on a soft gray canvas, hairline borders, 12px radius, ink
 * ramp typography, gold reserved as moment-marker (currently unused
 * on this surface — visitors don't need a "moment").
 *
 * Layout: 2-column grid on desktop (form + aside). Stacks on mobile.
 * Centered max-width with intake-matching outer padding.
 * ────────────────────────────────────────────────────────────────── */

/* ───── Outer container ───── */
.hyde-contact {
  font-family: var(--hyde-font, 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif);
  color: var(--hyde-ink, #1d1d1f);
  background: transparent;
  padding: 48px 24px 96px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hyde-contact-inner {
  max-width: 980px;
  margin: 0 auto;
}

/* ───── Header ───── */
.hyde-contact-header {
  margin: 0 0 40px;
  max-width: 680px;
}

.hyde-contact-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--hyde-ink-soft, #6e6e73);
  margin: 0 0 12px;
}

.hyde-contact-title {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--hyde-ink, #1d1d1f);
}

.hyde-contact-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--hyde-ink-soft, #6e6e73);
  margin: 0;
  max-width: 580px;
}

/* ───── Grid: form + aside ───── */
.hyde-contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.hyde-contact-form-col {
  min-width: 0;
}

/* v2.24.5.17 — hide the form column while the logged-in seller
 * banner is showing. The form HTML is always rendered server-side
 * so the JS reveal is instant — no AJAX, no spinner, no race. */
.hyde-contact-form-col.is-hidden {
  display: none;
}

.hyde-contact-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 800px) {
  .hyde-contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ───── Portal-redirect banner (logged-in seller) ─────
 * Shown instead of the form when a non-admin seller lands here.
 * Routes them to the portal Support tab where their identity is
 * already known and messages can be threaded.
 */
.hyde-contact-redirect {
  background: var(--hyde-paper, #fff);
  border: 1px solid var(--hyde-line-soft, #e5e5ea);
  border-radius: var(--hyde-radius-md, 12px);
  padding: 24px 28px;
  margin: 0 0 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hyde-contact-redirect-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--hyde-bg-soft, #f5f5f7);
  color: var(--hyde-ink-soft, #6e6e73);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hyde-contact-redirect-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.hyde-contact-redirect-body {
  flex: 1;
  min-width: 0;
}

.hyde-contact-redirect-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--hyde-ink, #1d1d1f);
  margin: 0 0 6px;
}

.hyde-contact-redirect-body p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--hyde-ink-soft, #6e6e73);
  margin: 0 0 14px;
}

.hyde-contact-redirect-foot {
  font-size: 13px !important;
  margin-top: 14px !important;
}

.hyde-contact-redirect-fallback {
  color: var(--hyde-ink, #1d1d1f);
  text-decoration: underline;
  text-decoration-color: var(--hyde-line, #d2d2d7);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.hyde-contact-redirect-fallback:hover {
  text-decoration-color: var(--hyde-ink, #1d1d1f);
}

/* ───── Form ───── */
.hyde-contact-form {
  background: var(--hyde-paper, #fff);
  border: 1px solid var(--hyde-line-soft, #e5e5ea);
  border-radius: var(--hyde-radius-md, 12px);
  padding: 28px 28px 24px;
}

.hyde-contact-field {
  margin: 0 0 18px;
}

.hyde-contact-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
}

.hyde-contact-row-2 .hyde-contact-field {
  margin: 0;
}

@media (max-width: 540px) {
  .hyde-contact-row-2 {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.hyde-contact-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--hyde-ink, #1d1d1f);
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}

.hyde-contact-input,
.hyde-contact-select,
.hyde-contact-textarea {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  color: var(--hyde-ink, #1d1d1f);
  background: var(--hyde-paper, #fff);
  border: 1px solid var(--hyde-line, #d2d2d7);
  border-radius: var(--hyde-radius-sm, 10px);
  padding: 10px 14px;
  box-sizing: border-box;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
  -webkit-appearance: none;
  appearance: none;
}

.hyde-contact-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  padding-right: 38px;
  cursor: pointer;
}

.hyde-contact-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.55;
}

.hyde-contact-input:hover,
.hyde-contact-select:hover,
.hyde-contact-textarea:hover {
  border-color: var(--hyde-ink-mute, #86868b);
}

.hyde-contact-input:focus,
.hyde-contact-select:focus,
.hyde-contact-textarea:focus {
  outline: none;
  border-color: var(--hyde-ink, #1d1d1f);
  box-shadow: 0 0 0 3px rgba(29, 29, 31, 0.08);
}

.hyde-contact-input::placeholder,
.hyde-contact-textarea::placeholder {
  color: var(--hyde-ink-mute, #86868b);
}

/* ───── Honeypot — off-screen, not focusable ───── */
.hyde-contact-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ───── Submit area ───── */
.hyde-contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hyde-contact-fine {
  font-size: 12px;
  color: var(--hyde-ink-mute, #86868b);
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}

.hyde-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--hyde-radius-sm, 10px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.05s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.005em;
  -webkit-tap-highlight-color: transparent;
}

.hyde-contact-btn-primary {
  background: var(--hyde-ink, #1d1d1f);
  color: #fff;
  border-color: var(--hyde-ink, #1d1d1f);
}

.hyde-contact-btn-primary:hover,
.hyde-contact-btn-primary:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
}

.hyde-contact-btn-primary:active {
  transform: translateY(1px);
}

.hyde-contact-btn-primary:disabled,
.hyde-contact-btn-primary.is-busy {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ───── Status messages ───── */
.hyde-contact-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.hyde-contact-status.is-error {
  background: #fdf0ee;
  color: #8a2818;
  border: 1px solid #f4d2cb;
}

/* ───── Success card (replaces form after send) ───── */
.hyde-contact-success {
  background: var(--hyde-paper, #fff);
  border: 1px solid var(--hyde-line-soft, #e5e5ea);
  border-radius: var(--hyde-radius-md, 12px);
  padding: 32px 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hyde-contact-success-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fdf6e7;
  color: #b5872a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hyde-contact-success-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.hyde-contact-success-body {
  flex: 1;
  min-width: 0;
}

.hyde-contact-success-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--hyde-ink, #1d1d1f);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.hyde-contact-success-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--hyde-ink-soft, #6e6e73);
  margin: 0;
}

/* ───── Aside cards ───── */
.hyde-contact-card {
  background: var(--hyde-paper, #fff);
  border: 1px solid var(--hyde-line-soft, #e5e5ea);
  border-radius: var(--hyde-radius-md, 12px);
  padding: 20px;
}

.hyde-contact-card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--hyde-ink-soft, #6e6e73);
  margin: 0 0 12px;
}

.hyde-contact-card-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--hyde-ink, #1d1d1f);
}

.hyde-contact-phone-link {
  color: var(--hyde-ink, #1d1d1f);
  text-decoration: none;
  font-weight: 500;
}

.hyde-contact-phone-link:hover {
  text-decoration: underline;
}

/* ───── Hours list ───── */
.hyde-contact-hours {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hyde-contact-hours-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.4;
  border-bottom: 1px solid var(--hyde-line-soft, #e5e5ea);
}

.hyde-contact-hours-row:last-child {
  border-bottom: none;
}

.hyde-contact-hours-day {
  color: var(--hyde-ink, #1d1d1f);
  font-weight: 500;
  min-width: 40px;
}

.hyde-contact-hours-time {
  color: var(--hyde-ink-soft, #6e6e73);
  text-align: right;
}

.hyde-contact-hours-row.is-closed .hyde-contact-hours-day,
.hyde-contact-hours-row.is-closed .hyde-contact-hours-time {
  color: var(--hyde-ink-mute, #86868b);
}

/* ───── Mobile tweaks ───── */
@media (max-width: 540px) {
  .hyde-contact {
    padding: 32px 16px 64px;
  }
  .hyde-contact-title {
    font-size: 30px;
  }
  .hyde-contact-form {
    padding: 22px 20px;
  }
  .hyde-contact-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .hyde-contact-btn-primary {
    width: 100%;
  }
  .hyde-contact-fine {
    text-align: center;
  }
}
