/**
 * Scompler Consent Manager — YouTube Placeholder Styles
 *
 * Uses padding-bottom hack for aspect-ratio (cross-browser, including
 * Safari < 15 and older browsers). The padding-bottom value is set
 * inline by PHP per placeholder based on the original iframe dimensions.
 *
 * Color overrides via CSS custom properties:
 *   --scompler-yt-bg   (default #1a1a2e)
 *   --scompler-yt-btn  (default #8989f1)
 */

/* Outer wrapper — padding-bottom set inline by PHP for correct aspect ratio. */
.scompler-yt-placeholder {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    /* Fallback for browsers without CSS variable support. */
    background: #1a1a2e;
    background: var(--scompler-yt-bg, #1a1a2e);
}

/* After consent: iframe is loaded, reset restrictive styles. */
.scompler-yt-placeholder--granted {
    overflow: visible;
    background: none;
    border-radius: 0;
}

/* Inner — absolutely fills the padding-bottom container. */
.scompler-yt-placeholder__inner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 30px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Lock icon — top-right corner. */
.scompler-yt-placeholder__lock {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0.5;
    color: #fff;
}

/* YouTube logo. */
.scompler-yt-placeholder__logo {
    margin-bottom: 16px;
    opacity: 0.7;
}

/* Consent text. */
.scompler-yt-placeholder__text {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 480px;
    opacity: 0.9;
}

/* Button container — uses margin instead of gap for older browser support. */
.scompler-yt-placeholder__actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

/* Base button. */
.scompler-yt-placeholder__btn {
    display: inline-block;
    margin: 0 6px 8px;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    -webkit-transition: opacity 0.2s ease;
    transition: opacity 0.2s ease;
}

.scompler-yt-placeholder__btn:hover {
    opacity: 0.85;
}

.scompler-yt-placeholder__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Primary CTA — "Load video". */
.scompler-yt-placeholder__btn--load {
    /* Fallback for browsers without CSS variable support. */
    background: #8989f1;
    background: var(--scompler-yt-btn, #8989f1);
    color: #fff;
    border: none;
    font-weight: 600;
}

/* Secondary CTA — "Cookie settings". */
.scompler-yt-placeholder__btn--settings {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Responsive: smaller text/padding on narrow viewports. */
@media (max-width: 480px) {
    .scompler-yt-placeholder__inner {
        padding: 16px;
    }

    .scompler-yt-placeholder__text {
        font-size: 12px;
    }

    .scompler-yt-placeholder__btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .scompler-yt-placeholder__logo svg {
        width: 48px;
        height: auto;
    }
}
