/* ============================================================
   SX Contact Intent Cards
   3-tab intent selector for the contact page. Each card acts
   as a tab that reveals its panel below. Vanilla JS (see
   module.js) handles active state + ?intent= query param.
   ============================================================ */

.sx-contact-intent {
  position: relative;
  padding: 80px 0 60px;
  background: #ffffff;
}

@media (max-width: 767px) {
  .sx-contact-intent {
    padding: 60px 0 40px;
  }
}

.sx-contact-intent__header {
  max-width: 720px;
  margin: 0 auto 50px;
  text-align: center;
}

/* ============================================================
   Cards row — auto-fit grid: 1, 2, or 3 columns
   ============================================================ */

.sx-contact-intent__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  align-items: stretch;
}

@media (max-width: 767px) {
  .sx-contact-intent__cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================================
   Card = tab button
   ============================================================ */

.sx-contact-intent__card {
  --sx-card-accent: #376CB4;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 26px 28px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  font-family: inherit;
  color: inherit;
  overflow: hidden;
}

.sx-contact-intent__card:focus-visible {
  outline: 3px solid var(--sx-card-accent);
  outline-offset: 2px;
}

.sx-contact-intent__card--book  { --sx-card-accent: #62BEAC; }
.sx-contact-intent__card--brief { --sx-card-accent: #FFD760; }
.sx-contact-intent__card--chat  { --sx-card-accent: #376CB4; }

/* Top accent bar (revealed on hover / active) */
.sx-contact-intent__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--sx-card-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.sx-contact-intent__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 38px rgba(15, 30, 60, 0.12);
  border-color: rgba(15, 30, 60, 0.15);
}

.sx-contact-intent__card:hover::before {
  transform: scaleX(1);
}

/* Active (selected) state */
.sx-contact-intent__card.is-active {
  border-color: var(--sx-card-accent);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--sx-card-accent) 8%, #ffffff) 0%,
    #ffffff 60%
  );
  box-shadow: 0 12px 30px rgba(15, 30, 60, 0.12);
}

.sx-contact-intent__card.is-active::before {
  transform: scaleX(1);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-contact-intent__card.is-active {
    background: #f8fafc;
  }
}

/* Badge — per-card, configurable text + color */
.sx-contact-intent__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  border-radius: 999px;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Color variants — each pairs a bg with a WCAG-safe text color */
.sx-contact-intent__badge--yellow {
  color: #12314f;
  background: #FFD760;
}

.sx-contact-intent__badge--blue {
  color: #ffffff;
  background: #376CB4;
}

.sx-contact-intent__badge--green {
  color: #ffffff;
  background: #4fa694;
}

.sx-contact-intent__badge--red {
  color: #ffffff;
  background: #E9465C;
}

/* Recommended card glow — only kept for the recommended card that
   uses the legacy yellow fallback. If per-card badges are used, the
   card's own accent shadow (on hover / active) provides the emphasis. */
.sx-contact-intent__card.is-recommended {
  box-shadow: 0 12px 30px rgba(255, 215, 96, 0.18);
}

.sx-contact-intent__card.is-recommended.is-active {
  box-shadow: 0 12px 34px rgba(255, 215, 96, 0.24);
}

/* Card content */
.sx-contact-intent__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--sx-card-accent) 14%, transparent);
  color: var(--sx-card-accent);
  margin-bottom: 6px;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-contact-intent__icon {
    background: #f0f4f9;
  }
}

.sx-contact-intent__icon svg {
  width: 24px;
  height: 24px;
}

.sx-contact-intent__card-title {
  font-size: 20px;
  font-weight: 700;
  color: #12314f;
  line-height: 1.3;
}

.sx-contact-intent__card-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--sx-card-accent);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: -4px;
}

/* Brief subtitle is yellow — needs dark override for WCAG */
.sx-contact-intent__card--brief .sx-contact-intent__card-subtitle {
  color: #b48a08;
}

.sx-contact-intent__card-description {
  font-size: 14.5px;
  font-weight: 400;
  color: #4b5563;
  line-height: 1.55;
  flex: 1;
}

.sx-contact-intent__card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #12314f;
  letter-spacing: 0.3px;
}

.sx-contact-intent__card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.sx-contact-intent__card:hover .sx-contact-intent__card-cta svg,
.sx-contact-intent__card.is-active .sx-contact-intent__card-cta svg {
  transform: translateX(4px);
}

/* ============================================================
   Panels — only 1 visible at a time
   ============================================================ */

.sx-contact-intent__panels {
  position: relative;
}

.sx-contact-intent__panel {
  display: none;
  animation: sx-contact-intent-fade 0.35s ease;
}

.sx-contact-intent__panel.is-active {
  display: block;
}

@keyframes sx-contact-intent-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sx-contact-intent__panel-inner {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 8px 24px rgba(15, 30, 60, 0.06);
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .sx-contact-intent__panel-inner {
    padding: 32px 20px;
    border-radius: 16px;
  }
}

