/* ============================================================
   signup.css — styles for the 3-step create-account flow
   (country dial-code picker, phone row, OTP block, success).
   Pairs with login.css (shared auth page styling).
   ============================================================ */

.signup-step[hidden], .forgot-step[hidden] { display: none; }
.signup-step, .forgot-step { animation: su-fade 0.3s ease; }
@keyframes su-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

/* ---------- phone row: [country][number] ---------- */
.phone-row { display: flex; gap: 10px; align-items: stretch; }
.phone-input-wrap { flex: 1 1 auto; min-width: 0; }

/* ---------- country dial-code picker ---------- */
.cc-picker { position: relative; flex-shrink: 0; }
.cc-trigger {
  height: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease;
  white-space: nowrap;
}
.cc-trigger:hover, .cc-picker.is-open .cc-trigger { border-color: var(--color-primary); }
.cc-flag { font-size: 1.15rem; line-height: 1; }
.cc-chev { width: 15px; height: 15px; transition: transform 0.25s ease; opacity: 0.7; }
.cc-picker.is-open .cc-chev { transform: rotate(180deg); }

.cc-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  max-width: 78vw;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), 0 3px 10px rgba(0, 0, 0, 0.08);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top left;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.22s;
  z-index: 50;
}
.cc-picker.is-open .cc-menu {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .cc-menu { border-color: rgba(255, 255, 255, 0.08); }

.cc-search-row { padding: 4px 4px 8px; }
.cc-search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface-2, var(--color-surface));
  color: var(--color-text);
  font-size: 0.9rem;
  outline: none;
}
.cc-search:focus { border-color: var(--color-primary); }

.cc-list { max-height: 230px; overflow-y: auto; }
.cc-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  color: var(--color-text);
  font-size: 0.9rem;
}
.cc-option:hover { background: var(--color-primary-soft); }
.cc-option.is-selected { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 700; }
.cc-option .cc-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-option .cc-dial { color: var(--color-text-muted); font-weight: 600; }
.cc-empty { padding: 16px; text-align: center; color: var(--color-text-muted); font-size: 0.88rem; }

/* ---------- OTP block ---------- */
.otp-block { animation: su-fade 0.3s ease; }
.otp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.otp-sent-to { font-size: 0.8rem; color: var(--color-text-muted); }
.link-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 2px;
}
.link-btn:disabled { color: var(--color-text-muted); cursor: default; opacity: 0.7; }

/* ---------- success step ---------- */
.signup-success { text-align: center; padding: 12px 0; }
.signup-success__icon {
  width: 72px; height: 72px;
  margin: 8px auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  animation: su-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.signup-success__icon svg { width: 36px; height: 36px; }
@keyframes su-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.signup-success__title { font-size: 1.3rem; font-weight: 800; margin: 0 0 8px; color: var(--color-text); }
.signup-success__text { font-size: 0.92rem; color: var(--color-text-muted); margin: 0 0 22px; line-height: 1.5; }
