/* Google Dynamic Login — account pill + bottom sheet + bottom badge */

.fx-gdl-root,
.fx-gdl-sheet,
.fx-gdl-badge,
.fx-gdl-btn,
.fx-gdl-form {
  font-family: var(--font-inter, 'Satoshi', 'Inter', system-ui, sans-serif);
}

.fx-gdl-hero {
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
  min-width: min(320px, 100%);
}

.fx-hero2__actions .fx-gdl-hero,
.st-hero__actions .fx-gdl-hero {
  width: auto;
  max-width: 100%;
}

.fx-gdl-pill {
  position: relative;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  overflow: hidden;
}

.fx-gdl-pill__face {
  position: relative;
  z-index: 1;
  display: none;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px 8px 10px;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: var(--color-midnight-ink, #171526);
  color: var(--surface-card, #fff);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.fx-gdl-hero.is-personalized .fx-gdl-pill__face {
  display: flex;
}

.fx-gdl-hero.is-personalized .fx-gdl-pill__face[hidden] {
  display: flex !important;
}

.fx-gdl-pill__ava {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--color-notion-blue, #fa2f62);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
}

.fx-gdl-pill__meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.fx-gdl-pill__meta strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-gdl-pill__meta small {
  font-size: 11px;
  color: color-mix(in srgb, var(--surface-card, #fff) 62%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-gdl-pill__meta small i {
  font-size: 9px;
  margin-left: 2px;
  opacity: 0.8;
}

.fx-gdl-pill__g {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.fx-gdl-pill__g svg { display: block; }

/* Official GIS button — must stay visible for FedCM account chooser */
.fx-gdl-pill__native {
  position: relative;
  z-index: 2;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.fx-gdl-hero.is-personalized .fx-gdl-pill__native {
  /* Keep a real hit target for switching accounts, but prefer our face UI */
  position: absolute;
  inset: 0;
  opacity: 0.01;
  overflow: hidden;
}

.fx-gdl-pill__native > div,
.fx-gdl-pill__native iframe {
  border-radius: 999px !important;
}

.fx-gdl-root[hidden],
.fx-gdl-badge[hidden] {
  display: none !important;
}

.fx-gdl-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: color-mix(in srgb, var(--color-midnight-brand, #171526) 55%, transparent);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.fx-gdl-root.is-open .fx-gdl-overlay { opacity: 1; }

.fx-gdl-sheet {
  position: fixed;
  z-index: 10050;
  left: 50%;
  bottom: 0;
  top: auto;
  width: min(480px, 100%);
  max-height: min(92vh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface-card, var(--color-pure-white, #fff));
  color: var(--color-midnight-ink, #171526);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 60px color-mix(in srgb, var(--color-midnight-brand, #171526) 28%, transparent);
  padding: 12px 24px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 110%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-gdl-root.is-open .fx-gdl-sheet {
  transform: translate(-50%, 0);
}

.fx-gdl-sheet__handle {
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-smoke, #d9d6cf);
  margin: 4px auto 16px;
}

.fx-gdl-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--color-paper-mist, #f4f3f1);
  color: var(--color-midnight-ink, #37352f);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-gdl-sheet__close:hover { background: var(--color-ash-solid, #ebe9e4); }

.fx-gdl-panel { display: none; }
.fx-gdl-panel.is-active {
  display: block;
  animation: fxGdlIn 0.35s ease both;
}

@keyframes fxGdlIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.fx-gdl-avatar {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--color-notion-blue, #6d28d9);
  color: #fff;
  margin: 4px auto 18px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
  font-family: var(--font-inter, 'Satoshi', 'Inter', system-ui, sans-serif);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--color-notion-blue, #6d28d9) 28%, transparent);
}

.fx-gdl-avatar span {
  line-height: 1;
  text-transform: uppercase;
}

.fx-gdl-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
  color: var(--color-midnight-ink, #171526);
  text-align: center;
  letter-spacing: -0.02em;
}

.fx-gdl-sub {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-fog, #6b6980);
  text-align: center;
}

.fx-gdl-title--left,
.fx-gdl-sub--left {
  text-align: left;
}

.fx-gdl-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
}

.fx-gdl-stepper__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-silver, #9b98ab);
}

.fx-gdl-stepper__item.is-active { color: var(--color-midnight-ink, #171526); }
.fx-gdl-stepper__item.is-done { color: var(--color-vivid-green, #16a34a); }

.fx-gdl-stepper__num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: var(--color-paper-mist, #f4f3f1);
  border: 1px solid var(--color-ash-solid, #e5e3dc);
  color: inherit;
}

.fx-gdl-stepper__item.is-active .fx-gdl-stepper__num {
  background: var(--color-midnight-ink, #171526);
  color: var(--surface-card, #fff);
  border-color: var(--color-midnight-ink, #171526);
}

.fx-gdl-stepper__item.is-done .fx-gdl-stepper__num {
  background: var(--color-vivid-green, #16a34a);
  color: #fff;
  border-color: var(--color-vivid-green, #16a34a);
}

.fx-gdl-stepper__line {
  flex: 1;
  height: 1px;
  background: var(--color-ash-solid, #ebe9e4);
}

.fx-gdl-step { display: none; }
.fx-gdl-step.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fxGdlIn 0.3s ease both;
}

.fx-gdl-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-gdl-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-fog, #6b6980);
  margin-bottom: 6px;
}

.fx-gdl-opt { font-weight: 500; color: var(--color-silver, #a3a0b2); }

.fx-gdl-form input,
.fx-gdl-form select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--color-ash-solid, #e5e3dc);
  background: var(--color-paper-mist, #faf9f7);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--color-midnight-ink, #171526);
  outline: none;
}

.fx-gdl-form input:focus {
  border-color: var(--color-notion-blue, #0075de);
  background: var(--surface-card, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-notion-blue, #0075de) 18%, transparent);
}

.fx-gdl-form input[readonly] {
  opacity: 0.85;
  background: var(--color-smoke, #f0eeea);
}

.fx-gdl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fx-gdl-country-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  opacity: 0 !important;
}

.fx-gdl-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-gdl-actions--row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.fx-gdl-actions--row .fx-gdl-btn--primary {
  flex: 1;
  max-width: 220px;
  margin-left: auto;
}

.fx-gdl-tos {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--color-fog, #6b6980);
  line-height: 1.45;
}

.fx-gdl-tos a { color: var(--color-notion-blue, #0075de); }
.fx-gdl-tos input { margin-top: 2px; accent-color: var(--color-notion-blue, #0075de); }

.fx-gdl-error {
  margin: 0;
  font-size: 13px;
  color: #f87171;
  background: color-mix(in srgb, #ef4444 14%, var(--surface-card, #fff));
  border: 1px solid color-mix(in srgb, #ef4444 28%, var(--surface-card, #fff));
  border-radius: 12px;
  padding: 10px 12px;
}

.fx-gdl-phone {
  display: flex;
  gap: 0;
  margin-top: 0;
  border-radius: 14px;
  border: 1px solid var(--color-ash-solid, #e5e3dc);
  background: var(--color-paper-mist, #faf9f7);
  overflow: visible;
}

.fx-gdl-phone:focus-within {
  border-color: var(--color-notion-blue, #0075de);
  background: var(--surface-card, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-notion-blue, #0075de) 18%, transparent);
}

.fx-gdl-form .fx-phone-select {
  position: relative;
  flex-shrink: 0;
}

.fx-gdl-form .fx-phone-select__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--color-ash-solid, #e5e3dc);
  cursor: pointer;
  font-size: 14px;
  color: var(--color-midnight-ink, #171526);
  height: 48px;
}

.fx-gdl-form .fx-phone-select__trigger:hover {
  background: color-mix(in srgb, var(--color-midnight-ink, #171526) 4%, transparent);
}

.fx-gdl-form .fx-phone-select__flag {
  font-size: 18px;
  line-height: 1;
}

.fx-gdl-form .fx-phone-select__dial {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.fx-gdl-phone__input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.fx-gdl-phone__input input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  height: 48px;
  padding: 0 14px !important;
}

.fx-gdl-form .fx-phone-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 280px;
  max-height: 320px;
  background: var(--surface-card, #fff);
  border: 1px solid var(--color-ash-solid, #e5e3dc);
  border-radius: 12px;
  box-shadow: 0 8px 30px color-mix(in srgb, var(--color-midnight-brand, #171526) 18%, transparent);
  z-index: 120;
  overflow: hidden;
  color: var(--color-midnight-ink, #171526);
}

.fx-gdl-form .fx-phone-dropdown.is-open {
  display: flex;
  flex-direction: column;
}

.fx-gdl-form .fx-phone-search {
  padding: 8px;
  border-bottom: 1px solid var(--color-ash-solid, #e5e3dc);
}

.fx-gdl-form .fx-phone-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-ash-solid, #e5e3dc);
  border-radius: 8px;
  background: var(--color-paper-mist, #fff);
  color: var(--color-midnight-ink, #171526);
  font-size: 13px;
  box-shadow: none !important;
}

.fx-gdl-form .fx-phone-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.fx-gdl-form .fx-phone-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-midnight-ink, #171526);
}

.fx-gdl-form .fx-phone-option:hover,
.fx-gdl-form .fx-phone-option.is-selected {
  background: var(--color-paper-mist, #f5f5f5);
}

.fx-gdl-form .fx-phone-option__flag { font-size: 16px; flex-shrink: 0; }
.fx-gdl-form .fx-phone-option__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-gdl-form .fx-phone-option__dial {
  color: var(--color-fog, #787774);
  font-size: 12px;
  flex-shrink: 0;
}

.fx-gdl-pw {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.fx-gdl-sheet {
  max-height: min(94vh, 760px);
}

.fx-gdl-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 16px;
  padding: 14px 18px;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.fx-gdl-btn--primary {
  background: var(--color-notion-blue, #0075de);
  color: #fff;
}

.fx-gdl-btn--primary:hover { filter: brightness(0.96); }
.fx-gdl-btn--primary:active { transform: translateY(1px); }

.fx-gdl-btn--ghost {
  background: transparent;
  color: var(--color-fog, #6b6980);
}

.fx-gdl-btn--ghost:hover {
  background: var(--color-paper-mist, #f7f6f3);
  color: var(--color-midnight-ink, #171526);
}

/* Finish-registration badge — bottom dock */
.fx-gdl-badge {
  position: fixed;
  z-index: 10060;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  top: auto;
  transform: translate(-50%, 16px);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-gdl-badge.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.fx-gdl-badge__main {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background: var(--color-midnight-ink, #171526);
  color: var(--surface-card, #fff);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--color-midnight-brand, #171526) 35%, transparent);
  font: inherit;
  text-align: left;
  max-width: min(360px, calc(100vw - 72px));
}

.fx-gdl-badge__main:hover { filter: brightness(1.06); }

.fx-gdl-badge__ava {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-notion-blue, #fa2f62);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.fx-gdl-badge__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.fx-gdl-badge__copy strong {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.fx-gdl-badge__copy small {
  font-size: 11px;
  color: color-mix(in srgb, var(--surface-card, #fff) 62%, transparent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.fx-gdl-badge__main > i {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 4px;
}

.fx-gdl-badge__close {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-card, #fff);
  color: var(--color-midnight-ink, #37352f);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--color-midnight-brand, #171526) 18%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-gdl-badge__close:hover { background: var(--color-paper-mist, #f4f3f1); }

@media (max-width: 720px) {
  .fx-gdl-sheet {
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(110%);
  }

  .fx-gdl-root.is-open .fx-gdl-sheet {
    transform: translateY(0);
  }

  .fx-gdl-title { font-size: 20px; }

  .fx-hero2__actions .fx-gdl-hero,
  .st-hero__actions .fx-gdl-hero {
    width: 100%;
  }
}

body.fx-theme-studio .fx-gdl-btn--primary {
  background: var(--color-notion-blue, #fa2f62);
}
