/* The Studio page (btg-studio.php), on the rentals pages' styles. */

.btg-studio .btg-rentals__head,
.btg-studio .btg-rentals__intro {
    max-width: none;
}

.btg-studio__section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--btg-rentals-line);
}

.btg-studio__heading {
    margin: 0 0 1rem;
    font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.btg-studio__events {
    margin: 0;
    padding: 0;
    list-style: none;
}

.btg-studio__event {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--btg-rentals-line);
}

.btg-studio__event time {
    display: grid;
    place-items: center;
    flex: none;
    width: 4rem;
    height: 4rem;
    border-radius: 8px;
    background: #0f0f0f;
    color: #fff;
    line-height: 1;
}

.btg-studio__day {
    font-size: 1.4rem;
    font-weight: 600;
}

.btg-studio__month {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.btg-studio__event div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.btg-studio__title {
    font-size: 1.1rem;
    font-weight: 500;
}

.btg-studio__empty {
    margin: 0;
    color: var(--btg-rentals-muted);
}

.btg-studio__empty a,
.btg-studio__hire p a {
    color: #0f0f0f;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.btg-studio__hire {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-top: 2.5rem;
    padding: 1.5rem 1.75rem;
    border-radius: 10px;
    background: var(--btg-rentals-tile);
}

.btg-studio__hire .btg-studio__heading {
    margin-bottom: 0.3rem;
}

.btg-studio__hire p {
    max-width: 60ch;
    margin: 0;
    color: var(--btg-rentals-muted);
}

.btg-studio__button {
    padding: 0.8rem 1.3rem;
    border-radius: 6px;
    background: #0f0f0f;
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.btg-studio__button:hover {
    background: #333;
    color: #fff;
}

.btg-studio__past {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.btg-studio__past li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--btg-rentals-line);
}

.btg-studio__past-date {
    color: var(--btg-rentals-muted);
    font-size: 0.8rem;
}

.btg-studio__past-title {
    font-weight: 500;
}

/* Posters: float beside the row on hover or focus; a link on touch */
.btg-studio__event.has-poster {
    position: relative;
}

.btg-studio__poster {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 5;
    width: 260px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-46%) rotate(2deg);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

.btg-studio__event.has-poster:hover .btg-studio__poster,
.btg-studio__event.has-poster:focus-within .btg-studio__poster {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) rotate(2deg);
}

.btg-studio__poster-link {
    color: var(--btg-rentals-muted);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

@media (hover: none) {
    .btg-studio__poster {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btg-studio__poster {
        transition: none;
    }
}

@media (max-width: 900px) {
    .btg-studio__past {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .btg-studio__past {
        grid-template-columns: 1fr;
    }
}

/* Poster lightbox */
.btg-lightbox {
    max-width: min(92vw, 640px);
    max-height: 92vh;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

.btg-lightbox::backdrop {
    background: rgba(15, 15, 15, 0.85);
}

.btg-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.btg-lightbox .btg-lightbox__close,
.btg-lightbox .btg-lightbox__close:hover,
.btg-lightbox .btg-lightbox__close:focus {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #0f0f0f;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
