.pilotwp-tv-programs {
    --pilotwp-tv-purple: #7159ff;

    background: none;
    color: inherit;
    font-family: var(--cs-font-base-family, inherit), sans-serif;
    left: 50%;
    margin-block: 0 !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
    position: relative;
    width: 100vw !important;
}

/* Hide empty shells (no cards) so they don't leave a blank gap */
.pilotwp-tv-programs:not(:has(.pilotwp-tv-programs__card)) {
    display: none;
}

.pilotwp-tv-programs :where(h2, h3) {
    font-family: var(--cs-font-headings-family, var(--cs-font-base-family, inherit)),
        sans-serif;
}

.pilotwp-tv-programs *,
.pilotwp-tv-programs *::before,
.pilotwp-tv-programs *::after {
    box-sizing: border-box;
}

.pilotwp-tv-programs :where(a, h2, h3, p, span, img) {
    border: 0;
    float: none;
    margin: 0;
    margin-block-start: 0;
    margin-block-end: 0;
    max-width: none;
    text-decoration: none;
}

.pilotwp-tv-programs :where(*) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.pilotwp-tv-programs :where(img) {
    height: auto;
    min-width: 0;
    vertical-align: middle;
}

.pilotwp-tv-programs__container {
    margin-inline: auto;
    max-width: var(--cs-mobile-container, 576px);
    padding-left: 24px;
    padding-right: 24px;
    width: 100%;
}

@media (min-width: 768px) {
    .pilotwp-tv-programs__container {
        max-width: var(--cs-tablet-container, 992px);
    }
}

@media (min-width: 992px) {
    .pilotwp-tv-programs__container {
        max-width: var(--cs-laptop-container, 1200px);
    }
}

