/*
 * ACL YouTube Shorts — Carousel Styles
 * Matches the landing page design
 */

/* =============================================
   SECTION WRAPPER
   ============================================= */

.acl-shorts-section {
    width: 100%;
}

/* Section header — reuses ytc-latest-header pattern */
.acl-shorts-header h2 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.acl-shorts-header h2 svg {
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

/* =============================================
   CAROUSEL OUTER WRAPPER
   ============================================= */

.acl-shorts-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

/* =============================================
   NAV BUTTONS
   ============================================= */

.acl-shorts-nav {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    z-index: 2;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.acl-shorts-nav:hover {
    background: #f5f5f5;
    border-color: #c8a04a;
    color: #c8a04a;
}

.acl-shorts-nav:disabled,
.acl-shorts-nav[aria-disabled="true"] {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.acl-shorts-prev { margin-right: 8px; }
.acl-shorts-next { margin-left:  8px; }

/* =============================================
   SCROLLABLE TRACK
   ============================================= */

.acl-shorts-track-wrap {
    flex: 1;
    overflow: hidden;           /* JS controls scroll — hides overflow */
}

.acl-shorts-track {
    display: flex;
    gap: 10px;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Centre tiles on ultra-wide screens where they no longer overflow */
@media only screen and (min-width: 1441px) {
    .acl-shorts-track {
        justify-content: safe center;
    }
}

/* =============================================
   INDIVIDUAL SHORT ITEM
   ============================================= */

.acl-short-item {
    flex: 0 0 auto;
    width: 148px;
}

.acl-short-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* =============================================
   THUMBNAIL — cropped 9:16 from 16:9 source
   ============================================= */

.acl-short-thumb {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a1a;
}

.acl-short-thumb img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Scale up the 16:9 image to fill the 9:16 container vertically */
    width: auto;
    height: 100%;
    min-width: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    display: block;
}

.acl-short-link:hover .acl-short-thumb img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Play button — hidden by default, shown on hover */
.acl-short-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.acl-short-link:hover .acl-short-play-btn {
    opacity: 1;
}

/* Shorts badge — bottom left corner */
.acl-shorts-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px 3px 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.acl-shorts-badge svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* =============================================
   TITLE BELOW THUMBNAIL
   ============================================= */

.acl-short-title {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.acl-short-link:hover .acl-short-title {
    color: #c8a04a;
}

/* =============================================
   ERROR STATE
   ============================================= */

.acl-shorts-error {
    color: #cc0000;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media only screen and (max-width: 768px) {
    .acl-short-item {
        width: 130px;
    }

    .acl-shorts-nav {
        width: 28px;
        height: 28px;
    }
}

@media only screen and (max-width: 480px) {
    .acl-short-item {
        width: 115px;
    }

    .acl-shorts-nav {
        display: none; /* allow natural touch-scroll on small screens */
    }

    .acl-shorts-track-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .acl-shorts-track-wrap::-webkit-scrollbar {
        display: none;
    }
}
