/* Circus Reels – Raster im Look des Footer-Instagram-Feeds (fox-child-theme) */

.circus-reels {
    position: relative;
    padding-bottom: 10px;
}

.circus-reels-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
}

.circus-reels-item {
    min-width: 0;
}

.circus-reels-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #222222;
    text-decoration: none;
}

.circus-reels-link:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

.circus-reels-link img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.circus-reels-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #ffffff;
    font-size: 13px;
    text-align: center;
    word-break: break-word;
}

.circus-reels-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 20px;
    height: 23px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8));
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.circus-reels-btn {
    display: block;
    margin-top: 10px;
    text-align: center;
}

.circus-reels-btn a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: #ffffff;
    border: 1px solid #111111;
    color: #111111;
    font-family: Oswald, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    text-transform: uppercase;
}

.circus-reels-btn a:hover,
.circus-reels-btn a:focus {
    color: #111111;
    box-shadow: inset 0 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Desktop: wie #footer-instagram #sb_instagram im Child-Theme */
@media only screen and (min-width: 841px) {
    .circus-reels-outer .fox-instagram-heading {
        display: flex;
        align-items: center;
        gap: 18px;
        margin-bottom: 0;
        text-align: left;
    }

    .circus-reels-outer .fox-instagram-heading::after {
        content: "";
        flex: 1 1 auto;
        border-top: 1px solid #777777;
    }

    .circus-reels-outer .fox-instagram-heading-h {
        margin: 0;
        text-transform: none;
        white-space: nowrap;
    }

    .circus-reels {
        padding-bottom: 24px;
        border-bottom: 1px solid #777777;
    }

    .circus-reels-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    /* Button mittig über einer Reihe; bei mehreren Reihen (Archivseite) darunter */
    .circus-reels:not(.circus-reels-many) .circus-reels-btn {
        position: absolute;
        z-index: 20;
        top: calc(50% - 12px);
        left: 50%;
        margin: 0;
        transform: translate(-50%, -50%);
    }

    .circus-reels:not(.circus-reels-many) .circus-reels-btn a {
        border: 0;
    }

    .circus-reels-many .circus-reels-btn {
        margin-top: 24px;
    }
}

/* Lightbox */

.circus-reels-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
}

.circus-reels-lightbox[hidden] {
    display: none;
}

.circus-reels-dialog {
    position: relative;
    width: min(400px, 100%);
    background: #ffffff;
}

.circus-reels-dialog iframe {
    display: block;
    width: 100%;
    height: min(720px, calc(100vh - 120px));
    border: 0;
    background: #ffffff;
}

.circus-reels-caption {
    padding: 8px 12px;
    font-size: 13px;
    color: #111111;
}

.circus-reels-close {
    position: absolute;
    top: -40px;
    right: -6px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.circus-reels-consent {
    padding: 28px 24px;
    font-size: 14px;
    line-height: 1.5;
    color: #111111;
    text-align: center;
}

.circus-reels-consent p {
    margin: 0 0 18px;
}

.circus-reels-consent button,
.circus-reels-consent a {
    display: inline-block;
    margin: 4px;
    padding: 10px 22px;
    border: 1px solid #111111;
    background: #111111;
    color: #ffffff;
    font-family: Oswald, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.circus-reels-consent a {
    background: #ffffff;
    color: #111111;
}
