/* =========================================================
   UniSST V248 — CONFIGURAÇÃO GERAL AMPLIADA
   Camada final, global e responsiva. Nenhuma proporção de arte é
   alterada; somente escala, acabamento, espaçamento e comportamento.
   ========================================================= */
html body.ui-config-v248{
  --pv-card-w:var(--v248-card-w)!important;--pv-card-h:var(--v248-card-h)!important;
  --v245-card-w:var(--v248-card-w)!important;--v245-card-h:var(--v248-card-h)!important;
  --v247-card-w:var(--v248-card-w)!important;--v247-card-h:var(--v248-card-h)!important;
  --pv-poster-w:var(--v248-poster-w)!important;--pv-poster-h:var(--v248-poster-h)!important;
  --v245-poster-w:var(--v248-poster-w)!important;--v245-poster-h:var(--v248-poster-h)!important;
  --v247-poster-w:var(--v248-poster-w)!important;--v247-poster-h:var(--v248-poster-h)!important;
  --pv-super-focus-w:var(--v248-super-w)!important;
}
html body.ui-config-v248 :is(.v078-reference-home,.pv-public-showcase,[data-v239-home-card-contract],.v217-streaming-rails,.prime-experience-v205){--pv-card-w:var(--v248-card-w)!important;--pv-card-h:var(--v248-card-h)!important;--pv-poster-w:var(--v248-poster-w)!important;--pv-poster-h:var(--v248-poster-h)!important}
html body.ui-config-v248 :is(a[data-course-preview="1"].v220-reference-card.v220-landscape-card,.v078-reference-home a.reference-landscape-card,.v078-reference-home .reference-standard-rail a.course-card,.pv-public-landscape-rail .pv-public-course-card,.pv205-card-rail>a[data-course-preview="1"],.pv203-card-rail>a[data-course-preview="1"],.pv205-card-rail>a.pv205-title-card,.pv203-card-rail>a.pv203-title-card){flex:0 0 var(--v248-card-w)!important;flex-basis:var(--v248-card-w)!important;width:var(--v248-card-w)!important;min-width:var(--v248-card-w)!important;max-width:var(--v248-card-w)!important;height:var(--v248-card-h)!important;min-height:var(--v248-card-h)!important;max-height:var(--v248-card-h)!important;aspect-ratio:16/9!important;border-radius:var(--v248-radius)!important;border-color:rgba(255,255,255,var(--v248-border-alpha))!important;transition:transform var(--v248-transition) ease,filter var(--v248-transition) ease,box-shadow var(--v248-transition) ease!important}
html body.ui-config-v248 :is(a[data-course-preview="1"].v220-reference-card.v220-poster-card,.v078-reference-home .reference-poster-rail>a,.v078-reference-home a.prime-poster-card,.v078-reference-home a.featured-preview-card,.pv-public-poster-rail .pv-public-course-card,a.v220-reference-card.v220-grid-card.v220-poster-card){flex:0 0 var(--v248-poster-w)!important;flex-basis:var(--v248-poster-w)!important;width:var(--v248-poster-w)!important;min-width:var(--v248-poster-w)!important;max-width:var(--v248-poster-w)!important;height:var(--v248-poster-h)!important;min-height:var(--v248-poster-h)!important;max-height:var(--v248-poster-h)!important;aspect-ratio:2/3!important;border-radius:var(--v248-radius)!important;border-color:rgba(255,255,255,var(--v248-border-alpha))!important;transition:transform var(--v248-transition) ease,filter var(--v248-transition) ease,box-shadow var(--v248-transition) ease!important}
html body.ui-config-v248 :is(.catalog-grid,.prime-catalog-grid,.catalog-20-grid,.catalog-24-grid,.library-page .catalog-grid,.course-playlist-grid){grid-template-columns:repeat(auto-fill,var(--v248-card-w))!important;column-gap:var(--v248-gap)!important;row-gap:var(--v248-row-gap)!important}
html body.ui-config-v248 :is(.course-rail,[data-rail],.pv205-card-rail,.pv203-card-rail,.reference-standard-rail,.reference-poster-rail,.pv-public-landscape-rail,.pv-public-poster-rail){gap:var(--v248-gap)!important;scroll-snap-type:var(--v248-carousel-snap)!important;scroll-behavior:smooth}
html body.ui-config-v248.ui248-smooth-scroll-off :is(.course-rail,[data-rail],.pv205-card-rail,.pv203-card-rail){scroll-behavior:auto!important}
html body.ui-config-v248 :is(.v217-landscape-section,.v217-poster-section,.storefront-section,.model-prime-home-content>section,.v078-reference-home>section){margin-bottom:var(--v248-section-gap)!important}
html body.ui-config-v248 :is(.section-head h2,.storefront-section h2,.v217-section-title,.prime-section-title){scale:var(--v248-section-title-scale);transform-origin:left center}
html body.ui-config-v248 :is(.v216-filter-wrap,.course-detail-page-v217 .detail-layout,.course-detail-page-v217 .related-courses,.model-prime-home-content,.public-content-rail,.storefront-page){padding-left:var(--v248-gutter)!important;padding-right:var(--v248-gutter)!important}

