/* Head-to-head fan polls: /punjabi-singer-ranking, /poll-rankings/punjabi-actresses and
 * /poll-rankings/indian-actresses. Built on the tokens and components in ui.css.
 * The vote cards are also rendered by each page's renderCard() for RankingVote
 * (assets/js/ranking-vote.js), so keep both markups in step.
 * Class names use the pa- prefix: the global rankings-shared.css / tp-foundation.css
 * still style the old .contestant / .vs-circle / .battle-* names. */

/* ---------- Page head ---------- */
.pa-head { padding-bottom: 0; }
.pa-head .ui-breadcrumb { margin-bottom: 8px; }
.pa-head .ui-lede { margin-top: 6px; font-size: 0.95rem; }
.pa-head .ui-meta { margin-top: 8px; }

/* Phones: the matchup should sit in the first screen, so the trail is left to the tabs. */
@media (max-width: 599px) {
  .pa-head { padding-top: 14px; }
  .pa-head .ui-breadcrumb { display: none; }
}

.pa-switch { margin: 16px 0; }
@media (max-width: 400px) {
  .pa-switch { gap: 2px; padding: 3px; }
  .pa-switch .ui-tab { padding: 0 10px; font-size: 0.8125rem; }
}
@media (min-width: 960px) {
  .pa-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .pa-top .pa-switch { margin: 0 0 4px; flex: none; }
}

/* ---------- Layout ---------- */
.pa-layout { display: grid; gap: 28px; }
.pa-aside { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1000px) {
  .pa-top + .pa-layout { margin-top: 24px; }
  .pa-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .pa-battle, .pa-board { grid-column: 1; }
  .pa-aside { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- Voting arena ---------- */
.pa-battle { padding: 14px 12px 8px; }
@media (min-width: 768px) { .pa-battle { padding: 18px 24px 12px; } }

.pa-battle__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.pa-battle__title { font-size: 1rem !important; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pa-battle__title .ui-icon { color: var(--accent-text); }

.pa-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 0 minmax(0, 1fr);
  column-gap: 6px;
  max-width: 640px;
  margin: 0 auto;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
@media (min-width: 768px) { .pa-arena { column-gap: 10px; } }
.pa-arena.transitioning { opacity: 0; transform: scale(0.98); }

.pa-vs {
  position: relative; z-index: 1;
  align-self: center; justify-self: center;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: 0 0 0 4px var(--surface);
  color: var(--text-2);
  font: 700 0.75rem/1 var(--font);
  transform: translateY(-50px);
  pointer-events: none;
}

.pa-card {
  display: flex; flex-direction: column;
  min-width: 0; width: 100%;
  margin: 0; padding: 8px 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--text);
  font: inherit; text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background-color 0.15s, opacity 0.2s, transform 0.1s;
}
.pa-card:hover { border-color: var(--line-strong); background: var(--surface-3); }
.pa-card:active { transform: scale(0.985); }
.pa-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pa-card__media {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-3);
  color: var(--text-3);
}
@media (min-width: 768px) { .pa-card__media { aspect-ratio: 1; } }
.pa-card__media > .ui-icon { width: 36%; height: 36%; stroke-width: 1.5; }
.pa-card__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 22%;
  max-width: none !important;
}
.pa-card__body { display: block; padding: 10px 2px 10px; }
.pa-card__name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-weight: 700; font-size: 0.975rem; line-height: 1.25;
  overflow-wrap: anywhere;
}
.pa-card__pts { display: block; margin-top: 3px; font-size: 0.8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pa-card__cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: auto;
  min-height: 40px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 650; font-size: 0.9rem;
  transition: background-color 0.15s, color 0.15s;
}
.pa-card__cta .ui-icon { width: 16px; height: 16px; }
.pa-card:hover .pa-card__cta { background: var(--accent); color: var(--accent-ink); }

