/* gg_social — storefront styles.
   Light, modern, and deliberately theme-native: typography is inherited from the
   store theme so the module never fights the surrounding page. Brand tokens follow
   the GadgetGuys guide (navy structure, orange calls-to-action). */

.gg-social,
.gg-social-page {
  --gg-navy: #003366;
  --gg-orange: #ff9966;
  --gg-orange-hi: #ff8447;
  --gg-orange-lo: #f26f28;
  --gg-ink: #22303f;
  --gg-muted: #5b6b80;
  --gg-line: #e3e8ef;
  --gg-line-soft: #eef2f7;
  --gg-surface: #fff;
  --gg-radius: 10px;
  --gg-shadow: 0 1px 2px rgba(16, 36, 64, .04), 0 10px 28px -14px rgba(16, 36, 64, .16);
  /* Inherit the theme's own font so module text matches surrounding store text. */
  font-family: inherit;
}

/* ---------------------------------------------------------------- divider */
.gg-social { margin: 20px 0; }

.gg-social__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 14px;
  color: var(--gg-muted);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.gg-social__divider::before,
.gg-social__divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gg-line), transparent);
}

/* ---------------------------------------------------------------- buttons */
/* Responsive grid: wraps cleanly whether the store enables 1 provider or all 8. */
.gg-social__buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.gg-social__btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 46px;
  padding: 11px 16px;
  border: 1px solid var(--gg-line);
  border-radius: var(--gg-radius);
  background: var(--gg-surface);
  color: var(--gg-navy);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}
.gg-social__btn:hover,
.gg-social__btn:focus-visible {
  border-color: var(--gg-orange);
  background: #fffaf6;
  color: var(--gg-navy);
  text-decoration: none;
  box-shadow: 0 6px 18px -10px rgba(255, 132, 71, .8);
  transform: translateY(-1px);
}
.gg-social__btn:active { transform: translateY(0); }
.gg-social__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 153, 102, .38);
}
.gg-social__icon { display: block; flex: 0 0 auto; }
.gg-social__label { flex: 1 1 auto; }

/* Icon-only mode: compact, centred, square-ish tiles. */
.gg-social__buttons--icon { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
.gg-social__buttons--icon .gg-social__btn { justify-content: center; padding: 11px; }

/* On phones auto-fill drops to a single column, which turns eight providers into
   eight full-width rows. Pin two columns instead (icon-only mode already fits more). */
@media (max-width: 480px) {
  .gg-social__buttons:not(.gg-social__buttons--icon) { grid-template-columns: repeat(2, 1fr); }
  .gg-social__buttons:not(.gg-social__buttons--icon) .gg-social__btn {
    gap: 9px;
    padding: 11px 12px;
    font-size: 13.5px;
  }
}

/* ------------------------------------------------------------ page + card */
.gg-social-page { padding: 8px 0 32px; color: var(--gg-ink); }

.gg-social-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 28px;
  background: var(--gg-surface);
  border: 1px solid var(--gg-line-soft);
  border-radius: 14px;
  box-shadow: var(--gg-shadow);
}
@media (max-width: 480px) { .gg-social-card { padding: 20px; border-radius: 12px; } }

.gg-social-card__title {
  margin: 0 0 6px;
  color: var(--gg-navy);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.gg-social-card__lead { margin: 0 0 22px; color: var(--gg-muted); font-size: 14px; line-height: 1.55; }

/* Small provider badge shown above the form title. */
.gg-social-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 5px 11px;
  border: 1px solid var(--gg-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--gg-muted);
  font-size: 12px;
  font-weight: 600;
}
.gg-social-badge img { display: block; }

/* ---------------------------------------------------------------- fields */
.gg-social-form .form-group { margin-bottom: 16px; }
.gg-social-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--gg-navy);
  font-size: 13px;
  font-weight: 600;
}
.gg-social-form .form-control {
  height: auto;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--gg-line);
  border-radius: var(--gg-radius);
  box-shadow: none;
  color: var(--gg-ink);
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.gg-social-form .form-control:focus {
  border-color: var(--gg-orange);
  box-shadow: 0 0 0 3px rgba(255, 153, 102, .28);
  outline: none;
}
.gg-social-form textarea.form-control { min-height: 96px; }
.gg-social-form .has-error .form-control { border-color: #e0645a; }
.gg-social-form .has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(224, 100, 90, .25); }

