/* ==========================================================================
   TINIBIN INDIA - FIREBASE PHONE OTP & GOOGLE SIGN-IN / SIGN-UP STYLES
   ========================================================================== */

/* Hide legacy password/register clutter by default when Firebase Auth is active */
html body .login-form-side.tbx-fb-drawer-ready:not(.tbx-show-pw-login) form.login {
  display: none !important;
}

html body .login-form-side.tbx-fb-drawer-ready.tbx-show-pw-login form.login {
  display: block !important;
}

html body .login-form-side.tbx-fb-drawer-ready .create-account-question {
  display: none !important;
}

html body.woocommerce-account .woocommerce.tbx-fb-page-ready:not(.tbx-show-pw-login) .wd-registration-page {
  display: none !important;
}

html body.woocommerce-account .woocommerce.tbx-fb-page-ready.tbx-show-pw-login .wd-registration-page {
  margin-top: 26px !important;
  padding-top: 24px !important;
  border-top: 1.5px dashed rgba(224, 159, 62, 0.45) !important;
}

/* Base Widget Container */
html body .tbx-fb-widget {
  position: relative;
  z-index: 5;
  font-family: var(--tbx-font-body, 'Plus Jakarta Sans', -apple-system, sans-serif);
  color: #231917;
  box-sizing: border-box;
}

html body .tbx-fb-widget *,
html body .tbx-fb-widget *::before,
html body .tbx-fb-widget *::after {
  box-sizing: border-box;
}

/* Drawer Context */
html body .login-form-side .tbx-fb-context-drawer {
  padding: 16px 18px 12px;
}

html body .tbx-fb-drawer-sub {
  margin: 0 0 13px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  color: #5C4742 !important;
  font-weight: 400 !important;
}

/* My Account Page Context */
html body .tbx-fb-context-page {
  max-width: 450px;
  margin: 0 auto;
  background-color: #FFFFFF;
  border: 1.5px solid rgba(224, 159, 62, 0.42);
  border-radius: 22px;
  padding: 28px 26px 24px;
  box-shadow: 0 12px 30px rgba(158, 20, 32, 0.08);
}

html body .tbx-fb-page-head {
  text-align: center;
  margin-bottom: 18px;
}

html body .tbx-fb-eyebrow {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background-color: rgba(27, 82, 59, 0.1);
  color: #1B523B !important;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

html body .tbx-fb-context-page h2.tbx-fb-title {
  font-family: var(--tbx-font-display, 'Fraunces', Georgia, serif) !important;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem) !important;
  font-weight: 700 !important;
  color: #9E1420 !important;
  line-height: 1.2 !important;
  margin: 0 0 6px !important;
}

html body .tbx-fb-subtitle {
  margin: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.45 !important;
  color: #5C4742 !important;
}

/* Status & Error Alerts */
html body .tbx-fb-alert {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: 12px;
}

html body .tbx-fb-alert[hidden] {
  display: none !important;
}

html body .tbx-fb-alert-error {
  background-color: #FFF1F1;
  border: 1px solid rgba(214, 40, 40, 0.32);
  color: #9E1420 !important;
}

html body .tbx-fb-alert-success {
  background-color: #EEF9F2;
  border: 1px solid rgba(27, 82, 59, 0.3);
  color: #1B523B !important;
}

html body .tbx-fb-step[hidden] {
  display: none !important;
}

/* Labels */
html body .tbx-fb-widget label.tbx-fb-label {
  display: block !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #231917 !important;
  margin: 0 0 6px !important;
}

/* Unified Country Code + Mobile Input Pill */
html body .tbx-fb-phone-group {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 44px !important;
  background-color: #FFFBF7 !important;
  border: 1.5px solid rgba(158, 20, 32, 0.24) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin-bottom: 11px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

html body .tbx-fb-phone-group:focus-within {
  border-color: #D62828 !important;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.12) !important;
  background-color: #FFFFFF !important;
}

html body .tbx-fb-phone-group select.tbx-fb-cc {
  flex: 0 0 auto !important;
  width: 84px !important;
  min-width: 84px !important;
  max-width: 92px !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 22px 0 12px !important;
  border: none !important;
  border-right: 1px solid rgba(158, 20, 32, 0.16) !important;
  border-radius: 0 !important;
  background-color: rgba(158, 20, 32, 0.04) !important;
  background-position: right 7px center !important;
  background-size: 10px !important;
  color: #231917 !important;
  font-family: var(--tbx-font-body) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
}

html body .tbx-fb-phone-group input.tbx-fb-phone-input {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #231917 !important;
  font-family: var(--tbx-font-body) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  outline: none !important;
}

html body .tbx-fb-phone-group input.tbx-fb-phone-input::placeholder {
  color: #8E7B76 !important;
  font-weight: 400 !important;
}

/* OTP Step */
html body .tbx-fb-otp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #5C4742;
  background-color: #FFF8F0;
  border: 1px solid rgba(224, 159, 62, 0.35);
  border-radius: 10px;
  padding: 7px 10px;
  margin-bottom: 10px;
}

html body .tbx-fb-otp-sent-to strong {
  color: #231917;
  font-weight: 700;
}

html body .tbx-fb-widget input.tbx-fb-otp-input {
  width: 100% !important;
  height: 44px !important;
  margin: 0 0 11px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1.5px solid rgba(158, 20, 32, 0.28) !important;
  background-color: #FFFBF7 !important;
  color: #231917 !important;
  font-family: var(--tbx-font-body) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.32em !important;
  text-align: center !important;
  outline: none !important;
  box-shadow: none !important;
}

