/* Privacy Layer Styles for VidPly Extension */

.vidply-privacy-layer {
    align-items: center;
    background-color: #343a40;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    width: 100%;
}

/* Playlist-specific privacy overlay */
.vidply-playlist-privacy-overlay {
    height: 0;
    overflow: visible;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    pointer-events: auto;
    position: relative;
    width: 100%;
    z-index: 9999;
}

/* When switching from audio to external renderers (YouTube/Vimeo/SoundCloud),
   VidPly may re-apply inline `display: block` on `.vidply-track-artwork`.
   This flag must always win to avoid double posters behind the consent layer. */
.vidply-track-artwork[data-vidply-artwork-forced-hidden="true"] {
    display: none !important;
}

.vidply-privacy-inner-container {
    align-items: center;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.vidply-privacy-layer.vidply-privacy-youtube,
.vidply-privacy-layer.vidply-privacy-vimeo,
.vidply-privacy-layer.vidply-privacy-soundcloud {
    /* Background image can be set inline via style attribute for poster */
}

.vidply-privacy-button {
    background: transparent;
    border: none;
    cursor: pointer;
    left: 50%;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: none;
    z-index: 10;
}

@media (width <= 48rem), (width < 48rem) {
    .vidply-privacy-button {
        transform: translate(-50%,-50%) scale(.65);
    }
}

.vidply-privacy-button:hover {
    transform: translate(-50%, -50%);
}

.vidply-privacy-button:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 4px;
}

.vidply-privacy-button--pos-left-top {
    left: 1rem;
    top: 1rem;
    transform: none !important;
}

.vidply-privacy-button--pos-right-top {
    left: auto;
    right: 1rem;
    top: 1rem;
    transform: none !important;
}

.vidply-privacy-button--pos-left-bottom {
    bottom: 1rem;
    left: 1rem;
    top: auto;
    transform: none !important;
}

.vidply-privacy-button--pos-right-bottom {
    bottom: 1rem;
    left: auto;
    right: 1rem;
    top: auto;
    transform: none !important;
}

/* Inline SVGs in the privacy button should be sized and not absolutely positioned */
.vidply-privacy-button svg {
    bottom: auto;
    display: block;
    filter: none;
    height: 80px;
    left: auto;
    position: static;
    right: auto;
    top: auto;
    transform: none;
    transition: transform 0.3s ease;
    width: 80px;
}

.vidply-play-overlay-image {
    display: block;
    height: 80px;
    transition: transform 0.3s ease;
    width: 80px;
}

.vidply-privacy-button:hover svg,
.vidply-privacy-button:hover .vidply-play-overlay-image {
    transform: scale(1.05);
}

.vidply-play-overlay-bg {
    fill: rgb(255 255 255 / 95%);
}

.vidply-play-overlay-icon {
    fill: #0a406e;
}

.vidply-privacy-text {
    background: rgb(0 0 0 / 80%);
    bottom: 0;
    color: #fff;
    left: 0;
    padding: 0.5rem;
    position: absolute;
    right: 0;
    text-align: center;
    z-index: 9;
}

@media (width >= 768px) {
    .vidply-privacy-text {
        padding: 1rem;
    }
}

@media (width < 768px) {
    .vidply-privacy-text a .icon::before {
        height: 0.75rem;
        mask-size: 0.75rem;
        top: 0.0625rem;
    }
}

.vidply-privacy-headline {
    display: block;
    font-size: 0.75rem;
    font-weight: bold;
    margin: 0 0 0.25rem;
    text-align: center;
}

.vidply-privacy-text p {
    font-size: 0.75rem;
    margin: 0;
}

@media (width >= 768px) {
    .vidply-privacy-headline {
        font-size: 1rem;
    }

    .vidply-privacy-text p {
        font-size: 0.85rem;
    }
}

.vidply-privacy-text a,
.vidply-privacy-link {
    color: #fff;
    text-decoration: underline;
}

.vidply-privacy-link::before {
    background-color: currentColor;
    content: "";
    display: inline-block;
    height: 1em;
    margin-right: 0.3em;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath d='M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8m15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.854 10.803a.5.5 0 1 1-.708-.707L9.243 6H6.475a.5.5 0 1 1 0-1h3.975a.5.5 0 0 1 .5.5v3.975a.5.5 0 1 1-1 0V6.707z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-size: contain;
    vertical-align: -0.125em;
    width: 1em;
}

.vidply-privacy-text a:hover,
.vidply-privacy-link:hover {
    text-decoration: none;
}

.vidply-sr-only {
    clip: rect(0, 0, 0, 0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* WCAG 2.3.3: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .vidply-privacy-button svg,
    .vidply-play-overlay-image {
        transition: none;
    }
}
