/* Protected Embed Flow Styles */

.protected-embed-flow {
  width: 100%;
  overflow: hidden;
}

.protected-embed-flow__container {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.protected-embed-flow__content {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.protected-embed-flow__breadcrumb {
  color: #424D70;
  font-size: 18px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
}

.protected-embed-flow__title {
  color: var(#031241);
  font-size: 36px;
  font-style: normal;
  font-weight: 400;
  line-height: 44px;
  letter-spacing: -0.36px;
}

.protected-embed-flow__description {
  color: var(#424D70);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: 0.04px;
  margin-bottom: 48px;
}

/* States */
.protected-embed-flow__state {
  display: none;
}

.protected-embed-flow__state.is-active {
  display: flex;
  flex-direction: column;
}

/* Form elements */
.protected-embed-flow__form {
  gap: 8px;
}
.protected-embed-flow__label {
  color: var(#3D3D3D);
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: 14px; /* 100% */
  letter-spacing: 0.035px;
}

.protected-embed-flow__input--email {
  display: block;
  width: 100%;
  max-width: 380px;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  max-width: 100%; 
}

.protected-embed-flow__input--email:focus {
  border-color: #1a2350;
}

.protected-embed-flow__input--email.is-error {
  border-color: #dc2626;
}

.protected-embed-flow__terms {
  color: #424D70;
  font-size: 13px;
  line-height: 20px;
}
.protected-embed-flow__terms p {
  margin: 0;
}

.protected-embed-flow__terms a {
  color: #034EA2;
  text-decoration: underline;
}

.protected-embed-flow__terms a:hover {
  color: #152D79;
}

/* Consent checkboxes (privacy policy + terms) */
.protected-embed-flow__consents {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.protected-embed-flow__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  align-items: center;
}

.protected-embed-flow__consent-checkbox {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #034EA2;
  cursor: pointer;
}

.protected-embed-flow__consent-text {
  color: #424D70;
  font-size: 13px;
  line-height: 20px;
}

.protected-embed-flow__consent-text a {
  color: #034EA2;
  text-decoration: underline;
}

.protected-embed-flow__consent-text a:hover {
  color: #152D79;
}

.protected-embed-flow__consent.is-error .protected-embed-flow__consent-text {
  color: #dc2626;
}

.protected-embed-flow__consent.is-error .protected-embed-flow__consent-checkbox {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
}

/* Buttons */
.protected-embed-flow__button {
  display: inline-flex;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
  font-weight: 600;
  background: #034EA2;
  border: none;
  color: #fff;
  padding: 16px;
  min-width: 104px;
  border-radius: 12px 2px;
  cursor: pointer;
  align-self: end;
  margin-top: 48px;
}
.protected-embed-flow__button:hover{
  background: #152D79;
}

.protected-embed-flow__button:disabled {
  background: #9aa3bd;
  opacity: 0.7;
  cursor: not-allowed;
}

.protected-embed-flow__button:disabled:hover {
  background: #9aa3bd;
}

/* Error messages */
.protected-embed-flow__error {
  font-size: 13px;
  color: #dc2626;
  margin-top: 6px;
  min-height: 0;
}

.protected-embed-flow__error:empty {
  display: none;
}

/* OTP inputs */
.protected-embed-flow__otp-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;
}

.protected-embed-flow .protected-embed-flow__otp-digit,
.protected-embed-flow input[type="text"].protected-embed-flow__otp-digit {
  --input-width: auto;
  max-width: 40px;
  width: 40px;
  min-width: 0;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  color: #1a2350;
  padding: 0;
  margin: 0;
  background-color: #fff;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.protected-embed-flow .protected-embed-flow__otp-digit:focus,
.protected-embed-flow input[type="text"].protected-embed-flow__otp-digit:focus {
  border-color: #1a2350;
}

.protected-embed-flow__otp-digit.is-error {
  border-color: #dc2626;
  color: #dc2626;
}

/* Timer */
.protected-embed-flow__timer {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
  min-height: 18px;
}

.protected-embed-flow__timer-text.is-warning {
  color: #dc2626;
}

/* Visual / right side */
.protected-embed-flow__visual {
  position: relative;
  overflow: hidden;
}

/* Loading spinner */
.protected-embed-flow__button .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: protected-embed-spin 0.6s linear infinite;
  margin-right: 8px;
}

.protected-embed-flow__button.is-loading .spinner {
  display: inline-block;
}

.protected-embed-flow__button.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

/* Keep the brand colour while submitting, even though the button is disabled. */
.protected-embed-flow__button.is-loading:disabled {
  background: #034EA2;
}

@keyframes protected-embed-spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .protected-embed-flow__content {
    padding: 24px 20px;
  }

  .protected-embed-flow__visual {
    min-height: 200px;
    order: -1;
  }

  .protected-embed-flow__title {
    font-size: 22px;
  }
}

/* Embed content loaded via AJAX after verification */
.protected-embed-content {
  min-height: 200px;
}

/*
 * Layout adjustments when a verified protected embed is on the page.
 *
 * The body.protected-embed-verified class is toggled by the module JS. We
 * scope the layout changes to the specific two-column layout that contains
 * the verified embed so unrelated layouts on the page are unaffected.
 */
body.protected-embed-verified .layout:has(.paragraph--protected-embed-verified) {
  display: block;
}

body.protected-embed-verified .layout:has(.paragraph--protected-embed-verified) > .layout__region--first {
  width: 100%;
  max-width: 100%;
  flex: 1 1 100%;
}

body.protected-embed-verified .layout:has(.paragraph--protected-embed-verified) > .layout__region--second {
  display: none;
}