.sx-contact-intent__panel-title {
  font-size: 24px;
  font-weight: 700;
  color: #12314f;
  margin: 0 0 12px;
  line-height: 1.3;
}

.sx-contact-intent__panel-note {
  font-size: 15px;
  color: #4b5563;
  margin: 0 0 32px;
  line-height: 1.55;
}

/* ============================================================
   Meetings iframe container
   ============================================================ */

.sx-contact-intent__meetings {
  border-radius: 12px;
  overflow: hidden;
}

/* HubSpot Meetings — the script auto-resizes, but we set a floor
   so the space is claimed while the iframe loads. */
.sx-contact-intent__meetings--hubspot {
  min-height: 620px;
}

.sx-contact-intent__meetings--hubspot .meetings-iframe-container {
  min-height: 620px;
}

.sx-contact-intent__meetings--hubspot iframe {
  width: 100%;
  border: 0;
  min-height: 620px;
}

/* Google / Generic providers — height is set inline on the iframe
   itself from the module's iframe_height field. No CSS constraint. */
.sx-contact-intent__meetings--google iframe,
.sx-contact-intent__meetings--iframe_generic iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* Link-out provider — big CTA button that opens the scheduling page
   in a new tab. Used when the target site does not allow iframe embed. */
.sx-contact-intent__link-out {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 60px 30px;
  background: linear-gradient(180deg,
    color-mix(in srgb, #62BEAC 6%, #ffffff) 0%,
    #ffffff 100%
  );
  border: 1.5px dashed rgba(98, 190, 172, 0.4);
  border-radius: 14px;
  text-align: center;
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-contact-intent__link-out { background: #f4faf9; }
}

@media (max-width: 767px) {
  .sx-contact-intent__link-out { padding: 40px 20px; }
}

.sx-contact-intent__link-out-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(98, 190, 172, 0.15);
  color: #12314f;
}

.sx-contact-intent__link-out-icon svg {
  width: 32px;
  height: 32px;
}

.sx-contact-intent__link-out-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: #62BEAC;
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(98, 190, 172, 0.28);
}

.sx-contact-intent__link-out-button:hover {
  background: #4fa694;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(98, 190, 172, 0.38);
  text-decoration: none;
  color: #ffffff !important;
}

.sx-contact-intent__link-out-button svg {
  width: 16px;
  height: 16px;
}

.sx-contact-intent__link-out-hint {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  letter-spacing: 0.2px;
}

/* ============================================================
   Form container — inherits theme's default form styles
   ============================================================ */

.sx-contact-intent__form form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.sx-contact-intent__form form select,
.sx-contact-intent__form form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  color: #12314f;
  background: #ffffff;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.sx-contact-intent__form form input:focus,
.sx-contact-intent__form form select:focus,
.sx-contact-intent__form form textarea:focus {
  outline: none;
  border-color: #376CB4;
  box-shadow: 0 0 0 3px rgba(55, 108, 180, 0.12);
}

.sx-contact-intent__form form label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
  display: block;
}

.sx-contact-intent__form form .hs-form-required { color: #E9465C; }

.sx-contact-intent__form form .hs-button,
.sx-contact-intent__form form input[type="submit"] {
  background: #376CB4;
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.3px;
}

.sx-contact-intent__form form .hs-button:hover,
.sx-contact-intent__form form input[type="submit"]:hover {
  background: #2a568f;
  transform: translateY(-1px);
}

.sx-contact-intent__form .hs-error-msg,
.sx-contact-intent__form .hs-error-msgs label {
  color: #E9465C;
  font-size: 13px;
  margin-top: 4px;
}

/* ============================================================
   Quick chat panel — links grid
   ============================================================ */

.sx-contact-intent__quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.sx-contact-intent__quick-link {
  --sx-quick-accent: #376CB4;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sx-contact-intent__quick-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15, 30, 60, 0.12);
  border-color: var(--sx-quick-accent);
  text-decoration: none;
}

.sx-contact-intent__quick-link--whatsapp { --sx-quick-accent: #25D366; }
.sx-contact-intent__quick-link--email    { --sx-quick-accent: #376CB4; }
.sx-contact-intent__quick-link--phone    { --sx-quick-accent: #62BEAC; }

.sx-contact-intent__quick-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--sx-quick-accent) 14%, transparent);
  color: var(--sx-quick-accent);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .sx-contact-intent__quick-icon { background: #f0f4f9; }
}

.sx-contact-intent__quick-icon svg {
  width: 22px;
  height: 22px;
}

.sx-contact-intent__quick-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sx-contact-intent__quick-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6b7280;
}

.sx-contact-intent__quick-value {
  font-size: 16px;
  font-weight: 700;
  color: #12314f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sx-contact-intent__quick-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
