/* =====================================================
   GP COMMAND ROUTER — طبقة التعديلات الصوتية
   هذا الملف يُدار آلياً بواسطة موجّه الأوامر (FAC33).
   لا تعدّله يدوياً — آخر نسخة احتياطية: gp-override-backup.css
   ===================================================== */

/* =====================================================
   1. TEXT SELECTION — light gold bg, dark text
   ===================================================== */
::selection {
  background-color: #F2D98C; /* soft light gold */
  color: #221B0D;            /* deep warm dark */
  text-shadow: none;
}

/* Firefox legacy prefix — must stay in its own rule */
::-moz-selection {
  background-color: #F2D98C;
  color: #221B0D;
  text-shadow: none;
}

/* Keep selection legible on links and buttons too */
a::selection,
button::selection,
span::selection {
  background-color: #F2D98C;
  color: #221B0D;
}

/* =====================================================
   2. CARD HOVER — subtle lift effect
   [class~="card"] matches the exact "card" class token
   only, so .card-header / .card-body stay untouched.
   ===================================================== */
.card,
[class~="card"],
.gp-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.card:hover,
[class~="card"]:hover,
.gp-card:hover {
  transform: translateY(-6px); /* gentle upward lift */
  box-shadow: 0 14px 30px rgba(34, 27, 13, 0.12),
              0 4px 10px rgba(34, 27, 13, 0.08);
}

/* Accessibility: disable motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .card,
  [class~="card"],
  .gp-card {
    transition: none;
    will-change: auto;
  }

  .card:hover,
  [class~="card"]:hover,
  .gp-card:hover {
    transform: none;
  }
}

/* =====================================================
   3. KEYBOARD FOCUS — clear, elegant gold focus ring
   :focus-visible targets keyboard navigation only, so
   mouse / touch users keep the clean default look.
   Dark warm ring + light gold halo = readable on both
   light and dark surfaces.
   ===================================================== */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #221B0D;                   /* deep warm dark ring */
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(242, 217, 140, 0.9); /* light gold halo */
}

/* Mouse / touch focus: suppress the default ring only.
   Box-shadow is untouched so designed button shadows
   are never removed on click. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
  outline: none;
}

/* Fallback for browsers without :focus-visible support */
@supports not selector(:focus-visible) {
  a:focus,
  button:focus,
  .btn:focus,
  [role="button"]:focus {
    outline: 2px solid #221B0D;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(242, 217, 140, 0.9);
  }
}

/* Windows High Contrast: let the system draw the ring */
@media (forced-colors: active) {
  a:focus-visible,
  button:focus-visible,
  .btn:focus-visible,
  [role="button"]:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }
}