/* ===== OTP Verification Phone + Email Inputs + Modal ===== */

/* Phone input */
.otp-phone-wrap { position: relative; display: flex; flex-direction: column; gap: 6px; }
.otp-phone-input {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 4px 0 6px;
  transition: border-color 140ms, box-shadow 140ms;
}
.otp-phone-input:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,63,68,0.08);
}
.otp-phone-input.is-verified { background: #f6fbf9; border-color: #c8e3d9; }

.otp-cc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 6px 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
}
.otp-cc-btn:hover:not(:disabled) { background: #f3f4f6; }
.otp-cc-btn:disabled { cursor: default; opacity: 0.85; }

.otp-flag {
  width: 26px; height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
  flex: none;
  background: #eee;
}
.otp-flag-md { width: 28px; height: 28px; }

.otp-cc-chev { color: #94a3b8; display: inline-flex; }

.otp-cc-divider {
  width: 1px;
  height: 22px;
  background: #e5e7eb;
  margin: 0 8px 0 4px;
}
.otp-cc-dial {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
  margin-right: 4px;
}
.otp-phone-num {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  height: 100%;
  background: transparent;
  color: #111827;
  font-family: inherit;
}
.otp-phone-num::placeholder { color: #9ca3af; }
.otp-phone-num:disabled { color: #6b7280; }

.otp-verify-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FDE8D0;
  border: none;
  padding: 0 16px;
  height: 36px;
  font-size: 13px;
  color: #E08600;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 500;
  font-family: inherit;
}
.otp-verify-btn:hover { background: #FBDDB8; }

.otp-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  margin-right: 4px;
  border-radius: 999px;
  background: #e6f4ee;
  color: #0d3f44;
  font-size: 12px;
  font-weight: 600;
}

/* Country dropdown */
.otp-cc-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.otp-cc-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f3f5;
  color: #9ca3af;
}
.otp-cc-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: transparent;
}
.otp-cc-search input::placeholder { color: #9ca3af; }

.otp-cc-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}
.otp-cc-list::-webkit-scrollbar { width: 8px; }
.otp-cc-list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.otp-cc-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
}
.otp-cc-item:hover, .otp-cc-item.is-active { background: #f3f4f6; }

.otp-cc-name {
  flex: 1;
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}
.otp-cc-dialpill {
  font-size: 12px;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 2px 10px;
  background: #fff;
}
.otp-cc-sep {
  height: 1px;
  background: #f1f3f5;
  margin: 4px 0;
}
.otp-cc-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

/* Email input */
.otp-email-wrap { display: flex; flex-direction: column; gap: 6px; }
.otp-email-input {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0 4px 0 14px;
  transition: border-color 140ms, box-shadow 140ms;
}
.otp-email-input:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,63,68,0.08);
}
.otp-email-input.is-error { border-color: #dc2626; }
.otp-email-input.is-verified { background: #f6fbf9; border-color: #c8e3d9; }
.otp-email-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  height: 100%;
  background: transparent;
  color: #111827;
  font-family: inherit;
}
.otp-email-input input::placeholder { color: #9ca3af; }

.otp-field-error {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #E08600;
  font-style: italic;
}
.otp-field-error svg { color: #E08600; }

/* ===== OTP Modal ===== */
.otp-modal {
  width: fit-content;
  min-width: 480px;
  max-width: 94vw;
  height: auto;
  min-height: 500px;
  max-height: 92vh;
  padding: 44px 56px 32px;
  text-align: center;
  border-radius: 16px;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.otp-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 370px;
  height: 10px;
  background-color: #104C54;
  border-radius: 0px 0px 20px 20px;
}
.otp-title {
  margin: 0 0 40px;
  font-size: 28px;
  font-weight: 800;
  color: #0a1f24;
  letter-spacing: -0.01em;
}
.otp-modal .ac-modal-close {
  top: 22px;
  inset-inline-end: 24px;
  width: 32px; height: 32px;
}
.otp-modal .ac-modal-close svg { width: 20px; height: 20px; }

.otp-invalid-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 auto 22px;
  width: min(420px, 80%);
}

.otp-sent-line {
  font-size: 14px;
  color: #1f2937;
  margin-top: 0;
}
.otp-sent-target {
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: #0d3f44;
  margin-top: 4px;
  margin-bottom: 28px;
}

.otp-boxes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 0;
}
.otp-box {
  width: 50px;
  height: 50px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  font-size: 20px;
  font-weight: 700;
  color: #0a1f24;
  text-align: center;
  font-family: inherit;
  outline: none;
  transition: border-color 140ms;
}
.otp-box:focus { border-color: #0d3f44; box-shadow: none; }
.otp-box.has-value { border-color: #cbd5e1; }
.otp-box.is-invalid { border-color: #dc2626; color: #0a1f24; }
.otp-sep {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a1f24;
  display: inline-block;
  margin: 0 6px;
}

.otp-timer {
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.otp-timer svg { width: 110px; height: 110px; }
.otp-expired-msg {
  font-size: 14px;
  color: #dc2626;
  font-weight: 500;
}

.otp-resend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  color: #cbd5e1;
  cursor: pointer;
  margin-top: 36px;
  padding: 8px 14px;
  border-radius: 8px;
  align-self: center;
}
.otp-resend:not(.is-disabled) { color: #6b7280; }
.otp-resend:not(.is-disabled):hover { background: #f3f4f6; color: #0d3f44; }
.otp-resend.is-disabled { cursor: default; }

/* Success state */
.otp-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 0 20px;
}
.otp-success-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #f1f7f4;
  border: 3px solid #0d3f44;
  display: flex;
  align-items: center;
  justify-content: center;
}
.otp-success-icon svg { width: 42px; height: 42px; }
.otp-success-title {
  font-size: 22px;
  font-weight: 800;
  color: #0d3f44;
  margin-top: 14px;
}
.otp-success-sub {
  font-size: 15px;
  color: #0d3f44;
}

/* Responsive — stack form fields below 720px */
@media (max-width: 760px) {
  .otp-modal {
    padding: 56px 24px 28px;
    height: auto;
    min-height: 90vh;
  }
  .otp-title { font-size: 26px; margin-bottom: 50px; }
  .otp-box { width: 44px; height: 52px; font-size: 22px; border-radius: 10px; }
  .otp-boxes { gap: 8px; }
  .otp-timer { margin-top: 40px; }
  .otp-timer svg { width: 110px; height: 110px; }
}
