/* ============================================================
   Mavericks Eduversee — Mobile Overflow Fix (v1)
   iPhone 16 Pro (393px) & similar: course university brochure
   grid ke buttons overflow ho rahe the. Fix niche.
   ============================================================ */

/* 1) Global safety: kabhi bhi horizontal scroll na ho */
html, body {
  max-width: 100%;
  overflow-x: hidden !important;
}
#root {
  max-width: 100%;
  overflow-x: hidden;
}

/* 2) Brochure button text wrap ho, cut na ho */
.course-university-cta {
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.2 !important;
  padding-inline: 0.5rem !important;
  min-width: 0 !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

/* 3) Card content kabhi overflow na kare */
.course-university-card,
.course-university-logo,
.course-university-logo img {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 4) iPhone 16 Pro & phones tak (up to 480px): single column
      2-column me "Download Brochure" fit nahi hota, isliye 1 column
      cleaner aur overflow-free hai. */
@media (max-width: 480px) {
  .course-university-grid {
    grid-template-columns: 1fr !important;
    gap: 0.7rem !important;
  }
  .course-university-cta {
    font-size: 0.82rem !important;
    min-height: 42px !important;
  }
}

/* 5) Small tablets / large phones (481px - 640px): keep 2 columns
      but make button text smaller so it fits without overflow. */
@media (min-width: 481px) and (max-width: 640px) {
  .course-university-cta {
    font-size: 0.72rem !important;
  }
}

/* ============================================================
   Enquiry popup — double close (X) button fix
   ------------------------------------------------------------
   The enquiry popup has its OWN custom close button
   (aria-label="Close enquiry form"). The shared DialogContent
   also renders a default Radix close button in the same spot,
   so two X's overlapped. We hide the default Radix one ONLY
   inside this popup, keeping the custom styled button.

   The default Radix close button is the one that contains a
   <span class="sr-only">Close</span>. We hide that specific
   button within .enquiry-mini-modal only.
   ============================================================ */
.enquiry-mini-modal > button:not([aria-label="Close enquiry form"]) {
  display: none !important;
}