/* ==========================================================================
   WhatsApp Mobile OTP Modal & Checkout Styles
   ========================================================================== */

.astuti-otp-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.astuti-otp-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.astuti-otp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.astuti-otp-dialog {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.astuti-otp-modal.is-open .astuti-otp-dialog {
  transform: translateY(0) scale(1);
}

.astuti-otp-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.astuti-otp-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.astuti-otp-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.astuti-otp-brand-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.astuti-otp-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.astuti-otp-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.astuti-phone-field {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  padding: 4px 12px;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.astuti-phone-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.astuti-phone-prefix {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-right: 8px;
  border-right: 1px solid var(--border);
  margin-right: 10px;
  white-space: nowrap;
}

.astuti-phone-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 1.05rem !important;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  padding: 8px 0;
}

.astuti-otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.astuti-otp-digit {
  width: 48px;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-elevated);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.astuti-otp-digit:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.astuti-otp-phone-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.astuti-otp-phone-display span {
  font-weight: 600;
  color: var(--text);
}

.astuti-otp-change-phone {
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
}

.astuti-otp-msg {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.84rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.astuti-otp-msg.is-error {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FEE2E2;
}

.astuti-otp-msg.is-success {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #D1FAE5;
}

.astuti-otp-resend {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.astuti-otp-resend button {
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.astuti-wc-otp-trigger {
  margin-bottom: 1.5rem;
}

.astuti-wc-otp-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
}

.astuti-wc-otp-divider::before,
.astuti-wc-otp-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.astuti-wc-otp-divider span {
  padding: 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
