.ice-videos {
    --ice-videos-blue: #00437A;
    --ice-videos-light-blue: #D9E2EB;
    --ice-videos-dark-blue: #0B1B34;
    --ice-videos-red: #D70A2D;
    --ice-videos-border: rgba(11, 27, 52, 0.16);
    --ice-videos-muted: #5f6875;
    width: 100%;
}

/* Filter bar: deliberately aligned with the Gamecenter filter language. */
.ice-videos__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-block-end: 26px;
}

.ice-videos__category-filter {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
}

.ice-videos__category-button {
    min-height: 48px;
    padding: 10px 20px;
    border: 0;
    background: var(--ice-videos-light-blue);
    color: var(--ice-videos-dark-blue);
    font: inherit;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}

.ice-videos__category-button:first-child {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.ice-videos__category-button.is-active {
    background: var(--ice-videos-blue);
    color: #fff;
}

.ice-videos__category-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

/* Dropdowns: same visual language as the stats/player filters. */
.ice-videos__select-wrap {
    display: inline-flex;
    margin: 0;
}

.ice-videos__select-wrap--team {
    min-width: 0;
}

/* Keep semantic labels for accessibility without adding a visible caption. */
.ice-videos__select-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ice-videos__select {
    border: 1px solid var(--ice-videos-light-blue);
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: #fff;
    color: var(--ice-videos-dark-blue);
    min-width: 130px;
    cursor: pointer;
}

.ice-videos__category-button:focus-visible,
.ice-videos__card:focus-visible {
    outline: 3px solid var(--ice-videos-red);
    outline-offset: 3px;
}

.ice-videos__select:focus-visible {
    outline: 3px solid var(--ice-videos-blue);
    outline-offset: 3px;
}

.ice-videos__status {
    min-height: 1.4em;
    margin-block: 0 12px;
    color: var(--ice-videos-muted);
}

.ice-videos__status:empty {
    min-height: 0;
    margin-block: 0;
}

.ice-videos__status[data-status-type="error"] {
    color: var(--ice-videos-red);
    font-weight: 700;
}

.ice-videos__player-wrap {
    width: 100%;
    margin-block-end: 22px;
    background: #000;
}

.ice-videos__player-wrap[hidden] {
    display: none;
}

.ice-videos__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 18px;
}

.ice-videos__card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ice-videos-dark-blue);
    text-align: left;
    cursor: pointer;
}

.ice-videos__card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--ice-videos-light-blue);
}

.ice-videos__card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ice-videos__play-mark {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 67, 122, 0.92);
}

.ice-videos__play-mark::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 52%;
    width: 0;
    height: 0;
    transform: translate(-42%, -50%);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
}

