/* maya.my public Events - extends o-shop.css (load AFTER it). Tokens come from .o-page (o_header.php). */
.ev-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.o-page .ev-sec-h h2 { font-family: var(--font-heading) !important; font-size: 24px; margin: 0; }
.ev-sec-h span { font-size: 13px; color: rgba(29,31,32,.55); }

/* filters */
.ev-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ev-filters .os-search { flex: 1 1 240px; }
.ev-filters select.os-input { width: auto; flex: 0 1 180px; }

/* listing grid + card */
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ev-card { background: #fff; border: 1px solid var(--color-divider); display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s; min-width: 0; }
.ev-card:hover { box-shadow: 0 8px 22px rgba(29,31,32,.1); transform: translateY(-2px); border-color: var(--color-accent); }
.ev-card.is-past .ev-card-img img { filter: grayscale(.8); opacity: .75; }
.ev-card-img { position: relative; display: block; aspect-ratio: 16/9; background: var(--color-neutral-100); overflow: hidden; }
.ev-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-card-img .os-noimg { font-size: 38px; }
.ev-chip-date { position: absolute; left: 10px; bottom: -1px; background: #fff; border: 1px solid var(--color-divider); border-bottom: 0; text-align: center; min-width: 52px; padding: 4px 8px 3px; line-height: 1.1; }
.ev-chip-date .m { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent); font-weight: 700; }
.ev-chip-date .d { font-size: 22px; font-weight: 700; font-family: var(--font-heading); }
.ev-card-badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.ev-card-body { padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.o-page h3.ev-card-title { font-family: var(--font-heading) !important; font-size: 18px; margin: 0; line-height: 1.25; }
.o-page .ev-card-title a { color: var(--color-text); }
.ev-meta { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: rgba(29,31,32,.7); }
.ev-meta i { width: 16px; color: var(--color-accent); text-align: center; margin-right: 4px; }
.ev-card-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px dashed var(--color-divider); }
.ev-price { font-weight: 700; font-size: 16px; }
.ev-price small { font-weight: 400; color: rgba(29,31,32,.55); font-size: 12px; margin-right: 3px; }
.ev-left { font-size: 12px; color: rgba(29,31,32,.6); }
.ev-left.low { color: #a76a00; font-weight: 600; }
.ev-left.out { color: #b02a30; font-weight: 600; }
.os-b-ev { background: var(--color-accent); color: #fff; }
.os-b-virt { background: #1d6fa5; color: #fff; }
.os-b-lock { background: rgba(29,31,32,.85); color: #fff; }

/* strip on shop page */
.ev-strip { margin: 0 0 18px; border: 1px solid var(--color-divider); background: #fff; }
.ev-strip-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--color-divider); font-weight: 700; font-family: var(--font-heading); }
.ev-strip-h a { font-size: 13px; font-weight: 600; }
.ev-strip-row { display: flex; gap: 12px; overflow-x: auto; padding: 12px 14px; scrollbar-width: thin; }
.ev-strip-item { flex: 0 0 240px; display: flex; gap: 10px; align-items: center; color: var(--color-text); text-decoration: none; min-width: 0; }
.ev-strip-item:hover .t { color: var(--color-accent); }
.ev-strip-item .dc { flex: none; width: 46px; text-align: center; border: 1px solid var(--color-divider); padding: 3px 0; line-height: 1.1; }
.ev-strip-item .dc .m { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent); font-weight: 700; }
.ev-strip-item .dc .d { font-size: 19px; font-weight: 700; }
.ev-strip-item .t { font-weight: 600; font-size: 14px; line-height: 1.25; display: block; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-strip-item small { display: block; color: rgba(29,31,32,.6); font-size: 12px; }

/* detail */
.ev-banner { position: relative; width: 100%; aspect-ratio: 21/8; background: var(--color-neutral-100); overflow: hidden; margin-bottom: 18px; border: 1px solid var(--color-divider); }
.ev-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-banner.ev-banner-none { aspect-ratio: auto; min-height: 0; display: none; }
.o-page h1.ev-title { font-family: var(--font-heading) !important; font-size: 36px; line-height: 1.15; margin: 4px 0 10px; }
.ev-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.ev-tag { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; background: var(--color-accent-100); color: var(--color-accent-800); }
.ev-tag.lock { background: #1d1f20; color: #fff; }
.ev-tag.warn { background: #fff1d6; color: #7a4d00; }
.ev-tag.bad { background: #fde7e8; color: #8f1d22; }
.ev-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; margin: 14px 0 18px; padding: 14px; background: #fff; border: 1px solid var(--color-divider); }
.ev-fact { display: flex; gap: 10px; min-width: 0; }
.ev-fact > i { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--color-accent-100); color: var(--color-accent-800); }
.ev-fact b { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(29,31,32,.55); font-weight: 600; }
.ev-fact span { overflow-wrap: anywhere; font-size: 14px; }
.ev-rich { line-height: 1.65; font-size: 15px; }
.ev-rich img { max-width: 100%; height: auto; }
.ev-rich table { max-width: 100%; display: block; overflow-x: auto; }
.ev-gate { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #1d1f20; background: #f6f6f4; margin-bottom: 14px; }
.ev-gate i { font-size: 20px; margin-top: 2px; }
.ev-gate .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* tickets */
.ev-tickets { display: flex; flex-direction: column; }
.ev-ticket { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 14px; border-bottom: 1px solid var(--color-divider); align-items: center; }
.ev-ticket:last-child { border-bottom: 0; }
.ev-ticket.is-off { background: #fafafa; }
.ev-ticket.is-off .nm { color: rgba(29,31,32,.6); }
.ev-ticket .nm { font-weight: 700; font-size: 16px; font-family: var(--font-heading); }
.ev-ticket .ds { font-size: 13px; color: rgba(29,31,32,.65); margin-top: 2px; }
.ev-ticket .st { font-size: 12px; margin-top: 4px; color: rgba(29,31,32,.6); }
.ev-ticket .st.low { color: #a76a00; font-weight: 600; }
.ev-ticket .st.bad { color: #b02a30; font-weight: 600; }
.ev-ticket .pr { text-align: right; font-weight: 700; font-size: 18px; white-space: nowrap; }
.ev-ticket .pr.free { color: #1f8f55; }
.ev-ticket .act { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ev-ticket .os-qty input { width: 48px; }

/* forms */
.ev-pblock { border: 1px solid var(--color-divider); background: #fff; margin-bottom: 14px; }
.ev-pblock > h3, .ev-pblock > .ph { margin: 0; padding: 10px 14px; background: var(--color-neutral-100); border-bottom: 1px solid var(--color-divider); font-size: 14px; font-weight: 700; font-family: var(--font-heading) !important; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ev-pblock .pb { padding: 14px; }
.ev-pblock .ph small { font-weight: 400; color: rgba(29,31,32,.6); }
.ev-qfield { margin-top: 12px; }
.ev-opts { display: flex; flex-direction: column; gap: 6px; }
.ev-opts label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.ev-opts input { margin-top: 3px; }
.ev-help { font-size: 12px; color: rgba(29,31,32,.55); margin-top: 3px; }
.ev-err { font-size: 12px; color: #b02a30; margin-top: 3px; min-height: 0; }
.os-label em { color: #d9363e; font-style: normal; }
.ev-copy { font-size: 13px; }

/* ticket page */
.ev-ticketcard { background: #fff; border: 1px solid var(--color-divider); display: grid; grid-template-columns: 1fr 220px; max-width: 760px; margin: 0 auto 16px; }
.ev-ticketcard .tc-main { padding: 18px 20px; min-width: 0; }
.ev-ticketcard .tc-qr { border-left: 2px dashed var(--color-divider); padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #fbfbfa; }
.ev-ticketcard .tc-qr img { width: 100%; max-width: 180px; height: auto; image-rendering: pixelated; background: #fff; padding: 6px; border: 1px solid var(--color-divider); }
.ev-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: .14em; font-weight: 700; }
.ev-ticketcard h2 { font-family: var(--font-heading) !important; font-size: 24px; margin: 4px 0 8px; }
.ev-ticketcard dl { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.ev-ticketcard dt { color: rgba(29,31,32,.55); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.ev-ticketcard dd { margin: 0; overflow-wrap: anywhere; }
.ev-status { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 3px 9px; }
.ev-status.ok { background: #dff3e8; color: #14633b; }
.ev-status.pending { background: #fff1d6; color: #7a4d00; }
.ev-status.bad { background: #fde7e8; color: #8f1d22; }
.ev-status.in { background: #dbeafe; color: #1e40af; }
.ev-success { text-align: center; max-width: 620px; margin: 6px auto 22px; }
.ev-success .ic { width: 58px; height: 58px; border-radius: 50%; background: #1f8f55; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 8px; }
.o-page .ev-success h1 { font-family: var(--font-heading) !important; font-size: 30px; margin: 0 0 6px; }

/* leaderboard / results */
.ev-table-wrap { overflow-x: auto; border: 1px solid var(--color-divider); background: #fff; }
.ev-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.ev-table th, .ev-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--color-divider); white-space: nowrap; }
.ev-table th { background: var(--color-neutral-100); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(29,31,32,.65); }
.ev-table td.num, .ev-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ev-table tr:last-child td { border-bottom: 0; }
.ev-rank { font-weight: 700; width: 44px; }
.ev-rank.r1 { color: #b8860b; } .ev-rank.r2 { color: #6b6e70; } .ev-rank.r3 { color: #a0522d; }
.ev-file input[type=file] { width: 100%; padding: 9px; border: 1px dashed var(--color-divider); background: #fff; font: inherit; }
.ev-file input[type=file]::file-selector-button { border: 1px solid var(--color-divider); background: #fff; padding: 7px 12px; margin-right: 10px; cursor: pointer; font: inherit; }
.ev-prev { max-width: 160px; max-height: 120px; margin-top: 8px; border: 1px solid var(--color-divider); display: none; }

@media (max-width: 991px) { .ev-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .ev-grid { grid-template-columns: 1fr; }
  .o-page h1.ev-title { font-size: 28px; }
  .ev-facts { grid-template-columns: 1fr; }
  .ev-banner { aspect-ratio: 16/9; }
  .ev-ticketcard { grid-template-columns: 1fr; }
  .ev-ticketcard .tc-qr { border-left: 0; border-top: 2px dashed var(--color-divider); }
  .ev-filters select.os-input { flex: 1 1 140px; }
  .ev-ticket { grid-template-columns: 1fr; }
  .ev-ticket .pr { text-align: left; }
}
@media print {
  .o-nav, .o-foot, .no-print, nav, footer, header.o-hero { display: none !important; }
  .ev-ticketcard { border: 2px solid #000; break-inside: avoid; }
}
