/* Shared catalogue actions. A hit target always stays at least 44 CSS pixels. */
.wp-theme-streamit {
    --med-cta-size: max(44px, 2.75rem);
    --med-cta-text: .875rem;
    --med-cta-pad: .85rem;
    --med-cta-gap: .375rem;
    --med-cta-light: #f6f5f3;
    --med-cta-ink: #171719;
    --med-cta-dark: #222226;
    --med-cta-line: #939398;
}
@supports (color: oklch(50% 0 0)) {
    .wp-theme-streamit {
        --med-cta-light: oklch(97% .003 86);
        --med-cta-ink: oklch(20.5% .005 286);
        --med-cta-dark: oklch(25.5% .008 286);
        --med-cta-line: oklch(67% .009 286);
    }
}
.wp-theme-streamit .detail-part {
    --med-cta-size: max(44px, 3rem);
    --med-cta-text: 1rem;
    --med-cta-pad: 1.125rem;
    --med-cta-gap: .5rem;
}
.wp-theme-streamit .med-cta-hero {
    --med-cta-size: max(44px, clamp(2.875rem, 2.45rem + .9vw, 3.375rem));
    --med-cta-text: clamp(.9375rem, .87rem + .25vw, 1.0625rem);
    --med-cta-pad: clamp(1rem, .8rem + .9vw, 1.6rem);
    --med-cta-gap: .625rem;
}
/* Hero actions stay in the slide. Only catalogue cards use an action tray. */
.home.wp-theme-streamit .home-slider .swiper-slide-active .med-cta-hero {
    animation: none;
    transform: none;
    opacity: 1;
}
/* Elementor's generated responsive rule hides the enabled arrows with !important. */
.home.wp-theme-streamit .elementor-widget-simple-banner .streamit-banner-slider:has(> .home-slider.swiper-initialized[data-navigation="true"])
    > .swiper-arrow:not(.swiper-button-lock):not([hidden]) {
    display: flex !important;
    opacity: 1;
}
@media (max-width: 767px) {
    .home.wp-theme-streamit .elementor-widget-simple-banner .streamit-banner-slider > .swiper-arrow {
        inset-block: .5rem auto;
        width: 44px;
        height: 44px;
        margin: 0;
        transform: none;
        border-radius: 50%;
        background: rgb(15 15 18 / .8);
        color: white;
    }
    .home.wp-theme-streamit .elementor-widget-simple-banner .streamit-banner-slider > .swiper-arrow.swiper-button-prev {
        inset-inline: 1rem auto;
    }
    .home.wp-theme-streamit .elementor-widget-simple-banner .streamit-banner-slider > .swiper-arrow.swiper-button-next {
        inset-inline: auto 1rem;
    }
}
.wp-theme-streamit .med-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--med-cta-gap);
}
.wp-theme-streamit .med-cta-group form.medyapim-watch-intent { display: inline-flex; margin: 0; }
.wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper,.play-button-wrapper,.episode-detail)
    :is(.med-cta-play,.med-cta-info,.medyapim-result-info,.medyapim-result-list,.medyapim-guest-watch,.watch-list-btn) {
    display: inline-flex;
    position: relative;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    inline-size: var(--med-cta-size);
    min-inline-size: var(--med-cta-size);
    block-size: var(--med-cta-size);
    min-block-size: var(--med-cta-size);
    border: 1px solid var(--med-cta-line);
    border-radius: 50%;
    background: var(--med-cta-dark);
    color: #fff;
    box-shadow: none;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
}
.wp-theme-streamit :is(.med-cta-group,.play-button-wrapper,.episode-detail) .med-cta-play {
    inline-size: auto;
    max-inline-size: 100%;
    gap: .45em;
    padding-inline: var(--med-cta-pad);
    border-radius: 100vmax;
    border-color: var(--med-cta-light);
    background: var(--med-cta-light);
    color: var(--med-cta-ink);
    font-size: var(--med-cta-text);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: normal;
    text-transform: none;
}
.wp-theme-streamit .med-cta-play::before {
    content: "";
    flex: none;
    inline-size: .8em;
    block-size: .9em;
    background: currentColor;
    clip-path: polygon(7% 0, 97% 50%, 7% 100%);
}
.wp-theme-streamit .med-cta-play.med-cta-episodes::before {
    inline-size: .88em;
    block-size: .75em;
    clip-path: none;
    background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 40%);
}
.wp-theme-streamit #medyapim-episodes { scroll-margin-block-start: 6rem; }
.wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper)
    :is(.watch-list-btn,.medyapim-guest-watch,.medyapim-result-list) {
    color: var(--med-cta-ink);
    background: var(--med-cta-light);
    border-color: var(--med-cta-light);
}
.wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper)
    :is(.watch-list-btn,.medyapim-guest-watch,.medyapim-result-list) > :not(.screen-reader-text) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
.wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper)
    :is(.watch-list-btn,.medyapim-guest-watch,.medyapim-result-list)::before {
    content: "";
    inline-size: 1.05rem;
    block-size: 1.05rem;
    background: linear-gradient(currentColor,currentColor) center / 100% 2px no-repeat,
                linear-gradient(currentColor,currentColor) center / 2px 100% no-repeat;
}
.wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper) .watch-list-btn[data-action="remove"]::before {
    inline-size: .63rem;
    block-size: 1.04rem;
    margin-block-start: -.25rem;
    background: transparent;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.wp-theme-streamit .med-cta-group :is(.med-cta-info,.medyapim-result-info) {
    font: 700 1.3rem/1 Georgia, serif;
    background: #d4d3d6;
    border-color: #d4d3d6;
    color: var(--med-cta-ink);
}
.wp-theme-streamit .med-cta-group .watch-list-btn.med-watch-remove[data-action="remove"]::before {
    inline-size: 1.25rem;
    block-size: 1.25rem;
    margin: 0;
    border: 0;
    transform: none;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16l-6-4zM9.5 9.5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-theme-streamit .med-cta-group [hidden] { display: none; }
.wp-theme-streamit .med-cta-home-caption {
    container-type: inline-size;
    padding-block: .5rem;
}
.wp-theme-streamit .medyapim-series-poster-caption { container-type: inline-size; }
.wp-theme-streamit .med-cta-home-caption .genres-list > li::marker { content: ''; }
.wp-theme-streamit .med-cta-home-caption .streamit-title { margin-block: .25rem; }
.wp-theme-streamit .med-cta-home-caption .streamit-title a {
    color: #f6f5f6;
    color: oklch(97% .002 330);
}
.wp-theme-streamit .med-cta-home-caption .streamit-title a:is(:hover, :focus-visible) {
    text-decoration: underline;
    text-underline-offset: .15em;
}
.wp-theme-streamit .streamit-card-landscape:focus-within .card-description:has(.med-cta-group) {
    opacity: 1;
    visibility: visible;
    transform: none;
}
@media (max-width: 767px), (hover: none) {
    .wp-theme-streamit .med-cta-home-caption .streamit-title.line-count-1 {
        -webkit-line-clamp: 2;
        white-space: normal;
    }
    /* The real title and actions stay together below the artwork on touch. */
    .wp-theme-streamit .elementor-5666 .streamit-card-landscape:has(.med-cta-home-caption)
        [data-medyapim-touch-title]::after {
        content: none;
    }
}
.wp-theme-streamit :is(.med-cta-group,.play-button-wrapper,.episode-detail,.watchlist-button-wrapper)
    :is(.med-cta-play,.med-cta-info,.medyapim-result-info,.medyapim-result-list,.medyapim-guest-watch,.watch-list-btn):focus-visible {
    outline: 2px solid white;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #161618;
}
@media (hover:hover) {
    .wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper)
        :is(.med-cta-info,.medyapim-result-info,.medyapim-result-list,.medyapim-guest-watch,.watch-list-btn):hover {
        background: #fff;
        color: var(--med-cta-ink);
        border-color: #fff;
    }
    .wp-theme-streamit :is(.med-cta-group,.episode-detail,.play-button-wrapper) .med-cta-play:hover {
        background: #dedde0;
        border-color: #dedde0;
        color: var(--med-cta-ink);
    }
}
@media (forced-colors:active) {
    .wp-theme-streamit .med-cta-play::before,
    .wp-theme-streamit :is(.med-cta-group,.watchlist-button-wrapper) :is(.watch-list-btn,.medyapim-guest-watch,.medyapim-result-list)::before {
        forced-color-adjust: none;
        color: ButtonText;
    }
}

/* Before enhancement, keyboard and mouse can still expose the native card actions. */
@media (hover:hover) and (pointer:fine) {
    .wp-theme-streamit :is(.streamit-card,.medyapim-result-card):not(:hover,:focus-within)
        .med-cta-group:not(.med-cta-tray,.med-cta-hero) {
        visibility: hidden;
    }
}
.wp-theme-streamit .med-cta-owner { position: relative; }
.wp-theme-streamit .med-cta-owner > .med-cta-tray,
.wp-theme-streamit .med-cta-tray[data-med-portal] {
    display: none;
    position: fixed;
    inset: auto;
    left: var(--med-tray-x, 0px);
    top: var(--med-tray-y, 0px);
    z-index: 999;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .375rem;
    width: max-content;
    max-width: calc(100vw - 1rem);
    min-height: 0;
    height: auto;
    margin: 0;
    padding: .375rem;
    box-sizing: border-box;
    border: 1px solid #5e5d62;
    border-radius: 1.8rem;
    background: #242327;
    box-shadow: 0 .3rem .9rem rgb(0 0 0 / .35);
    opacity: 1;
    visibility: visible;
    transform: none;
}
.wp-theme-streamit .med-cta-owner > .med-cta-tray[data-med-open],
.wp-theme-streamit .med-cta-tray[data-med-portal][data-med-open] { display: flex; }
.wp-theme-streamit .med-cta-tray::backdrop { background: transparent; pointer-events: none; }
@media (prefers-reduced-motion:no-preference) {
    .wp-theme-streamit .med-cta-tray[data-med-open] { animation: med-cta-reveal 140ms ease-out both; }
}
@keyframes med-cta-reveal {
    from { opacity: 0; translate: 0 3px; }
    to { opacity: 1; translate: 0; }
}
.wp-theme-streamit .med-cta-owner > .med-cta-more {
    display: none;
    position: absolute;
    inset-block-start: .35rem;
    inset-inline-end: .35rem;
    z-index: 3;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #afafb3;
    border-radius: 50%;
    background: rgb(24 23 27 / .9);
    color: white;
    font: 600 1.25rem/1 system-ui,sans-serif;
    letter-spacing: .04em;
}
.wp-theme-streamit .med-cta-more:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.wp-theme-streamit .episode-card.watching.med-cta-owner { pointer-events: auto; }
.wp-theme-streamit .episode-card.watching.med-cta-owner > .episode-overlay { pointer-events: none; }
@media (any-pointer:coarse), (hover:none) {
    .wp-theme-streamit .med-cta-owner > .med-cta-more { display: inline-flex; }
    /* The episode slider reserves both outside edges for full-height navigation. */
    .wp-theme-streamit .streamit-episodes-content .episode-card > .med-cta-more {
        inset-inline-end: 3.25rem;
    }
    .wp-theme-streamit .streamit-episodes-content > .swiper-arrow::after { pointer-events: none; }
}
