/* ===== Login / OTP Styles ===== */

/* --- See How Link --- */
.see-how-link {
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.see-how-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* --- Partner ID Guide Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-md, 12px);
  padding: 32px;
  max-width: 860px;
  width: 92%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-tertiary);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--border-light, #f0f0f0);
  color: var(--text-primary);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.5;
}

.modal-gif-wrapper {
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-gif {
  display: block;
  width: 100%;
  min-width: 100%;
  height: auto;
  object-fit: contain;
}

/* --- OTP Input Group --- */
.otp-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0;
}

.otp-digit {
  width: 52px;
  height: 60px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  caret-color: var(--brand);
}

.otp-digit:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43, 126, 188, 0.1);
  transform: translateY(-2px);
}

.otp-digit.filled {
  border-color: var(--brand);
  background: var(--surface-brand-light);
}

.otp-digit.error {
  border-color: var(--error);
  animation: shake 0.4s ease;
}

.otp-separator {
  width: 12px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  flex-shrink: 0;
}

/* --- Auth Error Message --- */
.auth-error {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  margin: 12px 0;
  text-align: center;
}

/* --- OTP Timer --- */
.otp-timer {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 20px;
}

.otp-timer strong {
  color: var(--brand);
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.otp-timer.expired strong {
  color: var(--error);
}

/* --- Resend Row --- */
.resend-row {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.resend-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

.resend-btn {
  background: none;
  border: none;
  color: var(--brand);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 4px;
  transition: opacity 0.2s;
}

.resend-btn:hover {
  text-decoration: underline;
}

.resend-btn:disabled {
  color: var(--text-tertiary);
  cursor: not-allowed;
  text-decoration: none;
}

/* --- intl-tel-input overrides --- */
.iti {
  width: 100%;
}

.iti__tel-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.iti__tel-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43, 126, 188, 0.1);
}

.iti__tel-input::placeholder {
  color: var(--text-tertiary);
}

/* --- Shake Animation --- */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .otp-digit {
    width: 44px;
    height: 52px;
    font-size: 22px;
  }

  .otp-input-group {
    gap: 6px;
  }

  .otp-separator {
    width: 8px;
  }
}