html body .tbx-fb-widget input.tbx-fb-otp-input:focus {
  border-color: #D62828 !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.12) !important;
}

/* Primary Crimson CTA Button */
html body .tbx-fb-widget button.tbx-fb-btn-primary {
  width: 100% !important;
  min-height: 43px !important;
  height: 43px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: none !important;
  border-radius: 999px !important;
  background-color: #D62828 !important;
  background-image: linear-gradient(135deg, #D62828 0%, #9E1420 100%) !important;
  color: #FFFFFF !important;
  font-family: var(--tbx-font-body) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 6px 16px rgba(158, 20, 32, 0.24) !important;
  cursor: pointer !important;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease !important;
}

html body .tbx-fb-widget button.tbx-fb-btn-primary span {
  color: #FFFFFF !important;
}

html body .tbx-fb-widget button.tbx-fb-btn-primary:hover:not(:disabled) {
  background-color: #1B523B !important;
  background-image: linear-gradient(135deg, #2D6A4F 0%, #113827 100%) !important;
  transform: translateY(-1px) !important;
}

html body .tbx-fb-widget button.tbx-fb-btn:disabled {
  opacity: 0.68 !important;
  cursor: wait !important;
  transform: none !important;
}

/* Divider */
html body .tbx-fb-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 0;
  color: #8E7B76;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

html body .tbx-fb-divider::before,
html body .tbx-fb-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: rgba(158, 20, 32, 0.14);
}

/* Crisp Official-Style White Google Button */
html body .tbx-fb-widget button.tbx-fb-btn-google,
html body.woocommerce-account .woocommerce .tbx-fb-widget button.tbx-fb-btn-google,
html body .login-form-side .tbx-fb-widget button.tbx-fb-btn-google {
  width: 100% !important;
  min-height: 43px !important;
  height: 43px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  border-radius: 999px !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  border: 1.5px solid rgba(35, 25, 23, 0.2) !important;
  color: #231917 !important;
  font-family: var(--tbx-font-body) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(24, 2, 4, 0.06) !important;
  cursor: pointer !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease !important;
}

html body .tbx-fb-widget button.tbx-fb-btn-google span {
  color: #231917 !important;
}

html body .tbx-fb-widget button.tbx-fb-btn-google:hover:not(:disabled),
html body.woocommerce-account .woocommerce .tbx-fb-widget button.tbx-fb-btn-google:hover:not(:disabled),
html body .login-form-side .tbx-fb-widget button.tbx-fb-btn-google:hover:not(:disabled) {
  background-color: #FFF8F0 !important;
  background-image: none !important;
  border-color: #D62828 !important;
  color: #9E1420 !important;
  transform: translateY(-1px) !important;
}

html body .tbx-fb-google-ico {
  flex: 0 0 18px;
  display: block;
}

/* Text / Toggle Action Buttons */
html body .tbx-fb-widget button.tbx-fb-link-btn,
html body.woocommerce-account .woocommerce .tbx-fb-widget button.tbx-fb-link-btn,
html body .login-form-side .tbx-fb-widget button.tbx-fb-link-btn {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 2px 4px !important;
  min-height: 0 !important;
  height: auto !important;
  color: #9E1420 !important;
  font-family: var(--tbx-font-body) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  cursor: pointer !important;
}

html body .tbx-fb-widget button.tbx-fb-link-btn:hover:not(:disabled) {
  color: #D62828 !important;
  transform: none !important;
}

html body .tbx-fb-widget button.tbx-fb-link-btn:disabled {
  color: #9A8985 !important;
  text-decoration: none !important;
  cursor: default !important;
}

html body .tbx-fb-resend-row {
  text-align: center;
  margin-top: 8px;
}

html body .tbx-fb-pw-toggle-wrap {
  text-align: center;
  margin-top: 12px;
}

html body .tbx-fb-recaptcha-slot {
  min-height: 0;
}

/* Compact Mobile Sizing Across All Phone Screens (<=767px) */
@media (max-width: 767px) {
  html body .login-form-side .tbx-fb-context-drawer {
    padding: 12px 14px 8px;
  }

  html body .tbx-fb-drawer-sub {
    font-size: 12px !important;
    margin-bottom: 10px !important;
  }

  html body .tbx-fb-context-page {
    padding: 20px 16px 18px;
    border-radius: 18px;
  }

  html body .tbx-fb-phone-group {
    height: 39px !important;
    margin-bottom: 9px !important;
  }

  html body .tbx-fb-phone-group select.tbx-fb-cc {
    width: 76px !important;
    min-width: 76px !important;
    padding: 0 18px 0 10px !important;
    font-size: 11.5px !important;
  }

  html body .tbx-fb-phone-group input.tbx-fb-phone-input {
    padding: 0 11px !important;
    font-size: 13px !important;
  }

  html body .tbx-fb-widget input.tbx-fb-otp-input {
    height: 40px !important;
    font-size: 16px !important;
  }

  html body .tbx-fb-widget button.tbx-fb-btn-primary,
  html body .tbx-fb-widget button.tbx-fb-btn-google,
  html body.woocommerce-account .woocommerce .tbx-fb-widget button.tbx-fb-btn-google,
  html body .login-form-side .tbx-fb-widget button.tbx-fb-btn-google {
    height: 38px !important;
    min-height: 38px !important;
    font-size: 12.5px !important;
  }

  html body .tbx-fb-divider {
    margin: 10px 0;
    font-size: 11px;
  }

  html body .tbx-fb-pw-toggle-wrap {
    margin-top: 9px;
  }
}
