/* ============================================================
   Address Validator — av-modal.css
   Clean, modern, RTL-ready. Mobile-first.
   ============================================================ */

/* ── CSS custom properties ─────────────────────────────────── */
:root {
  --av-accent:        #2563eb;
  --av-accent-dark:   #1d4ed8;
  --av-danger:        #dc2626;
  --av-danger-dark:   #b91c1c;
  --av-surface:       #ffffff;
  --av-bg:            #f8fafc;
  --av-border:        #e2e8f0;
  --av-text-primary:  #0f172a;
  --av-text-secondary:#64748b;
  --av-phone-color:   #1d4ed8;
  --av-highlight-bg:  #eff6ff;
  --av-highlight-border:#bfdbfe;
  --av-radius:        16px;
  --av-radius-sm:     10px;
  --av-shadow:        0 25px 60px rgba(0,0,0,.18), 0 8px 20px rgba(0,0,0,.10);
  --av-overlay-bg:    rgba(15, 23, 42, 0.65);
  --av-transition:    .22s cubic-bezier(.4,0,.2,1);
  --av-font:          'Tajawal', 'Segoe UI', Arial, sans-serif;
}

/* ── Overlay ────────────────────────────────────────────────── */
.av-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--av-overlay-bg);
  display: none;                  /* hidden by default — JS toggles to flex */
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* JS adds this class when opening */
.av-overlay.av-active {
  display: flex !important;
  animation: av-fadeIn var(--av-transition) forwards;
}

@keyframes av-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal card ─────────────────────────────────────────────── */
.av-modal {
  background: var(--av-surface);
  border-radius: var(--av-radius);
  box-shadow: var(--av-shadow);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: av-slideUp .28s cubic-bezier(.34,1.56,.64,1) forwards;
  font-family: var(--av-font);
}

@keyframes av-slideUp {
  from { transform: translateY(32px) scale(.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* ── Header ─────────────────────────────────────────────────── */
.av-modal__header {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff;
  padding: 28px 24px 24px;
  text-align: center;
}

.av-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  border: 2px solid rgba(255,255,255,.35);
}

.av-modal__icon svg {
  width: 26px;
  height: 26px;
  color: #fff;
  stroke: #fff;
}

.av-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.4;
}

.av-modal__subtitle {
  font-size: .875rem;
  opacity: .85;
  margin: 0;
  line-height: 1.5;
}

/* ── Body ───────────────────────────────────────────────────── */
.av-modal__body {
  padding: 20px 24px;
  background: var(--av-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Data rows ──────────────────────────────────────────────── */
.av-row {
  background: var(--av-surface);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--av-transition);
}

.av-row--highlight {
  background: var(--av-highlight-bg);
  border-color: var(--av-highlight-border);
}

.av-row__label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--av-text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.av-row__value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--av-text-primary);
  line-height: 1.5;
  word-break: break-word;
}

/* Phone gets extra visual weight */
.av-row__value--phone {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--av-phone-color);
  letter-spacing: .03em;
  direction: ltr;
  text-align: right;
}

/* ── Footer / Buttons ───────────────────────────────────────── */
.av-modal__footer {
  padding: 16px 24px 24px;
  background: var(--av-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.av-btn {
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: var(--av-radius-sm);
  font-family: var(--av-font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background var(--av-transition);
  letter-spacing: .02em;
  line-height: 1;
}

.av-btn:active {
  transform: scale(.97);
}

/* Confirm — primary CTA */
.av-btn--confirm {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22,163,74,.35);
}

.av-btn--confirm:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  box-shadow: 0 6px 20px rgba(22,163,74,.45);
  transform: translateY(-1px);
}

/* Edit — secondary ghost */
.av-btn--edit {
  background: transparent;
  color: var(--av-accent);
  border: 2px solid var(--av-accent);
  box-shadow: none;
}

.av-btn--edit:hover {
  background: var(--av-highlight-bg);
  border-color: var(--av-accent-dark);
  color: var(--av-accent-dark);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .av-modal {
    border-radius: 14px;
  }
  .av-modal__header {
    padding: 22px 18px 18px;
  }
  .av-modal__title {
    font-size: 1.1rem;
  }
  .av-modal__body {
    padding: 16px 18px;
  }
  .av-modal__footer {
    padding: 12px 18px 20px;
  }
  .av-row__value--phone {
    font-size: 1.15rem;
  }
}

/* ── Google Fonts (Tajawal for Arabic) ──────────────────────── */
/* Load via PHP wp_enqueue_style for performance; this is a fallback hint */
