/* VietCALL: room x time grid on the event timetable page (see js/vietcall-timetable.js).
   Everything is scoped to .vc-prog (and the detail card .vc-pop) so the rest of Indico is untouched. */

.vc-prog, .vc-pop {
  --vc-blue: #323e69;
  --vc-blue-dark: #262f52;
  --vc-red: #b80000;
  --vc-gold: #d9902f;
  --vc-ink: #263746;
  --vc-muted: #5f6b76;
  --vc-ground: #f4f8fb;
  --vc-line: rgba(38, 55, 70, 0.12);
  --vc-line-soft: rgba(38, 55, 70, 0.08);
}
.vc-prog {
  container-type: inline-size;
  margin: 0 0 24px;
  color: var(--vc-ink);
  font-size: 14px;
  line-height: 1.45;
}
.vc-prog *, .vc-prog *::before, .vc-prog *::after { box-sizing: border-box; }
.vc-prog a { color: var(--vc-blue); }
.vc-prog a:hover { color: var(--vc-blue-dark); }
.vc-prog button:focus-visible, .vc-prog a:focus-visible, .vc-prog input:focus-visible, .vc-grid-box:focus-visible {
  outline: 3px solid var(--vc-gold); outline-offset: 2px;
}

/* Day picker on the left, programme download on the right; they stack on a narrow page */
.vc-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.vc-head > .vc-days { flex: 0 0 auto; }
.vc-head > .vc-days button { white-space: nowrap; }
.vc-prog a.vc-download {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border: 1px solid var(--vc-blue); border-radius: 999px; background: #fff; color: var(--vc-blue);
  font-weight: 600; text-decoration: none; white-space: nowrap;
}
.vc-prog a.vc-download::before { content: "\2193"; font-weight: 700; }
.vc-prog a.vc-download:hover { background: var(--vc-blue); color: #fff; }
.vc-download-box { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 100%; }
.vc-prog .vc-pdf-updated { margin: 0; color: #5f6b76; font-size: 12px; line-height: 1.35; text-align: right; }
.vc-prog .vc-pdf-updated:empty { display: none; }
@media (max-width: 640px) {
  .vc-download-box { align-items: flex-start; }
  .vc-prog .vc-pdf-updated { text-align: left; }
}

/* Day picker: separate pills (the event theme rounds every button into a pill anyway) */
.vc-days { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-days button {
  min-height: 42px; padding: 0 22px; border: 1px solid transparent !important; border-radius: 999px !important;
  background: #e6edf3 !important; box-shadow: none !important; color: var(--vc-ink) !important;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.vc-days button:hover { border-color: #b9c4cd !important; }
.vc-days button[aria-pressed="true"] { background: var(--vc-blue) !important; color: #fff !important; }

/* Search and track filter */
.vc-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--vc-line); }
/* The grid's search covers the whole programme, so the page keeps only that one; Indico's returns if the grid has no data. */
body:has(.vc-prog) .confSubTitleContent .search-box { display: none !important; }
.vc-search { display: flex; flex: 1 1 340px; max-width: 460px; margin: 0; scroll-margin-top: 72px; }
.vc-prog input.vc-q {
  flex: 1 1 auto; min-width: 0; width: auto; height: 44px; margin: 0; padding: 0 12px;
  border: 1px solid #b9c4cd; border-right: 0; border-radius: 8px 0 0 8px; background: #fff; color: var(--vc-ink); font: inherit; font-size: 15px; box-shadow: none;
}
.vc-prog button.vc-go {
  display: flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 44px; margin: 0; padding: 0;
  border: 1px solid var(--vc-blue) !important; border-radius: 0 8px 8px 0 !important; background: var(--vc-blue) !important; box-shadow: none !important;
  color: #fff !important; cursor: pointer;
}
.vc-prog button.vc-go:hover { border-color: var(--vc-blue-dark) !important; background: var(--vc-blue-dark) !important; }
.vc-prog button.vc-clear {
  margin: 0 0 0 10px; padding: 0; border: 0 !important; background: none !important; box-shadow: none !important;
  color: var(--vc-blue) !important; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer;
}
/* Search results: the list rows of the programme, with the day under the time */
.vc-res-when { display: flex; flex-direction: column; gap: 2px; color: var(--vc-muted); font-size: 12.5px; }
.vc-res-when b { color: var(--vc-ink); font-size: 14px; }
.vc-results .vc-mhead { margin-bottom: 4px; }
.vc-num { color: var(--vc-muted); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vc-results .vc-kind { display: inline; }
.vc-results .vc-title { display: block; }
.vc-results .vc-room { font-weight: 600; }
.vc-results mark { padding: 0 1px; border-radius: 2px; background: #ffe9a8; color: inherit; }
.vc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vc-chips button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1px solid #b9c4cd; border-radius: 999px; background: #fff; color: var(--vc-ink);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.vc-chips button[aria-pressed="true"] { background: var(--vc-ink); border-color: var(--vc-ink); color: #fff; }
.vc-chips button[aria-pressed="true"] .vc-dot { background: #fff !important; }
.vc-count { margin: 0 0 0 auto; color: var(--vc-muted); font-size: 13px; }
.vc-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; }

/* Content */
.vc-main { display: flex; flex-direction: column; gap: 28px; padding-top: 20px; }
.vc-main > * { min-width: 0; }
.vc-notice { margin: 0; padding: 16px; border-radius: 10px; background: #fff8eb; color: #6b4708; }
.vc-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.vc-prog .vc-section-head h3 { margin: 0; padding: 0; border: 0; color: var(--vc-ink); font-size: 19px; font-weight: 700; }
.vc-section-head span { color: var(--vc-muted); font-size: 13px; }

/* Plenary / list rows */
.vc-prog ul.vc-list { margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--vc-line); border-radius: 12px; background: #fff; }
.vc-list li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 190px; gap: 14px; align-items: baseline; margin: 0; padding: 12px 18px; }
.vc-list li + li { border-top: 1px solid var(--vc-line-soft); }
.vc-list li > div { min-width: 0; overflow-wrap: anywhere; }
.vc-time { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vc-kind { display: block; color: var(--vc-red); font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }
.vc-list .vc-title { color: var(--vc-ink); font-weight: 600; text-decoration: none; }
.vc-list a.vc-title:hover { text-decoration: underline; }
.vc-who { display: block; color: var(--vc-muted); font-size: 13px; }
.vc-room { color: var(--vc-muted); font-size: 13px; }
.vc-list li.is-parallel { grid-template-columns: 112px minmax(0, 1fr); }
.vc-par-groups { display: grid; gap: 10px; min-width: 0; }
/* One column per entry while each stays at least 150px wide; beyond that they wrap onto a second line. */
.vc-par {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(max(150px, calc((100% - (var(--vc-par-n, 2) - 1) * 10px) / var(--vc-par-n, 2))), 1fr));
}
.vc-par-item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--vc-line); border-radius: 10px; background: var(--vc-ground); overflow-wrap: anywhere;
}
.vc-par-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.vc-par-room { color: var(--vc-muted); font-size: 12px; font-weight: 600; }
.vc-list li.is-break { background: #fafbfc; }
.vc-list li.is-break .vc-title { color: var(--vc-muted); font-weight: 500; }

/* Room x time grid */
.vc-grid-box { overflow-x: auto; border: 1px solid var(--vc-line); border-radius: 12px; background: #fff; }
.vc-prog table.vc-grid { width: 100%; min-width: 820px; margin: 0; border: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.vc-grid col.vc-c-room { width: 112px; }
.vc-prog .vc-grid thead th {
  padding: 10px 14px; border: 0; background: var(--vc-ink); color: #fff;
  font-weight: 600; font-variant-numeric: tabular-nums; text-align: left;
}
.vc-prog .vc-grid thead th:first-child { position: sticky; left: 0; z-index: 2; font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; }
.vc-prog .vc-grid tbody th {
  position: sticky; left: 0; z-index: 1; padding: 12px 14px; border: 0; border-top: 1px solid var(--vc-line);
  background: var(--vc-ground); text-align: left; vertical-align: top;
}
.vc-room-name { display: block; color: var(--vc-ink); font-size: 18px; font-weight: 700; text-decoration: none; }
.vc-prog a.vc-room-name { color: var(--vc-blue); }
.vc-prog a.vc-room-name:hover { text-decoration: underline; }
.vc-grid tbody th small { color: var(--vc-muted); font-size: 11px; font-weight: 400; }
.vc-prog .vc-grid td { padding: 12px 14px; border: 0; border-top: 1px solid var(--vc-line); border-left: 1px solid var(--vc-line-soft); vertical-align: top; }
.vc-prog .vc-grid td.vc-block { background: #fff8eb; }
.vc-prog .vc-grid td.vc-dim { opacity: 0.22; }
.vc-cell { display: flex; flex-direction: column; gap: 6px; }
.vc-pill {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.vc-cell .vc-title {
  display: -webkit-box; overflow: hidden; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  color: var(--vc-ink); font-size: 13.5px; font-weight: 600; line-height: 1.35; text-decoration: none;
}
.vc-cell a.vc-title:hover { text-decoration: underline; }
.vc-cell .vc-who { font-size: 12.5px; }
.vc-block-label { color: #8a5a0b; font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }

/* Narrow layout cards (hidden while the grid fits) */
.vc-slots { display: none; }
.vc-slot { margin-top: 18px; }
.vc-prog .vc-slot h4 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 10px; padding: 0 0 6px; border-bottom: 2px solid var(--vc-ink); color: var(--vc-ink); font-size: 17px; font-weight: 700;
}
.vc-slot-n { color: var(--vc-muted); font-size: 13px; font-weight: 400; }
.vc-card {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; padding: 12px 14px;
  border: 1px solid var(--vc-line); border-radius: 12px; background: #fff; overflow-wrap: anywhere;
}
.vc-card.vc-block { background: #fff8eb; }
.vc-card.vc-cont { padding-top: 8px; padding-bottom: 8px; }
.vc-card .vc-title { color: var(--vc-ink); font-size: 14.5px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.vc-card a.vc-title:hover { text-decoration: underline; }
.vc-mhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vc-room-tag { padding: 2px 10px; border-radius: 6px; background: var(--vc-ink); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.vc-prog a.vc-room-tag, .vc-prog a.vc-room-tag:hover { background: var(--vc-blue); color: #fff; }

/* Award voting (indico-plugin-vietcall-vote): hearts on talks, a button in the detail card, a status bar */
.vc-cell-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.vc-heart {
  flex: none; width: 30px; height: 30px; margin: -4px -6px 0 0; padding: 0;
  border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important;
  color: #c0392b !important; font: 400 19px/30px sans-serif; cursor: pointer;
}
.vc-heart:hover { background: #fdecea !important; }
.vc-heart.is-on { color: #d0021b !important; }
.vc-mhead .vc-heart { margin: 0 0 0 auto; }
.vc-d-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 14px; color: var(--vc-muted); font-size: 13px; }
.vc-vote-btn {
  min-height: 38px; padding: 0 16px;
  border: 1px solid #d0021b !important; border-radius: 999px !important; background: #fff !important; box-shadow: none !important;
  color: #b00218 !important; font: inherit; font-weight: 700 !important; cursor: pointer;
}
.vc-vote-btn:hover { background: #fdecea !important; }
.vc-vote-btn.is-on { background: #d0021b !important; color: #fff !important; }
.vc-votebar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  margin: 0; padding: 12px 16px; border: 1px solid #f3c2c7; border-radius: 12px; background: #fff5f6; color: #6d1420;
}
.vc-votebar.is-closed { border-color: var(--vc-line); background: #f4f6f8; color: var(--vc-muted); }
.vc-votebar-me { font-weight: 600; white-space: nowrap; }
a.vc-votebar-me { color: #b00218; }

/* Contribution detail: hover card beside a cell, or a centred dialog after a click or tap */
.vc-cell a.vc-title[data-vc-id], .vc-card a.vc-title[data-vc-id], .vc-list a.vc-title[data-vc-id] { cursor: pointer; }
.vc-pop {
  position: fixed; z-index: 1000; width: min(420px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow-y: auto;
  padding: 18px 20px; border: 1px solid var(--vc-line); border-radius: 14px; background: #fff;
  box-shadow: 0 16px 40px rgba(38, 55, 70, 0.22); color: var(--vc-ink); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere;
}
.vc-pop *, .vc-pop *::before, .vc-pop *::after { box-sizing: border-box; }
.vc-pop[hidden], .vc-backdrop[hidden] { display: none; }
.vc-pop.is-modal {
  top: 50%; left: 50%; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
  padding: 26px 28px; transform: translate(-50%, -50%);
}
.vc-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(23, 33, 43, 0.45); }
html.vc-modal-open { overflow: hidden; }
.vc-d-close {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0;
  border: 0 !important; border-radius: 8px !important; background: transparent !important; box-shadow: none !important;
  color: var(--vc-muted) !important; font: 400 26px/36px sans-serif; cursor: pointer;
}
.vc-d-close:hover { background: #eef2f6 !important; color: var(--vc-ink) !important; }
.vc-d-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-right: 28px; color: var(--vc-muted); font-size: 13px; }
.vc-pop .vc-d-title { margin: 10px 0 12px; padding: 0; border: 0; color: var(--vc-ink); font-size: 17px; font-weight: 700; line-height: 1.35; }
.vc-pop.is-modal .vc-d-title { font-size: 21px; }
.vc-d-label { display: block; margin-bottom: 4px; color: var(--vc-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }
.vc-d-people { margin-bottom: 12px; }
.vc-pop .vc-d-people ul { margin: 0; padding: 0; list-style: none; }
.vc-pop .vc-d-people li { margin: 0 0 2px; }
.vc-d-people li span { color: var(--vc-muted); }
.vc-d-people li span::before { content: ' · '; }
.vc-d-abstract { padding-top: 12px; border-top: 1px solid var(--vc-line); }
.vc-pop .vc-d-abstract p { margin: 0 0 8px; }
.vc-d-abstract.is-clamped {
  max-height: 14em; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent);
}
.vc-d-empty { margin: 0; padding-top: 12px; border-top: 1px solid var(--vc-line); color: var(--vc-muted); font-style: italic; }
.vc-d-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; color: var(--vc-muted); font-size: 13px; }
.vc-d-foot a { margin-left: auto; color: var(--vc-blue); font-weight: 600; }
.vc-d-foot a:hover { color: var(--vc-blue-dark); }
.vc-pop button:focus-visible, .vc-pop a:focus-visible { outline: 3px solid var(--vc-gold); outline-offset: 2px; }

/* The content column is too narrow for the grid: show per-slot cards instead. */
@container (max-width: 760px) {
  .vc-grid-box { display: none; }
  .vc-slots { display: block; }
  .vc-list li, .vc-list li.is-parallel { grid-template-columns: 1fr; gap: 3px; padding: 12px 14px; }
  /* Too narrow for columns: same-time entries stack, still grouped under one time. */
  .vc-par { grid-template-columns: 1fr; gap: 8px; margin-top: 4px; }
  .vc-days button { flex: 1 1 0; padding: 0 10px; }
  .vc-search { flex-basis: 100%; max-width: none; }
  .vc-prog input.vc-q { font-size: 16px; } /* smaller text makes iPhones zoom in on focus */
  .vc-chips { flex-wrap: nowrap; width: 100%; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
  .vc-chips::-webkit-scrollbar { display: none; }
  .vc-chips button { flex: none; white-space: nowrap; }
  .vc-count { width: 100%; margin-left: 0; }
}

/* Medium width: two cards per row. */
@container (min-width: 560px) and (max-width: 760px) {
  .vc-slot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .vc-slot h4 { grid-column: 1 / -1; }
}

@media print {
  .vc-head, .vc-toolbar { display: none; }
  .vc-slots { display: none !important; }
  .vc-grid-box { display: block !important; overflow: visible; border: 0; }
  .vc-prog table.vc-grid { min-width: 0; }
  .vc-prog .vc-grid thead th, .vc-prog .vc-grid tbody th { position: static; }
  .vc-cell .vc-title { -webkit-line-clamp: unset; }
}
