/* Login / Signup dialog — full viewport on small screens, centered card on large */

html.travelgo-auth-modal--scroll-lock,
html.travelgo-auth-modal--scroll-lock body {
  overflow: hidden;
}

.travelgo-auth-modal[hidden] {
  display: none !important;
}

.travelgo-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .travelgo-auth-modal {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
}

.travelgo-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.travelgo-auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 900px);
  margin: 0;
  background: var(--tg-white, #fff);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  outline: none;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .travelgo-auth-modal__dialog {
    border-radius: 20px;
    max-height: min(88vh, 900px);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  }
}

.travelgo-auth-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.travelgo-auth-modal__title {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tg-text, #1c1c1c);
  letter-spacing: -0.02em;
}

.travelgo-auth-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--tg-bg, #f4f7f9);
  color: var(--tg-text, #1c1c1c);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.travelgo-auth-modal__close:hover {
  background: rgba(0, 140, 255, 0.1);
  color: var(--tg-blue, #008cff);
}

.travelgo-auth-modal__body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 20px;
  min-height: 0;
}

@media (min-width: 600px) {
  .travelgo-auth-modal__body {
    padding: 18px 22px 24px;
  }
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell {
  max-width: 100%;
  min-width: 0;
}

.travelgo-auth-modal-panel .woocommerce-form-login,
.travelgo-auth-modal-panel .woocommerce-form-register {
  max-width: none;
}

.travelgo-auth-modal-panel .u-columns {
  display: block;
}

.travelgo-auth-modal-panel .u-column1,
.travelgo-auth-modal-panel .u-column2 {
  width: 100%;
  float: none;
}

/* Match My Account form styling inside modal (shell is not body.travelgo-wc-account) */
.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-classic-login__wrap {
  margin: 0 0 0.75rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-classic-login__toggle {
  display: inline;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--tg-blue, #008cff);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-classic-login__panel[hidden] {
  display: none !important;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell
  .woocommerce-form-login
  .travelgo-wc-classic-login__panel[hidden]
  ~ .form-row:has(.woocommerce-form-login__submit),
.travelgo-auth-modal-panel.travelgo-wc-account-shell
  .woocommerce-form-login
  .travelgo-wc-classic-login__panel[hidden]
  ~ .woocommerce-LostPassword.lost_password {
  display: none !important;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce form .form-row {
  margin-bottom: 1rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce form .form-row label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--tg-text, #1c1c1c);
  margin-bottom: 6px;
  display: block;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce form input.input-text,
.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce form textarea,
.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce form select {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.4;
  background: var(--tg-white, #fff);
  color: var(--tg-text, #1c1c1c);
  box-sizing: border-box;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce .button,
.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce button.button {
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 12px 22px;
  line-height: 1.3;
  background: linear-gradient(180deg, var(--tg-orange, #ff6d38) 0%, var(--tg-orange-dark, #e85a2a) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 109, 56, 0.35);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-alt {
  max-width: none;
  margin-bottom: 1.25rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-google-host {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-google-host > div {
  width: 100% !important;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp {
  background: var(--tg-bg, #f4f7f9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1rem 1.125rem 1.125rem;
  margin-bottom: 1rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--tg-text, #1c1c1c);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--tg-muted, #5f6368);
  line-height: 1.45;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__label {
  display: block;
  margin-bottom: 0.5rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__input {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  font-size: 16px;
  box-sizing: border-box;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__send,
.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__verify {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  box-sizing: border-box;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__send {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--tg-white, #fff);
  color: var(--tg-text, #1c1c1c);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-otp__verify.button {
  background: linear-gradient(180deg, var(--tg-blue, #008cff) 0%, var(--tg-blue-dark, #0063c6) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 140, 255, 0.28);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-status {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--tg-text, #1c1c1c);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-status.is-error {
  color: #b91c1c;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-alt__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 1rem;
  color: var(--tg-muted, #5f6368);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-alt__or::before,
.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-wc-auth-alt__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

/* Stack login above register; register column hidden until “Create an account”. */
.travelgo-auth-modal-panel.travelgo-wc-account-shell #customer_login.u-columns {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell #customer_login .u-column1,
.travelgo-auth-modal-panel.travelgo-wc-account-shell #customer_login .u-column2 {
  width: 100%;
  max-width: none;
  float: none;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell:not(.travelgo-auth-modal-panel--register-open) #customer_login .u-column2 {
  display: none !important;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell.travelgo-auth-modal-panel--register-open #customer_login .u-column2 {
  display: block !important;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell.travelgo-auth-modal-panel--register-open .travelgo-auth-modal-register-gate {
  display: none;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell #customer_login .u-column1 > h2 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tg-muted, #5f6368);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell #customer_login .u-column2 {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell #customer_login .u-column2 > h2 {
  margin: 0 0 0.75rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tg-text, #1c1c1c);
  letter-spacing: -0.02em;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-register {
  margin: 0;
  padding: 1rem 1.125rem 1.125rem;
  background: var(--tg-bg, #f4f7f9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-sizing: border-box;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-register > p {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--tg-muted, #5f6368);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-register .form-row {
  margin-bottom: 0.85rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-register .form-row:last-of-type {
  margin-bottom: 0;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-register .woocommerce-form-register__submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.35;
  background: linear-gradient(180deg, var(--tg-blue, #008cff) 0%, var(--tg-blue-dark, #0063c6) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 140, 255, 0.28);
  cursor: pointer;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-login .woocommerce-form-login__submit {
  width: 100%;
  margin-top: 0.35rem;
  background: linear-gradient(180deg, var(--tg-orange, #ff6d38) 0%, var(--tg-orange-dark, #e85a2a) 100%);
  box-shadow: 0 4px 16px rgba(255, 109, 56, 0.35);
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .woocommerce-form-login .form-row:has(.woocommerce-form-login__submit) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-reg-otp {
  margin-top: 0;
  margin-bottom: 1rem;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-reg-otp__send,
.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-reg-otp__verify {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.875rem;
  box-sizing: border-box;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-reg-otp__send {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--tg-white, #fff);
  color: var(--tg-text, #1c1c1c);
  cursor: pointer;
}

.travelgo-auth-modal-panel.travelgo-wc-account-shell .travelgo-reg-otp__verify {
  background: linear-gradient(180deg, var(--tg-blue, #008cff) 0%, var(--tg-blue-dark, #0063c6) 100%);
  color: #fff !important;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 140, 255, 0.28);
  cursor: pointer;
}

.travelgo-auth-modal-register-gate {
  margin: 1rem 0 0;
}

.travelgo-auth-modal__register-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border-radius: 999px;
  border: 2px solid rgba(0, 140, 255, 0.35);
  background: var(--tg-white, #fff);
  color: var(--tg-blue, #008cff);
  font: inherit;
  font-weight: 800;
  font-size: 0.9375rem;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.travelgo-auth-modal__register-toggle:hover {
  background: rgba(0, 140, 255, 0.08);
  border-color: var(--tg-blue, #008cff);
}

.travelgo-auth-modal__register-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 140, 255, 0.25);
}

.travelgo-auth-modal-register-gate__kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tg-muted, #5f6368);
}

.travelgo-auth-modal-register-gate__label {
  font-size: 0.9375rem;
}

.travelgo-auth-modal-back-wrap {
  margin: 0 0 0.75rem;
}

.travelgo-auth-modal__back-to-login {
  padding: 0;
  border: none;
  background: none;
  color: var(--tg-blue, #008cff);
  font: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.travelgo-auth-modal__back-to-login:hover {
  color: var(--tg-blue-dark, #0063c6);
}