/* Busca / box art / episodic */
html body.ui-config-v248 :is(.v217-search-card,[data-art-kind="box-movie"],.prime-box-art-movie){transform-origin:center;scale:var(--v248-box-movie-scale);aspect-ratio:3/4!important}
html body.ui-config-v248 :is([data-art-kind="box-season"],.prime-box-art-season){transform-origin:center;scale:var(--v248-box-season-scale);aspect-ratio:4/3!important}
html body.ui-config-v248 :is(.lesson-thumb,.lesson-banner-thumb,.playlist-item .lesson-thumb,.course-curriculum-sidebar .lesson-thumb,[data-art-kind="episodic"],.prime-episodic-art){transform-origin:left center;scale:var(--v248-episodic-scale);aspect-ratio:16/9!important}

/* acabamento e mídia */
html body.ui-config-v248 :is(.v220-landscape-card,.v220-poster-card,.reference-landscape-card,.pv-public-course-card,.pv205-title-card,.pv203-title-card) :is(img,video,.card-img,.featured-preview-art,.pv205-card-media,.pv203-title-card-media){width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;border-radius:inherit}
html body.ui-config-v248 :is(.reference-card-title,.pv205-card-title,.pv203-card-title,.featured-preview-caption b,.ranked-course-title){scale:var(--v248-title-scale);transform-origin:left bottom}
html body.ui-config-v248 :is(.deadline-badge,.course-badge,.pv-card-badge,[class*="badge-new"],[class*="new-badge"]){scale:var(--v248-badge-scale);transform-origin:top left}
html body.ui-config-v248 :is(.pv-card-bag-mark,.pv-card-logo-mark,.pv-super-focus-bag-mark,.pv-super-focus-brand){scale:var(--v248-brand-scale);transform-origin:bottom right}
html body.ui-config-v248 :is(.image-progress,.pv205-card-progress,.card-progress){height:var(--v248-progress-h)!important}
html body.ui-config-v248 .pv211-academic-card .pv211-hover-title{background:linear-gradient(0deg,rgba(5,5,5,var(--v248-overlay-alpha)) 0%,rgba(5,5,5,var(--v248-overlay-mid-alpha)) 32%,rgba(5,5,5,0) 100%)!important}

