:root {
  --primary: #0156a4;
  --primary-hover-color: #0177d5;
  --input-border-color: #e9eaec;
  --focus-border-color: rgba(0, 123, 255, 0.5);
  --white-color: #fff;
  --muted-foreground: #5b5c5d;
  --foreground: #02070d;
  --radius: 12px;

  --action-element-height: 45px;
  --secondary-action-element-height: 45px;
}

body:has(.custom-theme) {
  margin-top: 0 !important;
}

.fp-welcome-text {
  text-align: center;
  max-width: 450px;
  margin: 0 auto;
  padding: 8px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fp-header-message {
  text-align: center;
  max-width: 450px;
  margin: 0 auto;
  padding: 16px 24px;
  background-color: #e8f0fe;
  border-radius: var(--radius);
}

.fp-header-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--foreground);
}

.fp-welcome-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  margin: 0 0 4px;
}

.fp-welcome-subtitle {
  font-size: 16px;
  color: var(--muted-foreground);
  margin: 0;
}

.fp-auth-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 450px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 24px;
  background-color: var(--white-color);
  border: 1px solid #e5e5e5;
}

.fp-auth-wrapper p {
  margin: 0;
}

.fp-auth-image {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}

.fp-auth-image img {
  max-width: 200px;
  width: auto;
  max-height: 60px;
}

.fp-login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.fp-login-header img {
  max-width: 80px;
}

