/*
 * events.css — khu vực /events KẾ THỪA global style của site (styles.css:
 * nền cream #F5EFD9, chữ ink, cam #F47C30, stamp shadow "Đất nung & ống nghiệm").
 * Chỉ style các thành phần riêng của sự kiện; header/footer dùng nguyên class
 * .nav/.footer của trang chủ.
 */

.ev-main { padding: 30px 0 72px; min-height: 52vh; }

/* mục đang đứng trong nav */
.nav__links a.is-active { color: var(--ink); }

/* ── headings / badges / buttons ── */
.ev-h1 { font-family: var(--font-en, inherit); font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 12px 0 6px; color: var(--ink); letter-spacing: -.01em; }
.ev-sub { color: var(--muted); margin: 0 0 28px; }
.ev-section { margin: 28px 0 0; }
.ev-section h2 { font-size: 1.18rem; color: var(--ink); margin: 0 0 14px; }

/* Chip trạng thái — nằm TRONG thân thẻ (không phủ lên poster). */
.ev-badge {
  display: inline-block; align-self: flex-start;
  font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--cream); color: var(--ink);
}
.ev-badge--warn { background: var(--orange); color: #fff; }
.ev-badge--muted { background: var(--cream); color: var(--muted); }

.ev-btn {
  display: inline-block; padding: 13px 26px; border-radius: var(--r-pill, 999px);
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink);
  cursor: pointer; font-family: inherit; transition: transform .15s var(--ease, ease), box-shadow .15s var(--ease, ease);
}
.ev-btn:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }
.ev-btn--primary { background: var(--orange); color: #fff; border-color: var(--ink); box-shadow: var(--stamp-sm, 3px 3px 0 var(--ink)); }
.ev-btn--primary:hover { background: var(--orange-600); color: #fff; transform: translate(-1px, -1px); box-shadow: var(--stamp, 5px 5px 0 var(--ink)); }
.ev-btn--primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.ev-btn--disabled { opacity: .5; cursor: default; pointer-events: none; box-shadow: none; }

/* ── grid danh sách ── */
.ev-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
/* Desktop: tối đa 3 thẻ/hàng — poster to, dễ đọc. */
@media (min-width: 900px) { .ev-grid { grid-template-columns: repeat(3, 1fr); } }
.ev-card {
  display: flex; flex-direction: column; border-radius: var(--r-md, 16px); overflow: hidden;
  background: var(--cream-card, #fffdf7); border: 1.5px solid var(--ink);
  text-decoration: none; color: var(--ink);
  transition: transform .15s var(--ease, ease), box-shadow .15s var(--ease, ease);
}
.ev-card:hover { transform: translate(-2px, -2px); box-shadow: var(--stamp, 5px 5px 0 var(--ink)); }
.ev-card.is-past { opacity: .6; }
.ev-card.is-past:hover { transform: none; box-shadow: none; }
.ev-card.is-past .ev-card__media img { filter: grayscale(.7); }
/* Poster sự kiện LUÔN vuông 1:1 (site-wide). Ảnh đặt position:absolute (như
 * background-image) — kích thước ảnh gốc (dọc/ngang/16:9) KHÔNG BAO GIỜ kéo
 * giãn được khung: flex item min-height:auto hết đường phá aspect-ratio. */
.ev-card__media {
  position: relative; aspect-ratio: 1 / 1; background: var(--cream-200);
  display: block; border-bottom: 1.5px solid var(--ink); overflow: hidden; flex: none;
}
.ev-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-en, inherit); font-size: 2.6rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-600) 100%);
}
.ev-card__body { display: flex; flex-direction: column; gap: 5px; padding: 14px 15px 16px; }
.ev-card__date { font-size: .8rem; color: var(--orange-600); font-weight: 700; }
.ev-card__title { font-weight: 700; color: var(--ink); line-height: 1.35; }
.ev-card__org { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.ev-card__meta { font-size: .85rem; color: var(--muted); }
.ev-card__price { font-size: .92rem; font-weight: 800; color: var(--ink); margin-top: 2px; }

/* ── avatar dùng chung (người tròn, brand vuông bo) + fallback chữ cái ── */
.ev-avatar {
  width: 36px; height: 36px; border-radius: 999px; object-fit: cover; flex: none;
  border: 1.5px solid var(--ink); background: var(--cream-200); display: inline-block; vertical-align: middle;
}
.ev-avatar--ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-en, inherit); font-weight: 800; font-size: .82rem; color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-600) 100%);
}
.ev-avatar--org { border-radius: 10px; }
.ev-avatar--xs { width: 18px; height: 18px; border-width: 1px; font-size: .5rem; border-radius: 5px; }
.ev-avatar--lg { width: 72px; height: 72px; font-size: 1.4rem; }

