/* --- FOA card: responsive + safe gutters on mobile --- */
#foa-root {
  box-sizing: border-box;

  /* responsive width: full viewport minus horizontal gutters (12px each side) */
  width: calc(100% - 24px);

  /* but never wider than this on desktop/tablet */
  max-width: 420px;

  /* center horizontally, and give vertical spacing */
  margin: 18px auto;

  /* internal padding */
  padding: 20px;

  background: #ffffff;
  border: 2px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-family: 'Montserrat', sans-serif;
  font-weight: bold; 
}

/* Test Mode highlight (stronger green glow) */
#foa-root.foa-test-mode {
  border-color: #28a745;
  box-shadow: 0 6px 22px rgba(40,167,69,0.65);
}

/* Inputs and layout kept responsive */
.foa-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* Country code fixed width, phone uses remaining space */
.foa-country-code {
  flex: 0 0 20%;
  min-width: 56px;
  text-align: center;
  background: #f6f8fb;
  border: 1px solid #d6dce6;
  border-radius: 6px;
  padding: 10px 6px;
  font-size: 18px;
  box-sizing: border-box;
}

/* Phone input flexes and centers content */
#foa-phone {
  flex: 1 1 0;
  width: 0;               /* allow flex to control width */
  border: 1px solid #d6dce6;
  border-radius: 6px;
  padding: 10px;
  font-size: 18px;
  text-align: center;
  box-sizing: border-box;
}

/* --- OTP Channel Selector --- */
.otp-channel-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.otp-channel-option {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 8px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.otp-channel-option input[type="radio"] {
  accent-color: #0073aa; /* matches WP primary blue */
}

.otp-channel-option:hover {
  box-shadow: 0 0 4px rgba(0, 115, 170, 0.3);
  transform: scale(1.03);
}


/* OTP and email full width within card */
#foa-otp, #foa-email {
  width: 100%;
  padding: 10px;
  font-size: 18px;
  border: 1px solid #d6dce6;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: center;
  box-sizing: border-box;
}

/* Buttons */
#foa-send-otp, #foa-verify-otp, #foa-save-email {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #3498db;
  color: #fff;
  margin-bottom: 10px;
  transition: background 0.18s, opacity 0.18s;
}

/* Hover */
#foa-send-otp:hover, #foa-verify-otp:hover, #foa-save-email:hover {
  background: #2980b9;
}

/* Disabled button style (grayed out) */
#foa-save-email[disabled],
#foa-send-otp[disabled],
#foa-verify-otp[disabled] {
  background: #bfcbdc;
  cursor: not-allowed;
  opacity: 0.9;
}

/* Message / status */
#foa-message {
  margin-top: 10px;
  font-size: 14px;
  color: #d64545;
  min-height: 18px;
}

/* Status board style (if enabled) */
#foa-status-board {
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 13px;
  margin-top: 14px;
  padding: 10px;
  border: 1px dashed #ccc;
  background: #fbfbfb;
  color: #222;
  height: 200px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Small screens tweak */
@media (max-width: 420px) {
  /* ensure country code doesn't shrink too small */
  .foa-country-code { min-width: 48px; font-size: 16px; padding: 8px 6px; }
  #foa-phone, #foa-otp, #foa-email { font-size: 16px; padding: 10px; }
  #foa-root { padding: 16px; margin: 14px auto; }
}

/* Larger screens tweak for nicer placement */
@media (min-width: 900px) {
  #foa-root { margin: 32px auto; }
}

/* --- Temporary Developer Debug Panel --- */
.otp-debug-panel {
  margin-top: 15px;
  text-align: center;
}

#otp-debug-box {
  width: 95%;
  max-width: 400px;
  height: 120px;
  padding: 10px;
  font-size: 12px;
  font-family: monospace;
  background: #111;
  color: #0f0;
  border: 1px solid #333;
  border-radius: 8px;
  resize: none;
  overflow-y: auto;
}