.fp-login-nav-header {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.fp-login-nav-header h1 {
  font-size: 24px;
  font-weight: 600;
}

.fp-login-nav-header p {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.fp-login-nav-header button {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary);
  font-weight: bold;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
}

.divider span {
  padding: 0 8px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--input-border-color);
}
.fp-login-content {
  width: 100%;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fp-login-container {
  width: 100%;
}

.form-group {
  margin-bottom: 0;
  width: 100%;
}

.form-group label {
  font-size: 14px;
  line-height: 20px;
  color: var(--foreground);
  font-weight: 500;
  margin-bottom: 0;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  height: auto;
  margin-bottom: 0;
  color: black !important;
  background-color: var(--white-color);
}

.form-group input {
  height: var(--action-element-height);
}

/* Legacy site.css strips select styling with appearance: none; restore a visible dropdown affordance. */
.form-group select {
  height: var(--action-element-height);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b5c5d' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 5px var(--focus-border-color);
}

.fp-submit-button {
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: var(--white-color);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-transform: uppercase;
}

.fp-submit-button:hover {
  background-color: var(--primary-hover-color);
}

.fp-other-links {
  margin-top: 20px;
  text-align: center;
}

.fp-other-links a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.fp-other-links a:hover {
  color: var(--primary-hover-color);
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.social-button {
  width: 100%;
  max-height: var(--action-element-height);
  color: var(--foreground);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background-color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.social-button:hover {
  color: var(--foreground);
  text-decoration: none;
  background-color: #f9f9f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.socials-bottom {
  & .social-buttons {
    & .social-button {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: unset;
      height: var(--action-element-height);
      min-height: var(--action-element-height);
    
      & .social-button-content {
        display: flex;
        align-items: center;
        & svg {
          flex: 0 0 17px;
          height: 17px;
          width: 17px;
        }
      }

      &.google,
      &.facebook {
        & .social-button-content svg {
          flex: 0 0 15px;
          height: 15px;
          width: 15px;
        }
      }
    }
  }
}

/* .social-button.apple {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.social-button.apple:hover {
  background-color: #1a1a1a;
  color: #fff;
} */

.social-button .social-button-content {
  display: flex;
  width: 100%;
  max-width: 190px;
  gap: 10px;
  margin-right: -20px;
}

.social-button .social-button-content svg {
  flex: 0 0 20px;
  height: 22px;
  width: 20px;
}

.social-button .social-button-content span {
  flex: 1;
}

.social-buttons-inline .social-button .social-button-content span {
  flex: unset;
}

.fp-mdl-tabs-container {
  width: 100%;
}

.fp-mdl-tabs-container ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: stretch;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.7px;
  box-shadow: 0 1px 0 0 #e9eaec;
  background: #fff;
  padding: 0;
  margin: 0;
}

.fp-mdl-tabs-container ul li {
  width: 50%;
  display: block;
  list-style: none;
  float: left;
  padding: 0;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

.fp-mdl-tabs-container ul li span {
  color: #8d9aae;
  letter-spacing: initial;
  padding-bottom: 8px !important;
  padding: 0 10px 11px;
  display: block;
  text-decoration: none;
  font-weight: 500;
  line-height: 1;
}

.fp-mdl-tabs-container .active span {
  font-weight: 700 !important;
  color: black !important;
}

.fp-auth-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fp-go-back-btn {
  flex: 0 0 16px;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.fp-go-back-btn svg {
  width: 16px;
  height: 16px;
  cursor: pointer;
  padding-bottom: 3px;
}

.fp-form-title {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
}

.fp-form-title h1 {
  flex: 1;
  text-align: center;
  font-size: 21px;
  font-weight: bold;
  margin-bottom: 0;
  margin-left: -16px;
  line-height: 1;
}

.fp-form-sub-title,
.fp-form-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.fp-form-sub-title {
  margin-bottom: 10px;
}

.fp-form-footer {
  margin-top: 16px;
}

.fp-form-sub-title p,
.fp-form-footer p {
  font-size: 14px;
  color: #494949;
  margin-bottom: 0;
}

.fp-forgot-password-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#fp-error-message {
  display: none;
  text-align: center;
  color: red;
  margin: 0;
}

.fp-newsletters span {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
  width: 100%;
  text-align: center;
}

.fp-newsletters-line-su {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fp-newsletters-line-su label {
  max-width: 100%;
  margin-bottom: 0;

  display: flex;
  align-items: center;
  gap: 4px;
}

.fp-newsletters-line-su small {
  font-weight: 700;
}

.fp-newsletters-line-su .fp-newsletter-text {
  min-width: 0;
}

.fp-newsletters-line-su .fp-newsletter-description {
  display: block;
  font-size: 0.75em;
  font-weight: 400;
}

.fp-customer-properties {
  width: 100%;
}

.fp-customer-properties > span {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
  width: 100%;
  text-align: center;
}

/* Sliding toggle used by customer property fields declared with "style": "toggle" */
.fp-toggle-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
  cursor: pointer;
  text-align: left;
}

.fp-toggle-switch input[type="checkbox"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.fp-toggle-switch .fp-slider {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 22px;
  background-color: #ccc;
  border-radius: 22px;
  transition: background-color 0.2s ease;
}

.fp-toggle-switch .fp-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.fp-toggle-switch input[type="checkbox"]:checked + .fp-slider {
  background-color: var(--primary);
}

.fp-toggle-switch input[type="checkbox"]:checked + .fp-slider::before {
  transform: translateX(18px);
}

.fp-toggle-switch input[type="checkbox"]:focus-visible + .fp-slider {
  box-shadow: 0 0 0 2px var(--primary);
}

.fp-toggle-switch div {
  font-size: 13px;
  line-height: 1.4;
}

/* SIGN IN/UP START */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.labels-visible .password-toggle {
  top: calc(50% + 15px);
}

.password-toggle:focus {
  outline: none;
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle svg {
  outline: none;
}

#password-field {
  padding-right: 40px !important;
}

.fp-footer-otp {
  width: 100%;
  height: var(--secondary-action-element-height, 40px);
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0;
}

.fp-footer-otp:hover {
  background-color: rgba(1, 86, 164, 0.08);
}

.fp-forgot-pwd {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.fp-btn-forgot-pwd {
  margin: 6px 5px 5px 0;
  margin-left: auto;
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary, #0156a4);
  cursor: pointer;
}

.fp-btn-forgot-pwd:focus {
  outline: none;
}

.fp-btn-forgot-pwd:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* SIGN IN/UP END */

/* PIN CODE START */

.fp-form-pincode {
  position: relative;
  max-width: 400px;
  width: 100%;
  margin: 0 auto !important;
}

.fp-form-pincode .fp-error {
  font-weight: 600;
  color: red;
  text-align: center;
}

.fp-form-pincode h1 {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.fp-form-pincode fieldset {
  border: 0;
  padding: 0;
  margin: 19px 0 22px;
}

.fp-form-pincode fieldset .fp-pincode-wrap {
  display: grid;
  grid-template-columns: repeat(3, 45px) 20px repeat(3, 45px);
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fp-form-pincode .fp-pincode-wrap::before {
  content: "";
  height: 2px;
  width: 12px;
  margin: 0 auto;
  order: 1;
  background: #d1d1d1;
  border-radius: 2px;
  opacity: 0.4;
}

.fp-form-pincode input[type="number"],
.fp-form-pincode input[type="text"] {
  line-height: 1;
  font-size: 35px;
  text-align: center;
  appearance: textfield;
  -webkit-appearance: textfield;
  border: 0;
  color: #333333;
  border-radius: 6px;
  border: 1px solid #d1d1d1;
  padding: unset;
}

.fp-form-pincode input::-webkit-outer-spin-button,
.fp-form-pincode input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fp-form-pincode input[type="number"]:nth-child(n + 4),
.fp-form-pincode input[type="text"]:nth-child(n + 4) {
  order: 2;
}

.fp-form-pincode .fp-pincode-desc {
  text-align: center;
  font-size: 16px;
}

/* PIN CODE END */

/* VERIFY EMAIL START */

#fp-reset-password-by-pin-code {
  flex-direction: column;
}

#fp-password-requested-form {
  gap: 5px;
}

#fp-password-requested-form .fp-btn-pin-code-submit,
#fp-otp-confirmation .fp-pincode-desc {
  display: none;
}

#fp-password-requested-form .fp-form-pincode fieldset {
  margin: 0;
}

#fp-otp-confirmation .fp-form-pincode fieldset {
  margin: 9px 0 25px;
}

#fp-password-requested-form h6 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  text-align: left;
}

#fp-password-requested-form p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-top: 0;
  margin-bottom: 16px;
  text-align: left;
}