@media (min-width:681px) and (hover:hover) and (pointer:fine){
  html body.ui-config-v248:not(.ui248-hover-off) :is(a[data-course-preview="1"].v220-reference-card.v220-landscape-card,.v078-reference-home a.reference-landscape-card,.pv-public-landscape-rail .pv-public-course-card):is(:hover,:focus-visible,.preview-pending,.preview-active){transform:translateY(var(--v248-hover-lift)) scale(var(--v248-hover-scale))!important;filter:brightness(var(--v248-hover-brightness))!important;box-shadow:0 12px 28px rgba(0,0,0,var(--v248-shadow-alpha))!important;z-index:80!important}
  html body.ui-config-v248:not(.ui248-super-preview-off):is(.prime-v086,.prime-public-v086) a[data-course-preview="1"].v220-reference-card.v220-poster-card.prime-poster-card.pv-super-focus-active{flex:0 0 var(--v248-super-w)!important;flex-basis:var(--v248-super-w)!important;width:var(--v248-super-w)!important;min-width:var(--v248-super-w)!important;max-width:var(--v248-super-w)!important;height:var(--v248-poster-h)!important;min-height:var(--v248-poster-h)!important;max-height:var(--v248-poster-h)!important;aspect-ratio:16/9!important;transform:none!important;box-shadow:0 16px 36px rgba(0,0,0,var(--v248-shadow-alpha))!important}
}
html body.ui-config-v248.ui248-hover-off :is(a[data-course-preview="1"],.reference-landscape-card,.pv-public-course-card):is(:hover,:focus-visible,.preview-pending,.preview-active){transform:none!important;filter:none!important;box-shadow:none!important}

/* preview */
html body.ui-config-v248 .course-hover-preview.pv-glance{border-radius:var(--v248-preview-radius)!important;overflow:hidden!important;box-shadow:0 28px 74px rgba(0,0,0,var(--v248-shadow-alpha))!important}
html body.ui-config-v248 .course-hover-preview.pv-glance .course-hover-preview-media:after{background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,var(--v248-preview-overlay-alpha)))!important}
html body.ui-config-v248.ui248-preview-off .course-hover-preview{display:none!important}
html body.ui-config-v248.ui248-super-preview-off .pv-super-focus-pane{display:none!important}
html body.ui-config-v248.ui248-super-preview-off a.pv-super-focus-active{width:var(--v248-poster-w)!important;min-width:var(--v248-poster-w)!important;max-width:var(--v248-poster-w)!important;height:var(--v248-poster-h)!important}

/* setas */
html body.ui-config-v248 .rail-shell>.rail-arrow{width:var(--v248-arrow-width)!important;height:var(--v248-card-h)!important;min-height:var(--v248-card-h)!important;max-height:var(--v248-card-h)!important;opacity:0!important}
html body.ui-config-v248 :is(.v217-poster-section .rail-shell>.rail-arrow,.rail-shell:has([data-v220-rail-orientation="poster"])>.rail-arrow,.rail-shell:has(.reference-poster-rail)>.rail-arrow){height:var(--v248-poster-h)!important;min-height:var(--v248-poster-h)!important;max-height:var(--v248-poster-h)!important}
html body.ui-config-v248 .rail-shell>.rail-arrow svg{transform:scale(var(--v248-arrow-scale));transform-origin:center}
html body.ui-config-v248 .rail-shell:hover>.rail-arrow:not(.is-disabled),html body.ui-config-v248 .rail-shell:focus-within>.rail-arrow:not(.is-disabled){opacity:var(--v248-arrow-opacity)!important}
html body.ui-config-v248.ui248-arrows-always .rail-shell>.rail-arrow:not(.is-disabled){opacity:var(--v248-arrow-opacity)!important}
html body.ui-config-v248.ui248-arrows-off .rail-shell>.rail-arrow{display:none!important}

