/* AIMER Young CEO 2.0 - mobile fixes (loaded last, after the inline styles) */

/* Invite popup: never taller than the screen, close button always reachable */
html body .timed-popup-backdrop {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
}
html body .timed-popup-card {
  margin: auto 0;
  max-height: none;
  font-family: "Poppins", -apple-system, "Segoe UI", sans-serif;
}
html body .timed-popup-card * { font-family: inherit; }
html body .timed-popup-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  z-index: 3;
}
html body .timed-popup-dismiss-text { min-height: 44px; padding: 10px 12px; }
@media (max-width: 400px), (max-height: 640px) {
  html body .timed-popup-card { padding: 54px 16px 14px; border-radius: 20px; }
  html body .timed-popup-title { font-size: 21px; margin-bottom: 8px; }
  html body .timed-popup-desc { font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
  html body .timed-popup-badge { font-size: 10.5px; margin-bottom: 12px; }
  html body .timed-popup-card > div[style*="flex-direction: column"] { padding: 10px 12px !important; margin-bottom: 14px !important; gap: 5px !important; font-size: 12px !important; }
  html body .timed-popup-btn-reg, html body .timed-popup-btn-wa { padding-top: 12px; padding-bottom: 12px; font-size: 15px; }
}

/* Chat window */
html body .yc-composer input { font-size: 16px !important; }   /* stops iPhone zoom on tap */
html body .yc-quick { min-height: 38px; font-size: 12.5px; }
html body .yc-icon-btn { min-width: 40px; min-height: 40px; }
@media (max-width: 768px) {
  html body .yc-chat {
    height: min(580px, calc(100vh - 90px)) !important;
    height: min(580px, calc(100dvh - 90px)) !important; /* respects the browser address bar */
    top: auto !important;
  }
  /* quick replies scroll sideways in one row so messages keep their space */
  html body .yc-quick-replies {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
  }
  html body .yc-quick-replies::-webkit-scrollbar { display: none; }
  html body .yc-quick { flex: 0 0 auto; white-space: nowrap; }
  html body .yc-footer-note { display: none; }
  html body .yc-chat-head { padding-top: 12px !important; padding-bottom: 12px !important; }
}
@media (max-height: 600px) and (max-width: 768px) {
  html body .yc-chat { bottom: 70px !important; height: calc(100dvh - 80px) !important; }
  html body .yc-chat-tools { padding-top: 6px !important; padding-bottom: 6px !important; }
}

/* Bigger tap targets for small links */
html body .yc-countdown a { display: inline-block; padding: 10px 6px; min-height: 44px; line-height: 24px; }
html body .scroll-card-tag { font-size: 11px; }

/* Photo gallery has 3 photos: on 2-column screens the first one goes full width, so there is no empty space */
@media (min-width: 481px) and (max-width: 768px) {
  html body .brochure-gallery-grid .brochure-gallery-item:first-child { grid-column: 1 / -1; aspect-ratio: 16/9 !important; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  html body .brochure-gallery-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
