/* ===== Image Flashcards: enlarge BACK side + yellow background + big Arabic (scoped) ===== */

/* Make the modal card area wider/taller — but NOT for .afd/.avf modals */
[role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [class*="card"] {
  width: min(96vw, 1100px);
  margin: 0 auto;
}

/* Style the back face — exclude text plugin modals */
[role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [class*="back"],
[role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [data-side="back"] {
  background: #FFF3A3 !important;     /* warm yellow */
  border: 0 !important;
  border-radius: 18px;
  min-height: 520px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

/* Big, readable Arabic text on the back — exclude text plugin modals */
[role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [class*="back"],
[role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [data-side="back"] {
  direction: rtl;
  text-align: center;
  font-family: "Scheherazade New","Amiri","Noto Naskh Arabic","Geeza Pro","Tahoma",sans-serif;
  font-weight: 700;
  font-size: clamp(42px, 6.5vw, 84px);
  line-height: 1.1;
  color: #111827;
}

/* Mobile tweak — exclude text plugin modals */
@media (max-width: 640px){
  [role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [class*="back"],
  [role="dialog"][aria-modal="true"]:not(.afd-modal):not(.avf-modal):not([class*="afd"]):not([class*="avf"]) [data-side="back"] {
    min-height: 420px;
    padding: 24px;
    font-size: clamp(32px, 9vw, 56px);
  }
}
