/* public_piloto_detail_showcase.css — vitrine da carreira (DEM-158): detalhes dos indicadores,
   galeria de taças, curiosidades, circuitos e modal da pista. */

/* ===== Modal largo ===== */
#rival-modal .modal-dialog.pds-wide { max-width: min(980px, calc(100vw - 1.5rem)); }
#rival-modal .modal-dialog.pds-wide .modal-body { padding: 0 1.1rem 1.1rem; }

/* Cabeçalho do modal */
.pds-hero {
  --hc: var(--color-accent, #f39c12);
  position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 -1.1rem .9rem; padding: 1rem 1.1rem;
  background: radial-gradient(70% 140% at 0% 0%, color-mix(in srgb, var(--hc) 22%, transparent), transparent 60%), #121318; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.pds-hero--gold { --hc: #ffc400; } .pds-hero--silver { --hc: #c9d1db; }
.pds-hero > i { font-size: 1.9rem; color: var(--hc); }
.pds-hero > div { display: flex; align-items: baseline; gap: .45rem; }
.pds-hero > div b { font: italic 900 2.4rem/1 'Exo 2', sans-serif; color: #fff; }
.pds-hero > div span { font-size: .8rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.pds-hero ul { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; flex: 1 1 320px; justify-content: flex-end; }
.pds-hero li { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .22rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .07); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pds-hero li b { color: #fff; } .pds-hero li i { color: var(--hc); }

/* Ferramentas da lista */
.pds-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: .8rem; }
.pds-filter { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: .15rem; max-width: 100%; }
.pds-filter button { flex: 0 0 auto; padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: rgba(255, 255, 255, .75); font-size: .78rem; font-weight: 800; cursor: pointer; }
.pds-filter button em { font-style: normal; opacity: .55; margin-left: .15rem; }
.pds-filter button.is-on { background: var(--color-accent, #f39c12); border-color: var(--color-accent, #f39c12); color: #111; }
.pds-filter button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pds-search { display: flex; align-items: center; gap: .45rem; flex: 1 1 220px; padding: .35rem .7rem; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.pds-search i { color: rgba(255, 255, 255, .45); }
.pds-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font-size: .85rem; }

/* Lista por ano */
.pds-year { margin-bottom: .9rem; }
.pds-year h6 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; font: italic 900 1.05rem 'Exo 2', sans-serif; color: #fff; }
.pds-year h6::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.pds-year h6 em { order: 2; font-style: normal; font-size: .72rem; font-weight: 800; color: rgba(255, 255, 255, .5); }
.pds-row {
  --pc: #3a3c48; --pt: #fff;
  display: grid; grid-template-columns: 52px minmax(0, 1.5fr) minmax(0, 1fr) auto 18px; align-items: center; gap: .75rem; margin-bottom: .35rem; padding: .5rem .7rem .5rem .5rem;
  border-radius: 12px; text-decoration: none; color: #fff; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); border-left: 3px solid var(--pc);
  transition: background .18s ease, transform .18s ease;
}
.pds-row:hover, .pds-row:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); transform: translateX(3px); outline: none; }
.pds-row--p1 { --pc: #ffc400; --pt: #111; } .pds-row--p2 { --pc: #c9d1db; --pt: #111; } .pds-row--p3 { --pc: #e09155; --pt: #111; }
.pds-row--top5 { --pc: var(--color-accent, #f39c12); --pt: #111; } .pds-row--top10 { --pc: #5b8def; } .pds-row--nc { --pc: #5a2a2a; }
.pds-pos { display: flex; align-items: center; justify-content: center; width: 46px; height: 40px; border-radius: 10px; background: var(--pc); color: var(--pt); }
.pds-pos b { font: italic 900 1.15rem 'Exo 2', sans-serif; }
.pds-row--p1 .pds-pos { box-shadow: 0 0 16px rgba(255, 196, 0, .45); }
.pds-main { display: flex; flex-direction: column; min-width: 0; }
.pds-main > b { font-size: .92rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pds-main small { display: flex; align-items: center; gap: .35rem; min-width: 0; font-size: .76rem; color: rgba(255, 255, 255, .55); }
.pds-main small img { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; flex: 0 0 18px; }
.pds-main small span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pds-circ { font-size: .8rem; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pds-circ i { color: rgba(255, 255, 255, .35); }
.pds-date { font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.pds-go { color: rgba(255, 255, 255, .35); font-size: .75rem; }
.pds-row:hover .pds-go { color: var(--color-accent, #f39c12); }
.pds-empty, .pds-none { padding: 1.2rem; text-align: center; color: rgba(255, 255, 255, .6); }

/* Faixa onde terminou (modal Corridas) */
.pds-fb { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.pds-fb i { display: block; }
.pds-fb--p1 { background: #ffc400; } .pds-fb--p2 { background: #c9d1db; } .pds-fb--p3 { background: #e09155; }
.pds-fb--top5 { background: var(--color-accent, #f39c12); } .pds-fb--top10 { background: #5b8def; } .pds-fb--rest { background: #3a3c48; } .pds-fb--nc { background: #5a2a2a; }
.pds-fb-k { margin: .4rem 0 .9rem; font-size: .8rem; color: rgba(255, 255, 255, .65); }

/* ===== Galeria de taças ===== */
.pds-trophies-head { display: flex; align-items: center; gap: .7rem; margin: -.2rem 0 .9rem; }
.pds-trophies-head b { font: italic 900 2.6rem/1 'Exo 2', sans-serif; background: linear-gradient(180deg, #fff1a8, #ffc400 55%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pds-trophies-head span { font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); line-height: 1.3; }
.pds-trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.pds-trophy {
  --g1: #fff1a8; --g2: #ffc400; --g3: #8a6400;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.2rem 1rem 1rem; border-radius: 18px; overflow: hidden; text-align: center;
  text-decoration: none; color: #fff; border: 2px solid transparent;
  background: radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--g2) 28%, transparent), transparent 70%), linear-gradient(170deg, #1e1a10, #0e0f13) padding-box,
              linear-gradient(140deg, var(--g1), var(--g2) 45%, var(--g3)) border-box;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4); transition: transform .25s ease, box-shadow .25s ease;
  animation: pds-in .55s cubic-bezier(.2, .9, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms);
}
.pds-trophies--silver .pds-trophy { --g1: #fff; --g2: #c9d1db; --g3: #5d6570; }
.pds-trophy:hover, .pds-trophy:focus-visible { color: #fff; transform: translateY(-6px); box-shadow: 0 22px 40px rgba(0, 0, 0, .5), 0 0 28px color-mix(in srgb, var(--g2) 40%, transparent); outline: none; }
.pds-trophy-cup { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--g1), var(--g2) 55%, var(--g3)); box-shadow: 0 8px 22px color-mix(in srgb, var(--g2) 45%, transparent), inset 0 -4px 8px rgba(0, 0, 0, .25); }
.pds-trophy-cup i { font-size: 2rem; color: #2b2000; }
.pds-trophies--silver .pds-trophy-cup i { color: #1d2128; }
.pds-trophy-rib { margin-top: .2rem; padding: .1rem .7rem; border-radius: 999px; font-size: .64rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #111; background: var(--g2); }
.pds-trophy > b { font: italic 900 1.05rem/1.2 'Exo 2', sans-serif; text-transform: uppercase; }
.pds-trophy > small { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: rgba(255, 255, 255, .6); }
.pds-trophy > small img { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; }
.pds-trophy-foot { display: flex; justify-content: space-between; gap: .5rem; width: 100%; margin-top: auto; padding-top: .55rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .78rem; color: rgba(255, 255, 255, .7); }
.pds-trophy-foot b { font: italic 900 1.1rem 'Exo 2', sans-serif; color: var(--g2); }
.pds-trophy-foot span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; }
.pds-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .22) 45%, transparent 60%); transform: translateX(-120%); }
.pds-trophy:hover .pds-shine, .pds-trophy:focus-visible .pds-shine { transition: transform .9s ease; transform: translateX(120%); }
@keyframes pds-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

/* ===== Curiosidades ===== */
.pds-tl { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.pds-tl::before { content: ''; position: absolute; left: 1rem; right: 1rem; top: 21px; height: 2px; background: linear-gradient(90deg, var(--color-accent, #f39c12), #ffc400); opacity: .45; }
.pds-tl li { position: relative; display: flex; flex-direction: column; gap: .1rem; padding-top: 3rem; animation: pds-in .5s ease both; animation-delay: calc(var(--i) * 90ms); }
.pds-tl li > i { position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #15161c; border: 2px solid var(--color-accent, #f39c12); color: var(--color-accent, #f39c12); font-size: 1rem; }
.pds-tl li.is-gold > i { border-color: #ffc400; color: #ffc400; box-shadow: 0 0 16px rgba(255, 196, 0, .35); }
.pds-tl-k { font-size: .66rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.pds-tl li > b { font: italic 900 1.3rem 'Exo 2', sans-serif; color: #fff; }
.pds-tl-t { font-size: .85rem; font-weight: 700; color: rgba(255, 255, 255, .85); }
.pds-tl li small { font-size: .74rem; color: rgba(255, 255, 255, .5); }
.pds-cur-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: .9rem; align-items: start; }
.pds-rates { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pds-rate { --rc: #ffc400; display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .9rem .5rem; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .65); text-align: center; }
.pds-rate--silver { --rc: #c9d1db; }
.pds-ring { position: relative; display: flex; align-items: center; justify-content: center; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--rc) var(--deg), rgba(255, 255, 255, .08) 0); }
.pds-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #15161c; }
.pds-ring b { position: relative; font: italic 900 1.45rem 'Exo 2', sans-serif; color: #fff; letter-spacing: 0; text-transform: none; }
.pds-ring b small { font-size: .6em; color: rgba(255, 255, 255, .6); }
.pds-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .6rem; }
.pds-fact { --fc: var(--color-accent, #f39c12); position: relative; display: flex; flex-direction: column; gap: .15rem; min-height: 116px; padding: .8rem .9rem; border-radius: 14px; overflow: hidden; background: linear-gradient(165deg, #1b1c24, #111218); border: 1px solid rgba(255, 255, 255, .08); animation: pds-in .5s ease both; animation-delay: calc(var(--i) * 60ms); }
.pds-fact > i { position: absolute; right: .7rem; top: .7rem; font-size: 1.25rem; color: var(--fc); opacity: .55; }
.pds-fact-k { font-size: .64rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--fc); padding-right: 1.6rem; }
.pds-fact > b { margin-top: auto; font: italic 900 1.7rem/1.05 'Exo 2', sans-serif; color: #fff; }
.pds-fact > small { font-size: .74rem; font-weight: 700; color: rgba(255, 255, 255, .6); line-height: 1.25; }
.pds-fact--gold { --fc: #ffc400; background: linear-gradient(165deg, rgba(255, 196, 0, .16), #111218 70%); border-color: rgba(255, 196, 0, .3); }
.pds-fact--hot { --fc: #ff6b3d; background: linear-gradient(165deg, rgba(255, 107, 61, .16), #111218 70%); border-color: rgba(255, 107, 61, .3); }
.pds-fact--legend { --fc: #ff4ecd; border: 2px solid transparent; background: linear-gradient(165deg, #241a2c, #111218) padding-box, linear-gradient(135deg, #ff4ecd, #ffc400, #38f9d7) border-box; }

/* ===== Circuitos ===== */
.item-grid:has(> .pds-cc) { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .85rem; }
.pds-cc.item-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; padding: 0; text-align: left; border-radius: 16px; overflow: hidden;
  background: #111218; border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pds-cc.has-wins { border-color: rgba(255, 196, 0, .45); }
.pds-cc:hover, .pds-cc:focus-visible { transform: translateY(-4px); border-color: var(--color-accent, #f39c12); box-shadow: 0 16px 30px rgba(0, 0, 0, .45); outline: none; }
.pds-cc-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s ease; }
.pds-cc-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 14, .05) 0%, rgba(10, 10, 14, .55) 45%, rgba(10, 10, 14, .96) 78%); }
.pds-cc:hover .pds-cc-img { transform: scale(1.06); }
.pds-cc-badge { position: absolute; top: .6rem; left: .6rem; z-index: 2; display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: rgba(10, 10, 14, .75); border: 1px solid rgba(255, 255, 255, .25); }
.pds-cc-badge.is-fav { color: #111; background: #ffc400; border-color: #ffc400; }
.pds-cc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .45rem; padding: .8rem .9rem .85rem; }
.pds-cc-body > b { font: italic 900 1rem/1.15 'Exo 2', sans-serif; text-transform: uppercase; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pds-cc-stats { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; font-size: .76rem; color: rgba(255, 255, 255, .7); }
.pds-cc-stats b { font-weight: 900; color: #fff; }
.pds-cc-stats i { margin-right: .25rem; color: rgba(255, 255, 255, .6); }
.pds-cc-stats .is-gold i, .pds-cc-stats .is-gold b { color: #ffc400; }
.pds-cc-stats .is-zero { opacity: .45; }
.pds-cc-best b { color: var(--color-accent, #f39c12); }
.pds-strip { display: flex; flex-wrap: wrap; gap: 3px; }
.pds-strip i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 5px; font-style: normal; font-size: .62rem; font-weight: 900; color: #111; background: #3a3c48; }
.pds-dot--p1 { background: #ffc400 !important; } .pds-dot--p2 { background: #c9d1db !important; } .pds-dot--p3 { background: #e09155 !important; }
.pds-dot--top5 { background: var(--color-accent, #f39c12) !important; } .pds-dot--top10 { background: #5b8def !important; color: #fff !important; }
.pds-dot--rest { color: rgba(255, 255, 255, .6) !important; } .pds-dot--nc { background: #5a2a2a !important; }

/* Modal da pista */
.pds-cover { position: relative; margin: 0 -1.1rem 1rem; padding: 4.5rem 1.2rem 1rem; background: linear-gradient(160deg, #1b1c24, #0e0f13); background-size: cover; background-position: center; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pds-kicker { font-size: .68rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #ffc400; }
.pds-cover h4 { margin: .15rem 0 .7rem; font: italic 900 clamp(1.4rem, 3vw, 2rem)/1.1 'Exo 2', sans-serif; text-transform: uppercase; color: #fff; text-shadow: 0 3px 14px rgba(0, 0, 0, .6); }
.pds-cover-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; max-width: 560px; }
.pds-cover-stats span { display: flex; flex-direction: column; padding: .5rem .6rem; border-radius: 12px; background: rgba(10, 10, 14, .7); border: 1px solid rgba(255, 255, 255, .12); font-size: .64rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); backdrop-filter: blur(4px); }
.pds-cover-stats b { font: italic 900 1.5rem/1.1 'Exo 2', sans-serif; color: #fff; letter-spacing: 0; }
.pds-cover-stats .is-gold b { color: #ffc400; }
.pds-cover-strip { margin-bottom: .9rem; }
.pds-cover-strip > span { display: block; margin-bottom: .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.pds-cover-strip .pds-strip i { width: 22px; height: 22px; font-size: .7rem; }

@media (max-width: 760px) {
  .pds-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .55rem; }
  .pds-pos { width: 40px; height: 36px; grid-row: span 2; }
  .pds-circ { grid-column: 2 / 4; grid-row: 2; font-size: .74rem; }
  .pds-go { display: none; }
  .pds-row .pds-date { grid-column: 3; grid-row: 1; }
  .pds-hero > div b { font-size: 2rem; }
  .pds-hero ul { justify-content: flex-start; }
  .pds-cur-grid { grid-template-columns: 1fr; }
  .pds-tl { grid-template-columns: 1fr 1fr; }
  .pds-tl::before { display: none; }
  .pds-cover-stats b { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pds-trophy, .pds-tl li, .pds-fact { animation: none; }
  .pds-row, .pds-trophy, .pds-cc, .pds-cc-img { transition: none; }
  .pds-trophy:hover .pds-shine { transition: none; transform: translateX(-120%); }
}
.pds-tl li small.is-hot { color: #ffc400; font-weight: 900; }