/* Hero / banners */
html body.ui-config-v248 .prime-feature-rotator[data-hero-carousel]{width:var(--v248-hero-width)!important;margin-inline:auto!important;border-radius:var(--v248-hero-radius)!important;overflow:hidden!important}
@media (min-width:1100px){html body.ui-config-v248 .prime-feature-rotator[data-hero-carousel]{aspect-ratio:var(--v248-hero-desktop-ratio)!important;height:auto!important;min-height:0!important;max-height:none!important}}
@media (min-width:681px) and (max-width:1099px){html body.ui-config-v248 .prime-feature-rotator[data-hero-carousel]{aspect-ratio:var(--v248-hero-mobile-ratio)!important;height:auto!important;min-height:0!important;max-height:none!important}}
html body.ui-config-v248 :is(.hero-slide,.public-hero-slide,.sub239-hero-slide){background-position:center var(--v248-hero-media-y)!important}
html body.ui-config-v248 :is(.hero-slide img,.hero-slide video,.public-hero-slide img,.public-hero-slide video,.sub239-hero-slide img,.sub239-hero-slide video,[data-carousel-cover-media]){object-position:center var(--v248-hero-media-y)!important}
html body.ui-config-v248 :is(.hero-backdrop,.public-prime-shade,.sub239-hero-shade){opacity:min(1,var(--v248-hero-overlay-scale))!important}
html body.ui-config-v248 :is(.prime-hero-content,.public-prime-copy,.sub239-hero-copy){scale:var(--v248-hero-content-scale);transform-origin:left bottom}
html body.ui-config-v248 :is(.prime-hero-content h1,.public-prime-copy h1,.sub239-hero-copy h1){scale:var(--v248-hero-title-scale);transform-origin:left bottom}
html body.ui-config-v248 :is(.hero-arrow,[data-hero-prev],[data-hero-next]){transform:scale(var(--v248-hero-control-scale));transform-origin:center}
html body.ui-config-v248.ui248-hero-controls-off :is(.hero-arrow,[data-hero-prev],[data-hero-next]){display:none!important}
html body.ui-config-v248.ui248-hero-dots-off :is(.hero-dots,[data-hero-dot]){display:none!important}

/* reduced motion administrativo */
html body.ui-config-v248.ui248-reduced-motion *,html body.ui-config-v248.ui248-reduced-motion *::before,html body.ui-config-v248.ui248-reduced-motion *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}

/* Touch preserva a experiência nativa e nunca depende de hover. */
@media (max-width:680px),(hover:none),(pointer:coarse){
  html body.ui-config-v248 a[data-course-preview="1"]{transform:none!important;box-shadow:none!important}
  html body.ui-config-v248 a[data-course-preview="1"].v220-poster-card.prime-poster-card.pv-super-focus-active{flex:0 0 var(--v248-poster-w)!important;width:var(--v248-poster-w)!important;min-width:var(--v248-poster-w)!important;max-width:var(--v248-poster-w)!important;height:var(--v248-poster-h)!important;min-height:var(--v248-poster-h)!important;max-height:var(--v248-poster-h)!important;aspect-ratio:2/3!important}
  html body.ui-config-v248 .rail-shell>.rail-arrow{display:none!important}
}

/* UniSST V298 — correção pontual das setas dos carrosséis de cursos.
   O trilho pode ultrapassar a viewport; a seta direita permanece dentro
   da área visível sem mudar a largura, os cards ou o funcionamento do scroll.
   As setas só aparecem ao interagir com um card/trilho, quando habilitadas. */