@media (min-width: 1200px) {
    .pilotwp-tv-programs__container {
        max-width: var(--cs-desktop-container, 1648px);
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .pilotwp-tv-programs__container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1200px) and (max-width: 1659.98px) {
    .pilotwp-tv-programs__container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.pilotwp-tv-programs .pilotwp-tv-programs__title {
    color: inherit !important;
    font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.75rem) !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin: 0 0 40px;
}

.pilotwp-tv-programs.is-cols-3 .pilotwp-tv-programs__container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pilotwp-tv-programs.is-cols-3 .pilotwp-tv-programs__title {
    font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.75rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

.pilotwp-tv-programs__grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px !important;
    align-items: start;
}

.pilotwp-tv-programs__card {
    display: block !important;
    min-width: 0;
}

.pilotwp-tv-programs__card.is-editor-preview {
    border-radius: 16px;
    cursor: pointer;
    outline: 2px solid transparent;
    outline-offset: 6px;
    transition:
        outline-color 120ms ease,
        transform 120ms ease;
}

.pilotwp-tv-programs__card.is-editor-preview:hover,
.pilotwp-tv-programs__card.is-editor-preview:focus-visible {
    outline-color: rgba(113, 89, 255, 0.45);
}

.pilotwp-tv-programs__card.is-editor-active {
    outline-color: #7159ff;
}

.pilotwp-tv-programs__card.is-large {
    grid-column: span 3 !important;
}

.pilotwp-tv-programs__card.is-small {
    grid-column: span 2 !important;
}

.pilotwp-tv-programs.is-cols-3 .pilotwp-tv-programs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pilotwp-tv-programs.is-cols-3 .pilotwp-tv-programs__card.is-equal {
    grid-column: span 1 !important;
}

.pilotwp-tv-programs .pilotwp-tv-programs__card-link {
    color: inherit !important;
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    text-decoration: none !important;
}

a.pilotwp-tv-programs__card-link:hover .pilotwp-tv-programs__image,
a.pilotwp-tv-programs__card-link:focus-visible .pilotwp-tv-programs__image {
    transform: scale(1.03);
}

a.pilotwp-tv-programs__card-link:hover .pilotwp-tv-programs__action,
a.pilotwp-tv-programs__card-link:focus-visible .pilotwp-tv-programs__action {
    opacity: 1;
    transform: translateX(0);
}

a.pilotwp-tv-programs__card-link:focus-visible {
    border-radius: 12px;
    outline: 2px solid var(--pilotwp-tv-purple);
    outline-offset: 4px;
}

.pilotwp-tv-programs__image-wrap {
    aspect-ratio: 16 / 9;
    display: block !important;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    width: 100% !important;
}

.pilotwp-tv-programs__image-wrap::after {
    background: linear-gradient(
        to bottom,
        rgba(41, 41, 56, 0) 50%,
        rgba(41, 41, 56, 0.9) 100%
    );
    border-radius: inherit;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.pilotwp-tv-programs .pilotwp-tv-programs__image,
.pilotwp-tv-programs .pilotwp-tv-programs__placeholder {
    display: block !important;
    height: 100% !important;
    width: 100% !important;
}

.pilotwp-tv-programs .pilotwp-tv-programs__image {
    object-fit: cover !important;
    transition: transform 180ms ease;
}

.pilotwp-tv-programs__placeholder {
    background:
        radial-gradient(
            circle at 24% 18%,
            rgba(113, 89, 255, 0.38),
            transparent 34%
        ),
        radial-gradient(
            circle at 82% 72%,
            rgba(183, 0, 38, 0.32),
            transparent 38%
        ),
        linear-gradient(135deg, #201b36, #0f0c1e);
}

.pilotwp-tv-programs__schedule {
    background: rgba(23, 19, 40, 0.82);
    border-radius: 10px;
    bottom: 8px;
    color: #ffffff;
    display: inline-grid;
    font-size: 0.875rem;
    font-weight: 400;
    grid-template-columns: 42px max-content;
    line-height: 1.25;
    position: absolute;
    left: 8px;
    max-width: none;
    overflow: visible;
    width: max-content;
    z-index: 1;
}

.pilotwp-tv-programs__schedule-icon {
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    justify-content: center;
    position: relative;
}

.pilotwp-tv-programs__schedule-icon::before {
    background: #ffffff;
    content: "";
    height: 18px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M9.00005 1.79999C12.9769 1.79999 16.2 5.02311 16.2 8.99999C16.2 12.9769 12.9769 16.2 9.00005 16.2C5.02317 16.2 1.80005 12.9769 1.80005 8.99999C1.80005 5.02311 5.02317 1.79999 9.00005 1.79999ZM8.32505 5.17499V8.99999C8.32505 9.22499 8.43755 9.43593 8.62599 9.56249L11.326 11.3625C11.6354 11.5706 12.0544 11.4862 12.2625 11.174C12.4707 10.8619 12.3863 10.4456 12.0741 10.2375L9.67505 8.63999V5.17499C9.67505 4.80093 9.37411 4.49999 9.00005 4.49999C8.62599 4.49999 8.32505 4.80093 8.32505 5.17499Z' fill='white'/%3E%3C/svg%3E")
        center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M9.00005 1.79999C12.9769 1.79999 16.2 5.02311 16.2 8.99999C16.2 12.9769 12.9769 16.2 9.00005 16.2C5.02317 16.2 1.80005 12.9769 1.80005 8.99999C1.80005 5.02311 5.02317 1.79999 9.00005 1.79999ZM8.32505 5.17499V8.99999C8.32505 9.22499 8.43755 9.43593 8.62599 9.56249L11.326 11.3625C11.6354 11.5706 12.0544 11.4862 12.2625 11.174C12.4707 10.8619 12.3863 10.4456 12.0741 10.2375L9.67505 8.63999V5.17499C9.67505 4.80093 9.37411 4.49999 9.00005 4.49999C8.62599 4.49999 8.32505 4.80093 8.32505 5.17499Z' fill='white'/%3E%3C/svg%3E")
        center / contain no-repeat;
    width: 18px;
}

.pilotwp-tv-programs__schedule-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 12px;
    width: max-content;
}

.pilotwp-tv-programs__schedule-text span {
    display: block;
    width: max-content;
    white-space: nowrap;
}

.pilotwp-tv-programs__details {
    align-items: center;
    display: flex !important;
    gap: 8px !important;
    min-height: 48px !important;
    overflow: hidden;
    padding: 0 8px !important;
    position: relative;
    width: 100% !important;
}

.pilotwp-tv-programs .pilotwp-tv-programs__station-logo {
    display: block !important;
    flex: 0 0 48px !important;
    flex-basis: 48px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    height: 48px !important;
    max-height: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    min-width: 48px !important;
    object-fit: contain !important;
    width: 48px !important;
}

.pilotwp-tv-programs .pilotwp-tv-programs__heading {
    color: inherit !important;
    display: flex !important;
    flex-direction: column;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    min-width: 0;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
}

.pilotwp-tv-programs .pilotwp-tv-programs__program-title {
    font-weight: 700 !important;
}

.pilotwp-tv-programs .pilotwp-tv-programs__program-description {
    font-weight: 400 !important;
}

.pilotwp-tv-programs__action {
    align-items: center;
    background: #7159ff;
    border-radius: 999px;
    display: flex;
    flex: 0 0 40px;
    height: 40px;
    justify-content: center;
    margin-left: auto;
    opacity: 0;
    transform: translateX(8px);
    transition:
        opacity 160ms ease,
        transform 160ms ease;
    width: 40px;
}

.pilotwp-tv-programs__action::before {
    background: #ffffff;
    content: "";
    height: 20px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M19.6367 11.2485C20.1212 10.764 20.1211 9.98109 19.6365 9.49648L13.5035 3.36353C13.0189 2.87891 12.236 2.87881 11.7515 3.3633C11.267 3.84778 11.2671 4.63073 11.7517 5.11534L15.7682 9.13188L1.23996 9.13273C0.555565 9.13264 -8.91104e-05 9.68829 1.07191e-08 10.3727C8.9158e-05 11.0571 0.555888 11.6129 1.24028 11.613L15.7686 11.6121L11.7531 15.6276C11.2686 16.1121 11.2687 16.895 11.7533 17.3797C12.2379 17.8643 13.0209 17.8644 13.5053 17.3799L19.6367 11.2485Z' fill='white'/%3E%3C/svg%3E")
        center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M19.6367 11.2485C20.1212 10.764 20.1211 9.98109 19.6365 9.49648L13.5035 3.36353C13.0189 2.87891 12.236 2.87881 11.7515 3.3633C11.267 3.84778 11.2671 4.63073 11.7517 5.11534L15.7682 9.13188L1.23996 9.13273C0.555565 9.13264 -8.91104e-05 9.68829 1.07191e-08 10.3727C8.9158e-05 11.0571 0.555888 11.6129 1.24028 11.613L15.7686 11.6121L11.7531 15.6276C11.2686 16.1121 11.2687 16.895 11.7533 17.3797C12.2379 17.8643 13.0209 17.8644 13.5053 17.3799L19.6367 11.2485Z' fill='white'/%3E%3C/svg%3E")
        center / contain no-repeat;
    width: 20px;
}

.pilotwp-tv-programs-editor-media,
.pilotwp-tv-programs-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.pilotwp-tv-programs-editor-summary {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.pilotwp-tv-programs-editor-summary span {
    color: #757575;
    font-size: 12px;
}

.pilotwp-tv-programs-editor-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pilotwp-tv-programs-editor-list-item.components-button {
    align-items: center;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px #dcdcde;
    display: flex;
    gap: 10px;
    height: auto;
    justify-content: flex-start;
    padding: 8px;
    text-align: left;
    transition:
        background-color 120ms ease,
        box-shadow 120ms ease;
    width: 100%;
}

.pilotwp-tv-programs-editor-list-item.components-button:hover,
.pilotwp-tv-programs-editor-list-item.components-button.is-active {
    background: #f0f0f1;
    box-shadow: inset 0 0 0 1px #7159ff;
}

.pilotwp-tv-programs-editor-list-item img {
    flex: 0 0 32px;
    height: 32px;
    object-fit: contain;
    width: 32px;
}

.pilotwp-tv-programs-editor-list-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pilotwp-tv-programs-editor-list-copy strong,
.pilotwp-tv-programs-editor-list-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pilotwp-tv-programs-editor-list-copy strong {
    color: #1e1e1e;
    font-size: 13px;
    font-weight: 600;
}

.pilotwp-tv-programs-editor-list-copy small {
    color: #757575;
    font-size: 11px;
}

.pilotwp-tv-programs-editor-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pilotwp-tv-programs-editor-toolbar {
    margin-bottom: 4px;
    margin-top: 0;
}

.pilotwp-tv-programs-editor-danger {
    border-top: 1px solid #dcdcde;
    margin-top: 4px;
    padding-top: 12px;
}

.pilotwp-tv-programs-editor-item .components-base-control.has-error input {
    border-color: #cc1818;
    box-shadow: 0 0 0 1px #cc1818;
}

.pilotwp-tv-programs-editor-item .components-base-control.has-error .components-base-control__help {
    color: #cc1818;
}

.pilotwp-tv-programs-editor-item .components-base-control.is-valid .components-base-control__help {
    color: #008a20;
}

.pilotwp-tv-programs-editor-empty {
    background: #f6f7f7;
    border-radius: 8px;
    padding: 12px;
}

.pilotwp-tv-programs-editor-empty p {
    color: #50575e;
    font-size: 13px;
    margin: 0 0 10px;
}

.pilotwp-tv-programs-editor-media img {
    border-radius: 4px;
    display: block;
    height: auto;
    width: 100%;
}

@media (max-width: 900px) {
    .pilotwp-tv-programs__grid,
    .pilotwp-tv-programs.is-cols-3 .pilotwp-tv-programs__grid {
        grid-template-columns: 1fr;
    }

    .pilotwp-tv-programs__card.is-large,
    .pilotwp-tv-programs__card.is-small,
    .pilotwp-tv-programs.is-cols-3 .pilotwp-tv-programs__card.is-equal {
        grid-column: span 1 !important;
    }
}

@media (max-width: 640px) {
    .pilotwp-tv-programs:not(.is-cols-3) .pilotwp-tv-programs__title {
        margin-bottom: 24px;
    }

    .pilotwp-tv-programs__grid {
        gap: 20px;
    }
}
