/* YT Native Player — Frontend Player */

.ytnp-player-wrap {
    position: relative;
    width: 100%;
    background: #000;
    margin-bottom: 16px;
    border-radius: 4px;
    overflow: hidden;
}

/* Thumbnail / poster */
.ytnp-poster {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    background-size: cover;
    background-position: center;
    background-color: #111;
    cursor: pointer;
}

/* Dark overlay on hover */
.ytnp-poster::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.2s;
}

.ytnp-poster:hover::before {
    background: rgba(0, 0, 0, 0.35);
}

/* Play button */
.ytnp-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    border: 3px solid rgba(255, 255, 255, 0.9);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    z-index: 2;
    padding: 0;
    padding-left: 4px; /* optical centering for ▶ */
}

.ytnp-play-btn:hover {
    background: rgba(200, 0, 0, 0.88);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.08);
}

.ytnp-play-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* Loading state */
.ytnp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 56px 20px;
    background: #111;
    color: #ccc;
    font-size: 1em;
    font-family: sans-serif;
}

/* Error state */
.ytnp-error {
    padding: 20px;
    background: #2a1a1a;
    color: #f87171;
    text-align: center;
    font-family: sans-serif;
    font-size: .95em;
}

/* Video element */
.ytnp-video {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
}

/* Spinner animation */
.ytnp-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ytnp-spin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes ytnp-spin {
    to { transform: rotate(360deg); }
}

/* Responsive — smaller play button on mobile */
@media (max-width: 480px) {
    .ytnp-play-btn {
        width: 54px;
        height: 54px;
        font-size: 20px;
    }
}
