/* ══════════════════════════════════════════════════════════════
   phone-auth.css — نافذة تسجيل الدخول برقم الهاتف (OTP)
   بنفس هوية الموقع: أحمر داكن، ذهبي، خلفية داكنة، خط Tajawal/Amiri
   تعتمد متغيرات CSS المعرّفة في index.html (:root)
══════════════════════════════════════════════════════════════ */

.pa-modal-bg {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
}
.pa-modal-bg.open { display: flex; }

.pa-sheet {
  background: var(--bg-2, #17120a);
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(201, 168, 76, .25);
  border-bottom: none;
  padding: 1.6rem 1.5rem 2.4rem;
  width: 100%; max-width: 480px;
  text-align: center; position: relative;
  animation: paSheetUp .32s cubic-bezier(.22, 1, .36, 1);
}
@keyframes paSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.pa-close {
  position: absolute; top: .9rem; inset-inline-end: .9rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3, #221a0e); border: none; cursor: pointer;
  color: var(--text-3, #8a7a5c); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.pa-close:hover { background: var(--bg-4, #2d2312); color: var(--text, #f0e6d2); }

.pa-icon {
  width: 68px; height: 68px; margin: 0 auto .8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-dim, #5a1512), var(--red, #8c1f1a));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; color: var(--gold-h, #e8c96a);
  box-shadow: 0 8px 24px rgba(140, 31, 26, .35);
}

.pa-title {
  font-family: 'Amiri', serif;
  font-size: 1.35rem; color: var(--text, #f0e6d2);
  margin-bottom: .35rem;
}
.pa-sub {
  font-size: .8rem; color: var(--text-2, #bfae8c);
  line-height: 1.6; margin-bottom: 1.1rem;
}
.pa-sub b { color: var(--gold, #c9a84c); direction: ltr; unicode-bidi: embed; }

.pa-field { margin-bottom: .9rem; text-align: start; }
.pa-field label {
  display: block; font-size: .72rem; color: var(--text-3, #8a7a5c);
  margin-bottom: .35rem; font-weight: 700;
}
.pa-input {
  width: 100%; padding: .85rem 1rem;
  background: var(--bg-3, #221a0e);
  border: 1px solid rgba(201, 168, 76, .25);
  border-radius: 10px;
  color: var(--text, #f0e6d2);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem; font-weight: 700;
  transition: border-color .2s, box-shadow .2s;
  direction: ltr; text-align: center; letter-spacing: .05rem;
}
.pa-input::placeholder { color: var(--text-3, #8a7a5c); font-weight: 400; letter-spacing: 0; }
.pa-input:focus {
  outline: none; border-color: var(--gold, #c9a84c);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, .12);
}
.pa-input.pa-otp { font-size: 1.5rem; letter-spacing: .55rem; font-weight: 800; }

.pa-btn {
  width: 100%; padding: .9rem;
  background: linear-gradient(135deg, var(--gold-dim, #8a6f2a), var(--gold, #c9a84c));
  border: none; border-radius: 10px;
  color: var(--bg-0, #0c0906); font-size: .95rem; font-weight: 800;
  font-family: 'Tajawal', sans-serif; cursor: pointer;
  transition: opacity .2s, transform .2s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.pa-btn:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.pa-btn:disabled { opacity: .55; cursor: not-allowed; }

.pa-btn-ghost {
  margin-top: .6rem; width: 100%; padding: .7rem;
  background: transparent; border: 1px solid rgba(201, 168, 76, .3);
  border-radius: 10px; color: var(--gold, #c9a84c);
  font-size: .8rem; font-weight: 700; font-family: 'Tajawal', sans-serif;
  cursor: pointer; transition: background .2s;
}
.pa-btn-ghost:hover:not(:disabled) { background: rgba(201, 168, 76, .08); }
.pa-btn-ghost:disabled { opacity: .45; cursor: not-allowed; }

.pa-error {
  display: none;
  background: rgba(140, 31, 26, .18);
  border: 1px solid rgba(220, 80, 70, .35);
  color: #f0a8a0; border-radius: 8px;
  font-size: .75rem; padding: .55rem .8rem; margin-bottom: .8rem;
  line-height: 1.5;
}
.pa-error.show { display: block; }

.pa-success {
  display: none;
  color: #9fd8a0; font-size: .85rem; font-weight: 700;
  margin-bottom: .6rem;
}
.pa-success.show { display: block; }

.pa-step { display: none; }
.pa-step.active { display: block; }

.pa-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(12, 9, 6, .3); border-top-color: var(--bg-0, #0c0906);
  border-radius: 50%; display: none;
  animation: paSpin .7s linear infinite;
}
@keyframes paSpin { to { transform: rotate(360deg); } }
.pa-btn.loading .pa-spinner { display: inline-block; }
.pa-btn.loading .pa-btn-label { opacity: .7; }

@media (min-width: 600px) {
  .pa-modal-bg { align-items: center; }
  .pa-sheet { border-radius: 20px; border-bottom: 1px solid rgba(201, 168, 76, .25); }
}