.ice-videos__duration {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 2px 6px;
    background: rgba(11, 27, 52, 0.9);
    color: #fff;
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.ice-videos__card-body {
    display: grid;
    align-content: start;
    gap: 5px;
    padding-block-start: 10px;
}

.ice-videos__badge {
    justify-self: start;
    padding: 3px 7px;
    background: var(--ice-videos-light-blue);
    color: var(--ice-videos-blue);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.ice-videos__card-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ice-videos-dark-blue);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ice-videos__card-date {
    color: var(--ice-videos-muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.ice-videos__card.is-active .ice-videos__card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 4px solid var(--ice-videos-blue);
    pointer-events: none;
}

.ice-videos.is-loading .ice-videos__grid {
    opacity: 0.55;
}

@media (max-width: 959px) {
    .ice-videos__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .ice-videos__filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ice-videos__category-filter {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .ice-videos__category-button {
        padding-inline: 8px;
        font-size: 13px;
    }

    .ice-videos__select-wrap,
    .ice-videos__select-wrap--team {
        flex: 1 1 auto;
        min-width: 0;
    }

    .ice-videos__select {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        font-size: 13px;
    }
}

@media (max-width: 639px) {
    .ice-videos__grid {
        grid-template-columns: 1fr;
        gap-block: 18px;
    }
}


/* Team-page heading banners: same visual language as the homepage headings.
   Background = team-ueberschriftenfarbe, text = team-schriftfarbe. */
.ice-videos__team-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin: 0;
    max-width: 100%;
    font-family: var(--ice-videos-team-action-font-family, inherit);
    font-size: var(--ice-videos-team-action-font-size, 22px);
    font-weight: var(--ice-videos-team-action-font-weight, 700);
    line-height: var(--ice-videos-team-action-line-height, 1.15);
    letter-spacing: var(--ice-videos-team-action-letter-spacing, normal);
    text-transform: var(--ice-videos-team-action-text-transform, uppercase);
}

.ice-videos__team-action,
.ice-videos__team-video-title,
.ice-videos__team-external-title {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 8px 42px 8px 16px;
    gap: 12px;
    background: var(--ice-videos-team-heading-background, var(--ice-videos-blue));
    color: var(--ice-videos-team-heading-text, #fff);
    clip-path: polygon(0 0, 100% 0, calc(100% - 34px) 100%, 0 100%);
    box-sizing: border-box;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.ice-videos__team-action {
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* Link cue used by the team schedule/ticket banners. The image already exists
   globally on the ICE site and is intentionally decorative. */
.ice-videos__team-action-arrows {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    line-height: 0;
}

.ice-videos__team-action-arrows img {
    display: block;
    width: 30px;
    height: auto;
}

.ice-videos__team-action-content {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
}

.ice-videos__team-action-label {
    display: block;
}

.ice-videos__team-action-calovo {
    display: block;
    width: auto;
    height: 16px;
    max-width: 70px;
    margin-block-start: 2px;
    object-fit: contain;
}

/* The long schedule label stays deliberately smaller so it fits the sidebar,
   but the banner height matches the other team headings. */
.ice-videos__team-action--schedule {
    min-height: 52px;
    padding-block: 6px;
    padding-inline-start: 16px;
    padding-inline-end: 36px;
    font-size: var(--ice-videos-team-schedule-font-size, 17px);
}

.ice-videos__team-action--schedule .ice-videos__team-action-label {
    line-height: 1.05;
}

.ice-videos__team-action:hover {
    color: var(--ice-videos-team-heading-text, #fff);
    text-decoration: none;
}

.ice-videos__team-action:focus-visible {
    outline: 3px solid #00437A;
    outline-offset: 3px;
}

/* Compact team-page variant: equal previews, player only on click. */
.ice-videos--team .ice-videos__grid {
    grid-template-columns: 1fr;
    gap: 18px;
}

.ice-videos--team .ice-videos__card {
    display: block;
    width: 100%;
    cursor: default;
}

.ice-videos--team .ice-videos__card-media-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.ice-videos--team .ice-videos__card-media-button:focus-visible {
    outline: 3px solid var(--ice-videos-blue);
    outline-offset: 3px;
}

.ice-videos--team .ice-videos__inline-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.ice-videos--team .ice-videos__card-body {
    padding-block-start: 8px;
}

.ice-videos--team .ice-videos__card.is-playing .ice-videos__card-body {
    padding-block-start: 10px;
}

/* Fallback block when no YOOtheme heading exists before the module. */
.ice-videos__team-heading-fallback {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin: 0 0 8px;
}

.ice-videos__team-heading-fallback .ice-videos__team-actions {
    gap: 15px;
}

.ice-videos__team-video-title {
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
}

/* When the existing YOOtheme "Aktuellste Videos" heading is reused, JS adds
   this class. It becomes the third banner and sits slightly closer to the
   first video than the headings sit to one another. */
.ice-videos__team-external-title {
    margin-block-start: 0;
    margin-block-end: 8px;
}

.ice-videos__team-actions--external {
    gap: 15px;
    margin-block-end: 15px;
}

.ice-videos__team-video-title[hidden] {
    display: none;
}

.ice-videos__team-actions:empty,
.ice-videos__team-actions[hidden] {
    display: none;
}

@media (max-width: 639px) {
    .ice-videos__team-action,
    .ice-videos__team-video-title,
    .ice-videos__team-external-title {
        min-height: 46px;
        padding: 7px 34px 7px 14px;
        clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 0 100%);
    }

    .ice-videos__team-action--schedule {
        min-height: 46px;
        padding-block: 5px;
        padding-inline-start: 14px;
        padding-inline-end: 30px;
    }

    .ice-videos__team-action {
        gap: 9px;
    }

    .ice-videos__team-action-arrows,
    .ice-videos__team-action-arrows img {
        width: 25px;
    }

    .ice-videos__team-action-calovo {
        height: 14px;
        max-width: 59px;
        margin-block-start: 1px;
    }
}
