/* ── Vimeo Minimal Player ──
   Shared styles for custom play/pause/fullscreen controls + subtitle overlay.
   Used by vimeo-minimal.js — initVimeoMinimal(container)
*/

/* Stage: wraps the iframe, sized to the video box by the host page.
   All overlays/controls position against this so they hug the video. */
.vimeo-min-stage {
    position: relative;
}

/* Play button overlay */
.vimeo-min-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

.vimeo-min-play::after {
    content: '';
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a1814'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 45%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.vimeo-min-play:hover::after {
    transform: scale(1.08);
    opacity: 0.9;
}

/* Controls bar (bottom-right of the video, visible on hover) */
.vimeo-min-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

*:hover > .vimeo-min-controls {
    opacity: 1;
}

.vimeo-min-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.45);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease;
}

.vimeo-min-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Text button (CC subtitle size toggle) */
.vimeo-min-btn-text {
    background-image: none !important;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 32px;
    text-align: center;
}

.vimeo-min-btn-text.is-active {
    background-color: rgba(255, 255, 255, 0.25);
}

/* CC group: toggle button + S/M/L panel that slides out */
.vimeo-min-cc {
    display: flex;
    align-items: center;
}

.vimeo-min-cc-sizes {
    display: flex;
    gap: 6px;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transform: translateX(10px);
    transition: max-width 0.35s ease, opacity 0.25s ease,
                transform 0.35s ease, margin-right 0.35s ease;
}

.vimeo-min-cc.is-open .vimeo-min-cc-sizes {
    max-width: 160px;
    opacity: 1;
    transform: translateX(0);
    margin-right: 6px;
}

/* Fullscreen: keep controls visible */
*:fullscreen > .vimeo-min-controls {
    opacity: 1;
    pointer-events: auto;
    bottom: 20px;
    right: 20px;
}

*:fullscreen {
    background: #000;
}

*:fullscreen iframe {
    width: 100%;
    height: 100%;
}

/* ── Custom Subtitle Overlay ── */
.vimeo-min-subtitle {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 96%;
    box-sizing: border-box;
    text-align: center;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans', sans-serif;
    line-height: 1.6;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 4px;
    pointer-events: none;
    display: none;
    white-space: pre-line;
}

/* Size variants */
.vimeo-min-subtitle[data-size="small"] {
    font-size: 12px;
    padding: 3px 8px;
}

.vimeo-min-subtitle[data-size="medium"] {
    font-size: 16px;
    padding: 4px 12px;
}

.vimeo-min-subtitle[data-size="large"] {
    font-size: 22px;
    padding: 6px 16px;
}

/* Fullscreen: scale subtitles up */
*:fullscreen .vimeo-min-subtitle[data-size="small"] {
    font-size: 16px;
}

*:fullscreen .vimeo-min-subtitle[data-size="medium"] {
    font-size: 22px;
}

*:fullscreen .vimeo-min-subtitle[data-size="large"] {
    font-size: 30px;
}

@media (max-width: 991px) {
    .vimeo-min-subtitle[data-size="small"] {
        font-size: 10px;
    }
    .vimeo-min-subtitle[data-size="medium"] {
        font-size: 13px;
    }
    .vimeo-min-subtitle[data-size="large"] {
        font-size: 18px;
    }
}