.gg-social-req { color: var(--gg-orange-lo); font-weight: 700; }
.gg-social-field-error { margin-top: 6px; color: #c0392b; font-size: 12.5px; }

.gg-social-form .radio,
.gg-social-form .checkbox { margin: 4px 0; }
.gg-social-form .radio label,
.gg-social-form .checkbox label {
  color: var(--gg-ink);
  font-weight: 500;
  font-size: 14px;
}

/* ------------------------------------------------------------------ alert */
.gg-social-alert {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #f3c9c4;
  border-left: 3px solid #e0645a;
  border-radius: 8px;
  background: #fdf3f2;
  color: #9c342a;
  font-size: 13.5px;
  line-height: 1.5;
}

/* -------------------------------------------------------------------- OTP */
.gg-social-otp { display: flex; gap: 8px; align-items: flex-start; }
.gg-social-otp .form-control { flex: 1 1 auto; }
/* intl-tel-input wraps the input in a block-level .iti, so once it initialises
   the wrapper — not the input — is the flex item. Size it, or the field
   collapses to its content width. min-width:0 lets it shrink below intrinsic. */
.gg-social-otp .iti { flex: 1 1 auto; min-width: 0; }
.gg-social-otp .iti .form-control { width: 100%; }

/* The flag + dial code eats the field, so side-by-side leaves almost no room
   for the number on a phone. Stack the button under the field instead. */
@media (max-width: 480px) {
  .gg-social-otp { flex-wrap: wrap; }
  .gg-social-otp .form-control,
  .gg-social-otp .iti { flex: 1 1 100%; }
  .gg-social-otp .gg-social-btn-ghost { flex: 1 1 100%; }
}

.gg-social-btn-ghost {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--gg-navy);
  border-radius: var(--gg-radius);
  background: transparent;
  color: var(--gg-navy);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}
.gg-social-btn-ghost:hover:not(:disabled) { background: var(--gg-navy); color: #fff; }
.gg-social-btn-ghost:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 51, 102, .25); }
.gg-social-btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.gg-social-otp-msg { margin-top: 7px; font-size: 12.5px; line-height: 1.45; }
.gg-social-otp-msg.is-error { color: #c0392b; }
.gg-social-otp-msg.is-ok { color: #1e7a4d; }

/* -------------------------------------------------------------------- CTA */
/* Navy on orange: 6.0:1 contrast (WCAG AA). White on this orange is only 2.1:1. */
.gg-social-cta {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 13px 20px;
  border: none;
  border-radius: var(--gg-radius);
  background: var(--gg-orange);
  color: var(--gg-navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.gg-social-cta:hover,
.gg-social-cta:focus {
  background: var(--gg-orange-hi);
  color: var(--gg-navy);
  box-shadow: 0 10px 22px -12px rgba(242, 111, 40, .9);
  transform: translateY(-1px);
}
.gg-social-cta:active { background: var(--gg-orange-lo); transform: translateY(0); box-shadow: none; }
.gg-social-cta:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 153, 102, .45); }

/* --------------------------------------------------- pending / state page */
.gg-social-state { text-align: center; }
.gg-social-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff1e7, #ffe2d1);
  color: var(--gg-orange-lo);
}
.gg-social-state__icon svg { display: block; }
.gg-social-state__email {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--gg-navy);
  font-weight: 600;
  word-break: break-all;
}
.gg-social-state__hint { margin-top: 16px; color: var(--gg-muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .gg-social__btn,
  .gg-social-cta,
  .gg-social-btn-ghost,
  .gg-social-form .form-control { transition: none; }
  .gg-social__btn:hover,
  .gg-social-cta:hover { transform: none; }
}

/* SMS code field drawn as six slots (default / cyberstore themes): one real input, six underlines on a 1.8ch pitch. */
.form-inline .form-control.gg-code-slots,
.form-control.gg-code-slots {
  box-sizing: content-box;
  display: block;
  width: 11ch;
  max-width: 100%;
  height: 48px;
  padding: 0 .6em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .8ch;
  text-indent: .2ch;
  --ggs-slot: #888;
  /* layer 1 = the six slots (content box only), layer 2 = the field's own fill (whole box) */
  background-color: transparent;
  background-image: repeating-linear-gradient(90deg, var(--ggs-slot) 0 1.4ch, transparent 1.4ch 1.8ch), linear-gradient(#fff, #fff);
  background-size: 10.8ch 3px, auto;
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 8px), 0 0;
  background-origin: content-box, padding-box;
  background-clip: content-box, border-box;
}
/* same slot states as the gg_theme popup: navy while focused, red when the code was refused */
.form-control.gg-code-slots:focus { --ggs-slot: #003366; }
.form-control.gg-code-slots[aria-invalid="true"] { --ggs-slot: #d93a1f; }

/* onboarding (1.8.8 C6): the phone is the one optional field; said next to its label */
.gg-social-opt { color: var(--gg-muted); font-weight: 400; font-size: 12.5px; }
/* account prompts (1.8.8 C3/C14): a dismissed card and the captcha block go away for good */
.gg-account-prompts .gg-ap[hidden], .gg-account-prompts .gg-ap-captcha[hidden] { display: none; }
.gg-account-prompts .gg-ap-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 8px; }
.gg-account-prompts .gg-ap-captcha { margin: 8px 0; }