@media (min-width:900px) and (hover:hover) and (pointer:fine){
  html body.ui-config-v248:not(.ui248-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled){
    z-index:120!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  html body.ui-config-v248:not(.ui248-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow.right{
    right:max(12px, calc(100% - 100vw + var(--v248-gutter, 24px) + 12px))!important;
  }
  html body.ui-config-v248:not(.ui248-arrows-off) .v217-streaming-rail .v217-rail-shell:is(:hover,:focus-within) > .rail-arrow:not(.is-disabled){
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}

/* =========================================================
   UniSST V299 - ajuste EXCLUSIVO e responsivo das setas do
   carrossel de cursos V217 (complemento da V298).
   O shell pode ser mais largo que a viewport, inclusive quando
   há scrollbar vertical: mantemos o CONTROLE inteiro dentro da
   região visível, sem redimensionar cards/trilhos.
   ========================================================= */

/* Posição segura em qualquer breakpoint, sem depender de um
   gutter fixo e sem assumir que 100vw exclui a scrollbar. */
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.left {
  left:clamp(14px, 2.2vw, 28px)!important;
  right:auto!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.right {
  right:max(16px, calc(100% - 100vw + clamp(58px, 5vw, 86px)))!important;
  left:auto!important;
}

/* Mouse/trackpad: ocultas por padrão, reveladas em qualquer
   card e no foco do teclado. Não mexer no scroll existente. */
@media (hover:hover) and (pointer:fine) {
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled) {
    display:grid!important;
    z-index:150!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell:is(:hover,:focus-within) > .rail-arrow:not(.is-disabled),
  html body.ui-config-v248.ui248-arrows-always:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled) {
    opacity:var(--v248-arrow-opacity,1)!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}

/* Celulares/tablets touch não têm hover: permitem tocar nas
   setas sem eliminar a rolagem por gesto, se habilitadas. */
@media (hover:none), (pointer:coarse) {
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled) {
    display:grid!important;
    z-index:150!important;
    width:clamp(34px, 8vw, 44px)!important;
    height:clamp(34px, 8vw, 44px)!important;
    min-height:clamp(34px, 8vw, 44px)!important;
    max-height:clamp(34px, 8vw, 44px)!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    border-radius:50%!important;
    background:rgba(5,5,5,.82)!important;
    box-shadow:0 2px 12px rgba(0,0,0,.55)!important;
    opacity:var(--v248-arrow-opacity,1)!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled) svg {
    width:clamp(24px, 5vw, 30px)!important;
    height:clamp(24px, 5vw, 30px)!important;
  }
}

/* Preserva a escolha administrativa e o estado de fim/início. */
html body.ui-config-v248:is(.ui248-arrows-off,.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow,
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.is-disabled {
  display:none!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* =========================================================
   UniSST V300 - correção final e pontual das setas laterais
   do carrossel V217.
   Objetivo: impedir a faixa vertical gigante e padronizar o
   controle como botão lateral compacto, visível e clicável.
   Não altera cards, trilho ou scroll.
   ========================================================= */
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow{
  position:absolute!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:999px!important;
  background:rgba(8,8,10,.86)!important;
  border:1px solid rgba(255,255,255,.14)!important;
  box-shadow:0 6px 20px rgba(0,0,0,.42)!important;
  backdrop-filter:blur(2px)!important;
  -webkit-backdrop-filter:blur(2px)!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow svg{
  transform:none!important;
  width:clamp(16px,1.45vw,22px)!important;
  height:clamp(16px,1.45vw,22px)!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.left{
  left:clamp(12px,1.6vw,20px)!important;
  right:auto!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.right{
  right:max(12px, calc(100% - 100vw + clamp(18px, 2.2vw, 32px)))!important;
  left:auto!important;
}

@media (hover:hover) and (pointer:fine){
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled){
    width:clamp(42px,3.2vw,52px)!important;
    height:clamp(42px,3.2vw,52px)!important;
    min-width:clamp(42px,3.2vw,52px)!important;
    min-height:clamp(42px,3.2vw,52px)!important;
    max-width:clamp(42px,3.2vw,52px)!important;
    max-height:clamp(42px,3.2vw,52px)!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell:is(:hover,:focus-within) > .rail-arrow:not(.is-disabled),
  html body.ui-config-v248.ui248-arrows-always:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled){
    opacity:var(--v248-arrow-opacity,1)!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
}

@media (hover:none),(pointer:coarse){
  html body.ui-config-v248:not(.ui248-arrows-off):not(.ui247-arrows-off) .v217-streaming-rail .v217-rail-shell > .rail-arrow:not(.is-disabled){
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    max-width:40px!important;
    max-height:40px!important;
    opacity:var(--v248-arrow-opacity,1)!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow svg{
    width:18px!important;
    height:18px!important;
  }
}


/* =========================================================
   UniSST V301 - alinhamento central das setas nos cards de ponta
   Ajuste pontual: manter esquerda e direita alinhadas ao centro
   vertical dos cards visíveis das extremidades.
   ========================================================= */
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell{
  position:relative!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow{
  top:50%!important;
  bottom:auto!important;
  inset-block-start:50%!important;
  inset-block-end:auto!important;
  margin-top:0!important;
  margin-bottom:0!important;
  transform:translateY(-50%)!important;
  align-self:center!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.left,
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell.can-scroll-prev > .rail-arrow.left{
  top:50%!important;
  transform:translateY(-50%)!important;
}
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell > .rail-arrow.right,
html body.ui-config-v248 .v217-streaming-rail .v217-rail-shell.can-scroll-next > .rail-arrow.right{
  top:50%!important;
  transform:translateY(-50%)!important;
}