#fp-reset-password-error-message {
  text-align: center;
  display: none;
  color: red;
  margin-bottom: 0;
}

#fp-alternative-link {
  font-size: 13px;
  text-align: center;
  margin-top: 8px;
}

/* VERIFY EMAIL END */

/* UTILS START */
.fp-or-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 16px 0;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.fp-or-divider::before,
.fp-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #f4f4f4;
}

.fp-or-divider span {
  padding: 0 10px;
  white-space: nowrap;
}

.fp-error {
  display: none;
}

.fp-error-message {
  color: red;
  font-size: 13px;
  margin: 15px 0 5px !important;
  text-align: center;
}

.fp-sign-in-error {
  margin: 15px 0 0 0 !important;
}

.fp-subtitle {
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  margin-top: 15px !important;
  margin-bottom: -5px !important;
}

.fp-subtitle .fp-otp-email {
  margin: 10px 0 -5px;
  font-weight: 800;
  color: black;
}

.fp-trust-text {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #6b7280;
  text-align: center;
}

.fp-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: block;
}
.fp-form-title-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Margin set due to alignment with go back arrow */
  margin-left: -16px;
}

.fp-submit-button .fp-btn-content-wrapper {
  margin: -12px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* UTILS END */

/* PASSWORD REQUIREMENTS START */
.password-requirements {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  font-size: 13px;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  margin: 6px 0;
  transition: color 0.2s ease;
}

.req-item .req-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  border-radius: 50%;
}

.req-item .req-icon::before {
  content: "○";
  color: #9ca3af;
}

.req-item.valid {
  color: #16a34a;
}

.req-item.valid .req-icon::before {
  content: "✓";
  color: #16a34a;
  font-weight: bold;
}

.req-item.invalid {
  color: #dc2626;
}

.req-item.invalid .req-icon::before {
  content: "x";
  color: #dc2626;
  font-weight: bold;
}

.fp-new-pwd-wrap {
  width: 100%;
}
/* PASSWORD REQUIREMENTS END */

/* LAYOUT OPTIONS START */

/* Side-by-side social buttons (e.g. Google | Facebook on one row) */
.social-buttons-inline {
  flex-direction: row;
  gap: 12px;
}

.social-buttons-inline .social-button {
  flex: 1;
  min-width: 0;
}

.social-buttons-inline .social-button .social-button-content {
  max-width: none;
  margin-right: 0;
  justify-content: center;
}

/* Remember me + Forgot password row */
.fp-remember-forgot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 2px 0;
}

.fp-remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  margin-bottom: 0;
}

.fp-remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

/* "Don't have an account? Sign up" / "Already have an account? Sign in" */
.fp-switch-form-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--muted-foreground);
  margin-top: 8px;
}

.fp-switch-form-link button {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding-bottom: 1px;
}

.fp-switch-form-link button:hover {
  text-decoration: underline;
}

/* LAYOUT OPTIONS END */

/* CUSTOM THEME */
.custom-theme.fp-auth-wrapper {
  gap: 15px;
}

.custom-theme .fp-header {
  padding: 0;
}

.custom-theme .fp-auth-image {
  margin-bottom: 15px;
}

.custom-theme .form-group label {
  line-height: 1;
  margin-bottom: 8px;
}

.custom-theme .divider {
  margin: 10px 0;
  text-transform: lowercase;
}

.custom-theme .divider span {
  padding-bottom: 4px;
}

.custom-theme .divider::before,
.custom-theme .divider::after {
  border-color: #e5e5e5;
}

.custom-theme .fp-submit-button {
  text-transform: capitalize;
}

/* CUSTOM THEME END */

@media screen and (max-width: 767px) {
  .social-buttons-inline {
    flex-direction: column;
  }

  .social-buttons-inline .social-button {
    width: 100%;
  }
  body {
    &:has(.custom-theme) {
      margin: 50px 0 !important;
    }

    & .fp-newsletters {
      margin: 15px 0 5px;
    }
  }
}

@media screen and (max-width: 500px) {
  .fp-auth-image img {
    max-width: 290px !important;
  }

  .fp-welcome-text {
    padding: 5px 5px 5px;
  }

  .fp-login-content {
    gap: 8px;
  }

  [data-fp-element="fp-sign-up-form"] .fp-submit-button {
    margin-top: 10px;
  }
}