/* RankingVote adds .winner-glow to the tapped card while the vote is sent. */
.pa-card.winner-glow { border-color: var(--accent); background: var(--accent-soft); }
.pa-card.winner-glow .pa-card__cta { background: var(--accent); color: var(--accent-ink); }
.pa-arena:has(.winner-glow) .pa-card:not(.winner-glow) { opacity: 0.4; }

.pa-battle__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 24px; margin-top: 6px;
  font-size: 0.8125rem; color: var(--text-2);
}
.pa-feedback { margin: 0; font-weight: 600; color: var(--up) !important; opacity: 0; transition: opacity 0.2s; }
.pa-feedback.show { opacity: 1; }
.pa-feedback.is-error { color: var(--down) !important; }
.pa-count strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pa-count[hidden] { display: none; }

.pa-empty { padding: 32px 8px; text-align: center; color: var(--text-2); }

/* ---------- Leaderboard ---------- */
.pa-board .ui-section-head { margin-bottom: 0; }
.pa-toolbar { margin: 14px 0; }
.pa-search { flex: 1 1 220px; max-width: 320px; margin: 0; }
.pa-search .ui-search-field { display: block; }
.pa-search .ui-input { height: 40px; }
@media (max-width: 600px) { .pa-search { max-width: none; flex-basis: 100%; } }

.pa-row .ui-thumb--round { width: 44px; height: 44px; object-fit: cover; object-position: center 20%; }
.pa-ph {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-2);
  font-weight: 700; font-size: 0.95rem;
}
.pa-row .ui-row__sub .pa-w { color: var(--up); }
.pa-row .ui-row__sub .pa-l { color: var(--down); }

.pa-filter { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; font-size: 0.875rem; color: var(--text-2); }

/* Page links: ‹ 1 … 4 5 6 … 12 › */
.pa-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; }
.pa-pager a, .pa-pager span {
  display: inline-grid; place-items: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text-2) !important;
}
.pa-pager a { border: 1px solid var(--line); }
.pa-pager a:hover { border-color: var(--line-strong); color: var(--text) !important; }
.pa-pager a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg) !important; }
.pa-pager .ui-icon { width: 16px; height: 16px; }

/* ---------- Side column ---------- */
.pa-mini .ui-row { min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
.pa-mini .ui-row__title { font-weight: 500; }
.pa-mini .ui-rank { width: 20px; font-size: 0.875rem; }
.pa-mini .ui-row__value.is-up { color: var(--up); }
.pa-mini-empty { padding: 16px; font-size: 0.875rem; color: var(--text-2); }

.pa-aside .ui-tile__title { display: flex; align-items: center; gap: 6px; }
.pa-aside .ui-tile__title .ui-icon { width: 14px; height: 14px; color: var(--text-3); }

/* ---------- About / FAQ ---------- */
.pa-faq { max-width: 820px; }
.pa-faq h2 { font-size: 1.25rem !important; font-weight: 700; margin: 0 0 10px; }
.pa-faq h3 { font-weight: 700; }
.pa-faq h3 { font-size: 1rem !important; margin: 20px 0 4px; }
.pa-faq dl { margin: 0; }
.pa-faq dt { margin-top: 14px; font-weight: 600; color: var(--text); }
.pa-faq dd { margin: 4px 0 0; }
.pa-faq .pa-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 0.875rem; }

/* =====================================================================
 * Answer-first summary, top 10, leaders, FAQ and related links
 * (includes/PollSeo.php). pq- prefix. Used by the two actress polls,
 * the poll hub and the Hall of Fame pages.
 * ===================================================================== */

/* Every image here sits in a box with a fixed aspect ratio, so nothing shifts
   while photos load; a broken photo removes itself and the icon shows. */