.ev-empty {
  text-align: center; padding: 46px 20px; border: 1.5px dashed var(--line, #e2d8bd);
  border-radius: var(--r-md, 16px); color: var(--muted); background: var(--cream-50, #fbf8ee);
}
.ev-empty h1 { color: var(--ink); }

/* ── breadcrumbs ── */
.ev-crumbs { font-size: .84rem; color: var(--muted); margin: 4px 0 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.ev-crumbs a { color: var(--muted); text-decoration: none; }
.ev-crumbs a:hover { color: var(--ink); }

/* ── toolbar listing: filter + toggle view ── */
.ev-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 0 0 22px; }
.ev-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Kiểu nhìn của filter/toggle dùng chung .ui-field / .ui-select / .ui-seg
   (assets/aios/styles.css); ở đây chỉ giữ ràng buộc layout riêng của trang. */
.ev-filters__sel { max-width: 180px; }
.ev-btn--sm { padding: 8px 18px; font-size: .9rem; }
.ev-filters__clear { font-size: .85rem; color: var(--muted); text-decoration: none; font-weight: 600; padding: 6px 4px; }
.ev-filters__clear:hover { color: var(--ink); }

/* ── timeline (Luma calendar style): nhãn ngày + spine + dòng sự kiện ── */
.ev-tl { display: grid; gap: 0; }
.ev-tl__group { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 0 0 24px; }
@media (min-width: 640px) { .ev-tl__group { grid-template-columns: 128px 1fr; gap: 18px; } }
.ev-tl__date { color: var(--ink); line-height: 1.35; }
@media (min-width: 640px) { .ev-tl__date { position: sticky; top: 82px; align-self: start; } }
.ev-tl__date strong { display: block; font-weight: 800; }
.ev-tl__date span { display: block; font-size: .84rem; color: var(--muted); }
.ev-tl__items { position: relative; display: grid; gap: 12px; padding-left: 22px; border-left: 1.5px dashed var(--line, #e2d8bd); }
.ev-tl__dot {
  position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 999px;
  background: var(--cream, #F5EFD9); border: 1.5px solid var(--ink);
}
.ev-row {
  display: flex; align-items: center; gap: 0; text-decoration: none; color: var(--ink); overflow: hidden;
  border: 1.5px solid var(--ink); border-radius: var(--r-md, 16px); background: var(--cream-card, #fffdf7);
  transition: transform .15s var(--ease, ease), box-shadow .15s var(--ease, ease);
}
.ev-row:hover { transform: translate(-2px, -2px); box-shadow: var(--stamp, 5px 5px 0 var(--ink)); }
.ev-row.is-past { opacity: .6; }
.ev-row.is-past:hover { transform: none; box-shadow: none; }
.ev-row.is-past .ev-row__thumb img { filter: grayscale(.7); }
.ev-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; }
.ev-row__time { font-size: .8rem; color: var(--orange-600); font-weight: 700; }
.ev-row__title { font-weight: 700; line-height: 1.35; }
.ev-row__meta { font-size: .84rem; color: var(--muted); }
.ev-row__price { font-size: .88rem; font-weight: 800; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-row__price .ev-badge { position: static; }
/* Thumb VUÔNG cố định (không stretch theo chiều cao dòng) — ảnh absolute như background. */
.ev-row__thumb {
  position: relative; width: 88px; height: 88px; flex: none; align-self: center;
  margin: 12px 12px 12px 4px; border: 1.5px solid var(--ink); border-radius: 12px;
  overflow: hidden; background: var(--cream-200);
}
.ev-row__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-row__thumb .ev-ph { font-size: 1.5rem; }
@media (max-width: 480px) { .ev-row__thumb { width: 68px; height: 68px; } }

/* ── header trang organizer ── */
.ev-orghead { display: flex; gap: 20px; align-items: center; margin: 4px 0 10px; padding: 0 0 20px; border-bottom: 1.5px dashed var(--line, #e2d8bd); }
.ev-orghead__logo { width: 96px; height: 96px; font-size: 1.8rem; box-shadow: var(--stamp-sm, 3px 3px 0 var(--ink)); }
.ev-orghead__txt h1 { font-family: var(--font-en, inherit); font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 0 0 4px; color: var(--ink); letter-spacing: -.01em; }
.ev-orghead__tag { margin: 0 0 8px; color: var(--muted); }
.ev-orghead__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: .9rem; color: var(--ink-soft); }
.ev-orghead__meta a { color: var(--orange-600); text-decoration: none; font-weight: 600; }
.ev-orghead__desc { margin: 14px 0 24px; }
@media (max-width: 560px) { .ev-orghead { flex-direction: column; text-align: center; } .ev-orghead__meta { justify-content: center; } }

/* ── trang chi tiết (layout Luma: 2 CỘT ĐỘC LẬP) ──
 * Desktop: trái (__left) = poster + rail sticky; phải (__right) = main + mô tả
 * CHẢY LIÊN TỤC → mô tả nằm ngay dưới thẻ đăng ký, KHÔNG phụ thuộc chiều cao cột
 * trái (hết hở khoảng trắng). __right align-self:start → không thừa nền dưới khi
 * cột phải ngắn hơn; __left để stretch (mặc định) nên rail sticky đi hết chiều
 * cao khi cuộn (như Luma).
 * Mobile: wrapper display:contents cho 4 con chảy 1 cột theo order. */
.ev-detail--luma { display: flex; flex-direction: column; gap: 26px; }
.ev-detail__left, .ev-detail__right { display: contents; }
.ev-detail__poster { order: 1; }
.ev-detail__main   { order: 2; min-width: 0; }
.ev-detail__side   { order: 3; }
.ev-detail__rest   { order: 4; min-width: 0; }
@media (min-width: 820px) {
  .ev-detail--luma { display: grid; grid-template-columns: 320px minmax(0, 1fr); column-gap: 40px; }
  .ev-detail__left, .ev-detail__right { display: block; }
  .ev-detail__left  { grid-column: 1; }
  .ev-detail__right { grid-column: 2; min-width: 0; align-self: start; }
  .ev-detail__side  { position: sticky; top: 82px; margin-top: 24px; }
}
.ev-detail__poster {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-md, 16px); overflow: hidden;
  background: var(--cream-200); border: 1.5px solid var(--ink); box-shadow: var(--stamp-sm, 3px 3px 0 var(--ink));
}
.ev-detail__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-detail__main h1 { font-family: var(--font-en, inherit); font-size: clamp(1.45rem, 3.4vw, 1.95rem); margin: 0 0 16px; color: var(--ink); line-height: 1.28; letter-spacing: -.01em; }
.ev-social { color: var(--green-700, #5f8f57); font-weight: 700; font-size: .92rem; margin: 10px 0 0; }
.ev-cta-bottom { margin: 34px 0 0; text-align: center; }

/* ── tiles ngày/địa điểm (calendar chip Luma-style) ── */
.ev-tiles { display: grid; gap: 12px; margin: 0 0 18px; }
.ev-tile { display: flex; align-items: center; gap: 12px; }
.ev-tile__txt { display: grid; gap: 1px; min-width: 0; }
.ev-tile__txt strong { color: var(--ink); line-height: 1.35; }
.ev-tile__txt span { font-size: .88rem; color: var(--muted); }
.ev-tile__txt a { color: var(--orange-600); }
.ev-cal, .ev-tile__icon {
  width: 52px; height: 52px; flex: none; border: 1.5px solid var(--ink); border-radius: 12px;
  background: var(--cream-card, #fffdf7); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ev-tile__icon { font-size: 1.4rem; }
.ev-cal__mo {
  width: 100%; text-align: center; background: var(--orange); color: #fff;
  font-size: .58rem; font-weight: 800; letter-spacing: .04em; padding: 2px 0;
}
.ev-cal__day { flex: 1; display: flex; align-items: center; font-size: 1.35rem; font-weight: 800; color: var(--ink); }

/* ── thẻ đăng ký (Luma "Registration" card) ── */
.ev-reg-card {
  border: 1.5px solid var(--ink); border-radius: var(--r-md, 16px);
  background: var(--cream-card, #fffdf7); box-shadow: var(--stamp-sm, 3px 3px 0 var(--ink));
  padding: 16px 18px 18px; margin: 0 0 4px;
}
.ev-reg-card__head {
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); border-bottom: 1.5px dashed var(--line, #e2d8bd); padding: 0 0 9px; margin: 0 0 13px;
}
.ev-reg-card__banner {
  border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px 14px;
  font-weight: 600; font-size: .93rem; margin: 0 0 12px; line-height: 1.5;
}
.ev-reg-card__banner--muted { background: var(--cream-50, #fbf8ee); color: var(--muted); }
.ev-reg-card__banner--warn { background: var(--orange); color: #fff; }
.ev-reg-card__cta { margin-top: 14px; }
.ev-reg-card__cta .ev-btn { display: block; width: 100%; box-sizing: border-box; }
.ev-reg-card .ev-tickets { margin: 0; }

/* ── rail trái: organizer chip + người (host/diễn giả/đối tác) + liên hệ ── */
.ev-side__h { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 10px; }
.ev-orgchip {
  display: block; text-decoration: none; padding: 12px 14px; margin: 0 0 18px;
  border: 1.5px solid var(--ink); border-radius: var(--r-md, 16px); background: var(--cream-card, #fffdf7);
  transition: transform .15s var(--ease, ease), box-shadow .15s var(--ease, ease);
}
a.ev-orgchip:hover { transform: translate(-2px, -2px); box-shadow: var(--stamp-sm, 3px 3px 0 var(--ink)); }
.ev-orgchip__label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.ev-orgchip__row { display: flex; align-items: center; gap: 10px; }
.ev-orgchip__row > span:last-child { min-width: 0; }
.ev-orgchip .ev-avatar--org { width: 42px; height: 42px; }
.ev-orgchip__name { display: block; font-weight: 800; color: var(--ink); line-height: 1.3; }
.ev-orgchip__tag { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; margin-top: 1px; }

.ev-peeps { margin: 0 0 18px; }
.ev-peeps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ev-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ev-person__txt { display: grid; gap: 0; min-width: 0; }
.ev-person__name { font-weight: 700; color: var(--ink); font-size: .95rem; line-height: 1.35; }
.ev-person__sub { font-size: .8rem; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; }

.ev-contact { margin: 0 0 18px; padding-top: 16px; border-top: 1.5px dashed var(--line, #e2d8bd); }
.ev-contact a { display: block; color: var(--ink-soft); text-decoration: none; font-size: .9rem; padding: 4px 0; overflow-wrap: anywhere; }
.ev-contact a:hover { color: var(--orange-600); }

.ev-tickets h2, .ev-desc h2 { font-size: 1.18rem; color: var(--ink); margin: 0 0 12px; }
.ev-ticket {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: var(--r-md, 14px); margin: 0 0 10px;
  background: var(--cream-card, #fffdf7);
}
.ev-ticket.is-off { opacity: .55; border-color: var(--line, #e2d8bd); }
.ev-ticket__name { font-weight: 700; color: var(--ink); }
.ev-ticket__name small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.ev-ticket__price { font-weight: 800; color: var(--ink); text-align: right; }
.ev-ticket__price s { opacity: .5; font-weight: 400; margin-left: 6px; }
.ev-ticket__price em { display: block; font-style: normal; font-size: .78rem; font-weight: 600; color: var(--muted); }
.ev-ticket__price em.ev-left { color: var(--orange-600); }

.ev-desc { margin: 32px 0 0; }
.ev-desc__body { line-height: 1.75; color: var(--ink-soft); max-width: 720px; }
.ev-desc__body h2, .ev-desc__body h3, .ev-desc__body h4,
.ev-desc__body h5, .ev-desc__body h6 { color: var(--ink); line-height: 1.3; margin: 18px 0 8px; }
.ev-desc__body h3 { font-size: 1.05rem; }
.ev-desc__body h4 { font-size: .98rem; }
.ev-desc__body h5 { font-size: .92rem; }
.ev-desc__body h6 { font-size: .88rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ev-desc__body a { color: var(--orange-600); }
.ev-desc__body img { max-width: 100%; border-radius: var(--r-md, 12px); border: 1px solid var(--line, #e2d8bd); }
.ev-desc__body blockquote { border-left: 3px solid var(--orange); margin: 14px 0; padding: 4px 0 4px 14px; color: var(--muted); }

/* ── form đăng ký ── */
.ev-reg { max-width: 560px; margin-inline: auto; }
.ev-reg__form h1 { font-family: var(--font-en, inherit); font-size: 1.55rem; color: var(--ink); margin: 0 0 6px; }
.ev-reg__event { color: var(--muted); margin: 0 0 22px; }
.ev-form-h2 { font-size: 1.02rem; color: var(--ink); margin: 26px 0 10px; }
.ev-field { margin: 0 0 14px; }
.ev-label { display: block; font-size: .89rem; font-weight: 600; margin: 0 0 6px; color: var(--ink-soft); }
.ev-req { color: var(--orange-600); }
.ev-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--ink); background: #fff;
  color: var(--ink); font-family: inherit; font-size: 1rem;
}
.ev-input:focus { border-color: var(--orange); outline: 2px solid var(--orange-100, #fbe0cd); }
.ev-hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 5px; }
.ev-check { display: flex; gap: 9px; align-items: flex-start; font-size: .93rem; color: var(--ink-soft); padding: 5px 0; cursor: pointer; }
.ev-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--orange); }

.ev-types { display: grid; gap: 10px; }
.ev-type {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border: 1.5px solid var(--ink); border-radius: var(--r-md, 12px); cursor: pointer;
  background: var(--cream-card, #fffdf7);
}
.ev-type:has(input:checked) { border-color: var(--orange-600); background: #fff; box-shadow: var(--stamp-sm, 3px 3px 0 var(--ink)); }
.ev-type.is-off { opacity: .5; cursor: not-allowed; border-color: var(--line, #e2d8bd); }
.ev-type input { accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.ev-type__name { flex: 1; font-weight: 700; color: var(--ink); }
.ev-type__name small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.ev-type__price { font-weight: 800; text-align: right; color: var(--ink); }
.ev-type__price em { display: block; font-style: normal; font-size: .76rem; font-weight: 600; color: var(--muted); }

.ev-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; }
.ev-qty button {
  width: 42px; height: 42px; border: 0; background: var(--cream-50, #fbf8ee);
  color: var(--ink); font-size: 1.2rem; cursor: pointer; font-family: inherit;
}
.ev-qty button:hover { background: var(--cream-200, #ece3c5); }
.ev-qty input {
  width: 56px; height: 42px; text-align: center; border: 0; background: transparent;
  color: var(--ink); font-family: inherit; font-size: 1rem; -moz-appearance: textfield; appearance: textfield;
}
.ev-qty input::-webkit-outer-spin-button, .ev-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.ev-coupon { display: grid; gap: 6px; }
.ev-coupon__msg { font-size: .84rem; min-height: 1.2em; }
.ev-coupon__msg.ok { color: var(--green-700, #5f8f57); }
.ev-coupon__msg.bad { color: #b3372a; }

.ev-summary {
  margin: 22px 0 14px; padding: 14px 16px; border-radius: var(--r-md, 12px);
  background: var(--cream-card, #fffdf7); border: 1.5px solid var(--ink);
}
.ev-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--ink-soft); }
.ev-summary__row--disc span:last-child { color: var(--green-700, #5f8f57); }
.ev-summary__row--total { border-top: 1.5px dashed var(--line, #ded2ae); margin-top: 6px; padding-top: 9px; font-weight: 800; font-size: 1.05rem; color: var(--ink); }

.ev-error {
  background: #fdecea; border: 1.5px solid #b3372a;
  color: #8f2b21; border-radius: 10px; padding: 10px 13px; font-size: .9rem; line-height: 1.5;
}
.ev-submit { width: 100%; }
.ev-submit[disabled] { opacity: .6; cursor: default; box-shadow: none; }
