/* ============================================================
   AUTH.CSS — Login modal & user chip styles
   ============================================================ */

/* ===== LOGIN BUTTON IN HEADER ===== */
.login-btn-header {
  background: none;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
.login-btn-header:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ===== USER CHIP (shown when logged in) ===== */
.user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 4px 4px 12px;
  font-size: 0.8rem;
}
#chip-phone {
  color: var(--color-text);
  font-weight: 500;
  white-space: nowrap;
}
.user-chip-orders,
.user-chip-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.user-chip-orders {
  color: var(--color-primary);
  font-weight: 600;
}
.user-chip-orders:hover { background: rgba(201,161,74,0.12); }
.user-chip-logout { color: var(--color-text-light); }
.user-chip-logout:hover { background: #fdecea; color: #c0392b; }

/* ===== AUTH MODAL BOX ===== */
.auth-box { max-width: 380px; }

.auth-box h3 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}

.auth-hint {
  font-size: 0.87rem;
  color: var(--color-text-light);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ===== PHONE INPUT ROW ===== */
.auth-phone-row {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #fff;
  transition: border-color 0.2s;
}
.auth-phone-row:focus-within { border-color: var(--color-primary); }

.auth-cc {
  padding: 0 12px;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  border-right: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  white-space: nowrap;
  user-select: none;
}

#auth-phone-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 12px;
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
}

/* ===== OTP INPUT ===== */
.auth-otp-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.5em;
  padding: 14px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 14px;
  font-family: monospace;
  transition: border-color 0.2s;
}
.auth-otp-input:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* ===== ERROR TEXT ===== */
.auth-error {
  color: #c0392b;
  font-size: 0.82rem;
  min-height: 18px;
  margin-top: 6px;
}

/* ===== SUCCESS STEP ===== */
.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e6f4ea;
  color: #1e8449;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 16px;
}
#auth-step-success h3,
#auth-step-success .auth-hint {
  text-align: center;
}

/* ===== MY ORDERS MODAL ===== */
#my-orders-list {
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 2px;
  margin-top: 12px;
}

.auth-empty {
  text-align: center;
  color: var(--color-text-light);
  padding: 36px 0;
  font-size: 0.9rem;
}

.my-order-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--color-bg-alt);
}

.my-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.my-order-id {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-primary-dark);
}

.my-order-date {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.my-order-items {
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.my-order-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--color-text);
  gap: 8px;
}
.my-order-item span:first-child { flex: 1; }
.my-order-item span:last-child  { white-space: nowrap; font-weight: 500; }

.my-order-total {
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 0.85rem;
  text-align: right;
}

/* ===== RECAPTCHA (invisible, keep out of flow) ===== */
#recaptcha-container { position: fixed; bottom: 0; left: 0; z-index: -1; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .login-btn-header { padding: 6px 12px; font-size: 0.78rem; }
  #chip-phone { display: none; }
  .user-chip { padding: 4px 4px; gap: 2px; }
  .user-chip-orders, .user-chip-logout { padding: 4px 6px; font-size: 0.72rem; }
}