/* ---------- Answer-first summary ---------- */
.pq-answer { max-width: 72ch; }
.pq-answer strong { color: var(--text); font-weight: 650; }
.ui-main .pq-answer a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ui-main .pq-answer a:hover { text-decoration-color: currentColor; }
.ui-main .pq-answer a strong { color: var(--accent-text); }
.pq-updated .ui-icon { width: 14px; height: 14px; color: var(--text-3); }
.pq-updated time { color: var(--text); font-weight: 500; }

/* ---------- Layout: the top 10 sits between the matchup and the full list ---------- */
.pq-layout > * { min-width: 0; }
@media (min-width: 1000px) {
  .pq-layout > .pq-top { grid-column: 1; }
  .pq-layout > .pa-aside { grid-row: 1 / span 3; }
}

/* ---------- Top 10 photo cards ---------- */
.pq-top .ui-section-head { margin-bottom: 12px; }
.pq-top__list {
  list-style: none;
  display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.pq-top__list::-webkit-scrollbar { display: none; }
.pq-top__item { min-width: 0; scroll-snap-align: start; }
@media (min-width: 700px) {
  .pq-top__list {
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px; margin: 0; padding: 0; overflow: visible;
  }
}
.pq-top__card {
  display: flex; flex-direction: column; height: 100%; min-width: 0;
  padding: 6px 6px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color 0.15s, background-color 0.15s;
}
a.pq-top__card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pq-top__img, .hof-img {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; overflow: hidden;
  border-radius: var(--r); background: var(--surface-3); color: var(--text-3);
}
.pq-top__img > .ui-icon, .hof-img > .ui-icon { width: 34%; height: 34%; stroke-width: 1.5; }
.pq-top__img img, .hof-img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%; max-width: none !important;
}
.pq-top__rank {
  position: absolute; left: 6px; top: 6px; z-index: 1;
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: var(--r-pill); background: var(--scrim); color: #fff;
  font: 700 0.8rem/1 var(--font); font-variant-numeric: tabular-nums;
}
.pq-top__rank--1 { background: var(--gold); color: #1b1204; }
.pq-top__rank--2 { background: var(--silver); color: #14141a; }
.pq-top__rank--3 { background: var(--bronze); color: #1b1204; }
.pq-top__name {
  margin-top: 8px; padding: 0 2px;
  font-weight: 650; font-size: 0.9rem; line-height: 1.25; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pq-top__pts {
  margin-top: 2px; padding: 0 2px;
  font-size: 0.78rem; color: var(--text-2); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pq-top__pts strong { color: var(--text); font-weight: 700; }
.pq-top__rec { padding: 0 2px; font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Side cards: leaders by period, best win rate ---------- */
.pq-card .ui-card__head .ui-icon { width: 18px; height: 18px; color: var(--accent-text); }
.pq-card .ui-card__foot { padding: 10px 16px; }
.pq-row { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.pq-thumb {
  position: relative; flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; overflow: hidden;
  border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-3);
}
.pq-thumb > .ui-icon { width: 20px; height: 20px; }
.pq-thumb > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%; max-width: none !important;
}
.pq-muted { color: var(--text-3) !important; font-weight: 500 !important; }

/* ---------- About and FAQ ---------- */
.ui-main .pq-h2 { margin: 0 0 12px; font-size: 1.25rem; font-weight: 700; }
@media (min-width: 768px) { .ui-main .pq-h2 { font-size: 1.5rem; } }
.pq-prose { max-width: 820px; }
.pq-about + .pq-faq { padding-top: 0; }
.pq-faq__list { display: grid; gap: 10px; max-width: 900px; }
.pq-faq__item {
  padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.ui-main .pq-faq__item h3 { margin: 0 0 6px; font-size: 0.98rem; font-weight: 650; line-height: 1.35; }
.pq-faq__item p { font-size: 0.93rem; line-height: 1.6; color: var(--text-2); }
.ui-main .pq-faq__item a { color: var(--accent-text); }
.ui-main .pq-faq__item a:hover { text-decoration: underline; }
.pq-links .ui-tile__icon .ui-icon { width: 20px; height: 20px; }

/* =====================================================================
 * Hall of Fame (/poll-rankings/hall-of-fame/…). hof- prefix, on top of
 * the hf- rules in otherLinks/mainFiles/css/hall-of-fame.css.
 * ===================================================================== */
.hof .pq-thumb { border-radius: var(--r-sm); }
.hof .ui-card__head h2 .ui-icon, .hof .ui-card__head h3 .ui-icon { width: 18px; height: 18px; }

/* ---------- Overview: one card per poll ---------- */
.hof-polls { display: grid; gap: 14px; }
@media (min-width: 640px) { .hof-polls { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.hof-poll { display: flex; flex-direction: column; }
.hof-poll__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.ui-main .hof-poll__head h3 { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.95rem; font-weight: 700; }
.hof-poll__head h3 .ui-icon { flex: none; width: 18px; height: 18px; color: var(--accent-text); }
.ui-main .hof-poll__head h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Titles wrap to two lines in three narrow columns; keep the photos level. */
@media (min-width: 640px) and (max-width: 1099px) { .hof-poll__head { min-height: 66px; } }

/* Champion: photo beside the name on phones, photo on top from 640px. */
.hof-champ {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 14px; color: var(--text);
}
a.hof-champ:hover .hof-champ__name { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) { .hof-champ { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; } }
.hof-champ__text { display: flex; flex-direction: column; min-width: 0; }
.hof-champ__label {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-text);
}
.hof-champ__label .ui-icon { width: 14px; height: 14px; }
.hof-champ__name { margin-top: 4px; font-size: 1.15rem; font-weight: 750; line-height: 1.2; letter-spacing: -0.01em; }
.hof-champ__pts { margin-top: 4px; font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hof-champ__pts strong { color: var(--text); font-weight: 700; }
.hof-poll__list { border-top: 1px solid var(--line); }
.hof-poll__list:empty { display: none; }
.hof-poll__list .ui-row { min-height: 60px; padding: 8px 14px; }
.hof-poll__foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.hof-poll__foot .ui-btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.hof-poll__foot .ui-btn .ui-icon { width: 16px; height: 16px; }

/* Record book (overview): one card per record. */
.hof-book .ui-card__head { flex-wrap: wrap; row-gap: 2px; }
.hof-book__note { font-size: 0.8125rem; color: var(--text-3); }

/* ---------- Category page: leaders + record book side by side on wide screens ---------- */
.hof-top { display: grid; gap: 28px; }
@media (min-width: 960px) { .hof-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; } }
.hof-top > section { min-width: 0; }
.hof-leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .hof-leaders { gap: 12px; } }
.hof-card { height: 100%; }
.hof-card .hf-card__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 480px) {
  .hof-leaders .hof-card { padding: 6px 6px 10px; }
  .hof-leaders .hf-card__label { font-size: 0.7rem; }
  .hof-leaders .hf-card__name { font-size: 0.85rem; }
  .hof-leaders .hf-card__pts { font-size: 0.75rem; }
}

.hof-records { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .hof-records { gap: 12px; } }
.hof-rec { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; }
.hof-rec__label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 650; letter-spacing: 0.02em; color: var(--accent-text);
}
.hof-rec__label .ui-icon { width: 14px; height: 14px; }
.hof-rec__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hof-rec .pq-thumb { width: 40px; height: 40px; }
.hof-rec__name {
  min-width: 0; font-weight: 650; font-size: 0.92rem; line-height: 1.25; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hof-rec__value { font-size: 1.35rem; font-weight: 750; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.hof-rec__value small { margin-left: 2px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0; color: var(--text-2); }
.hof-rec__sub { margin-top: -4px; font-size: 0.78rem; line-height: 1.35; color: var(--text-2); }

/* Monthly champions: a gallery of square photo cards. */
.hof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
@media (min-width: 768px) { .hof-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } }
