/* QPro hand-written fixes, loaded after the Vite build (resources/css/app.css can't be
   rebuilt on the server: no Node). 2026-10-24. */

/* Mobile nav: app.css hides .nav-links below 900px with nothing in their place.
   Keep them as a second row under the brand instead. */
@media (max-width: 900px) {
  .nav { flex-wrap: wrap; row-gap: 12px; }
  .nav-links {
    display: flex;
    order: 3;
    width: 100%;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--line-2);
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Small phones: stop the header buttons and brand wrapping onto several lines. */
@media (max-width: 600px) {
  .nav { padding: 14px 0; }
  .brand { font-size: 17px; gap: 9px; white-space: nowrap; }
  .nav-act { gap: 8px; }
  .nav-act .btn { white-space: nowrap; padding: 8px 12px; font-size: 12.5px; }

  /* Search: the text field takes its own full row; state + button share the next. */
  .search { flex-wrap: wrap; }
  .search > .f:first-child { flex: 1 1 100%; border-bottom: 1px solid var(--line); }
  .search .sep { display: none; }
  .search > .f:not(:first-child) { flex: 1 1 auto; }
}

/* Contact / Terms / Privacy pages. app.css only styles .prose h2 and p. */
.legal .prose { margin-top: 34px; max-width: 70ch; }
.legal .prose h2 { margin-top: 30px; }
.legal .prose ul { margin: 0 0 14px 20px; padding: 0; list-style: disc; }
.legal .prose li { color: var(--ink); opacity: .86; font-size: 15.5px; margin-bottom: 8px; }
.legal .prose a, .legal .lede a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal .legal-mail { font-family: var(--font-heading); font-weight: 700; font-size: 18px; }
.legal .legal-bm { margin-top: 56px; padding-top: 30px; border-top: 2px solid var(--line); }

/* Language switch (EN / BM) in the header. */
.lang-switch {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px 9px;
  line-height: 1;
}
.lang-switch:hover { color: var(--ink); border-color: var(--ink); }
.legal .legal-note { margin-top: 30px; font-size: 13px; color: var(--mist); max-width: 70ch; }

/* Organiser form: "Add more details" panels + completeness nudge. */
.more-head { font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin: 30px 0 12px; }
.more-head span { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--mist); margin-left: 6px; }
details.more { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; background: var(--card); }
details.more > summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 14.5px; list-style-position: inside; }
details.more[open] > summary { border-bottom: 1px solid var(--line-2); }
details.more > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.more > :last-child { margin-bottom: 16px; }
.more-hint { font-size: 13px; color: var(--mist); margin: 12px 16px 10px; }
.chk-grid { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.rep-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.rep-row input { flex: 1; }
.rep-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); }
.rep-card .linklike { align-self: flex-start; }
.sp-logo { height: 40px; width: auto; max-width: 120px; object-fit: contain; background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 3px; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.completeness { margin: 22px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); }
.completeness .cbar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 9px; }
.completeness .cbar span { display: block; height: 100%; background: var(--gold); }
.completeness .ctext { font-size: 13.5px; color: var(--ink); }

/* Free event page: organiser-entered "What to expect" / "Who can enter" / FAQ. */
.ov-points { margin: 0 0 18px 20px; padding: 0; list-style: disc; max-width: 62ch; }
.ov-points li { font-size: 15px; line-height: 1.55; margin-bottom: 8px; color: var(--ink); opacity: .9; }
.ov-faq { border-top: 1px solid var(--line-2); padding: 12px 0; max-width: 62ch; }
.ov-faq:last-child { border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.ov-faq summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.ov-faq p { margin: 10px 0 0; }

/* Free event page: organiser-entered "What to expect" / "Who can enter" / FAQ. */
.ov-points { margin: 0 0 18px 20px; padding: 0; list-style: disc; max-width: 62ch; }
.ov-points li { font-size: 15px; line-height: 1.55; margin-bottom: 8px; color: var(--ink); opacity: .9; }
.ov-faq { border-top: 1px solid var(--line-2); padding: 12px 0; max-width: 62ch; }
.ov-faq:last-child { border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.ov-faq summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.ov-faq p { margin: 10px 0 0; }

/* Narrow phones: the Malay labels + language switch don't fit beside the brand.
   "Log in" goes (organisers still reach it via "List your event"). */
@media (max-width: 420px) {
  .nav-act .btn-ghost { display: none; }
  .nav-act { max-width: 100%; }
}

/* Events directory: labelled date filters; on phones the filter row hides behind a toggle. */
.date-chip { display: inline-flex; align-items: center; gap: 6px; }
.date-chip > span { font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mist-2); }
.filter-toggle { display: none; }
@media (max-width: 700px) {
  .filter-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 10px; cursor: pointer; }
  .filters-body { display: none; }
  .filters-body.is-open { display: flex; }
}
.legal .prose ol.steps { margin: 0 0 14px 22px; padding: 0; list-style: decimal; }
.legal .prose ol.steps li { color: var(--ink); opacity: .9; font-size: 15.5px; margin-bottom: 10px; }

/* Homepage: browse by state, organisers strip, organiser call to action. */
.state-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.state-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 13.5px; font-weight: 600; color: var(--mist); }
.state-chip.has { color: var(--ink); border-color: var(--ink); }
.state-chip b { font-family: "JetBrains Mono", monospace; font-size: 11px; background: var(--gold); color: var(--ink); border-radius: 99px; padding: 1px 7px; }
.state-chip:hover { border-color: var(--ink); color: var(--ink); }
.org-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.org-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 600; font-size: 14px; min-height: 48px; }
.org-pill img { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 6px; }
.org-pill:hover { border-color: var(--ink); }
.org-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 44px 0 48px; padding: 24px 26px; border-radius: 8px; background: var(--field, #16201B); color: #fff; }
.org-cta b { display: block; font-family: var(--font-heading); font-size: 20px; margin-bottom: 4px; }
.org-cta span { color: #cdd6cf; font-size: 15px; }

/* Event cards: whole poster over a blurred copy (portrait posters were cropped). */
.poster img.poster-bg { object-fit: cover; filter: blur(16px) saturate(1.1); transform: scale(1.15); opacity: .55; }
.poster img.poster-fit { object-fit: contain; }

/* Calendar: empty-month notice; titles wrap to two lines; "2/3" day marker. */
.cal-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 6px; background: var(--card); }
.cal-empty b { font-family: var(--font-heading); font-size: 15px; }
.cal-empty span { color: var(--mist); font-size: 14px; }
.cal-ev { white-space: normal; align-items: flex-start; }
.cal-ev .dot { margin-top: 3px; }
.cal-ev .t { flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-ev .dd { flex: none; font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--mist); }

/* Free event page gallery: fewer tiles when there are fewer photos (no empty placeholders). */
.gallery.g-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery.g-2 { grid-template-rows: 1fr; }
.gallery.g-2 .gmain { grid-row: auto; }

/* Account pages: sign-up explanation and terms note. */
.auth-intro { font-size: 14px; color: var(--mist); margin: -4px 0 18px; line-height: 1.5; }
.auth-legal { font-size: 12.5px; color: var(--mist); margin: 4px 0 14px; line-height: 1.5; }
.auth-legal a { color: var(--gold-ink); text-decoration: underline; }

/* Accessibility: skip link (visible on keyboard focus) and bigger tap targets on phones. */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: 6px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14px; }
.skip-link:focus { top: 12px; }
#content:focus { outline: none; }
@media (max-width: 700px) {
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
  footer.site li a { display: inline-flex; align-items: center; min-height: 40px; }
  .filters .chip, .filters select, .filters input, .toggle a, .calnav .chip { min-height: 40px; }
  .shead .more { display: inline-flex; align-items: center; min-height: 40px; }
}

/* Share buttons: the free design's share is now a <button> (device share menu / copy link). */
button.sb { background: transparent; cursor: pointer; padding: 0; font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
