/*
 * Claridad compatibility layer.
 *
 * public/css/style.css and public/css/skeleton.css are the visual source of
 * truth and should stay close to the live claridad.io design. This file only
 * contains small glue styles for i18n and modular features.
 */

/* Covers Spanish week text baked into poster images on non-Spanish locales. */
.poster-grid .picture,
.cat-page-section .program.poster-grid ul.benefits > li .picture {
    position: relative;
}

.week-overlay {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    z-index: 2;
    display: block;
    padding: 7px 6px;
    background: #000;
    border-radius: 0 0 18px 18px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    box-sizing: border-box;
}

/* Compact language switcher; does not alter the legacy navbar structure. */
.lang-switcher,
.lang-switcher__options {
    display: inline-flex;
    align-items: center;
}

.lang-switcher {
    gap: 6px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.lang-switcher__label {
    margin: 0;
    color: inherit;
    opacity: .78;
}

.lang-switcher__options {
    gap: 4px;
}

.lang-switcher__option {
    display: inline-flex;
    min-width: 34px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 18px;
    color: inherit;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    opacity: .72;
}

.lang-switcher__option:hover,
.lang-switcher__option:focus,
.lang-switcher__option.is-active {
    opacity: 1;
    text-decoration: none;
}

.lang-switcher__option.is-active {
    background: #4800b9;
    border-color: #4800b9;
    color: #fff;
}

.lang-switcher__select {
    min-width: 128px;
    min-height: 32px;
    padding: 6px 28px 6px 10px;
    border: 1px solid currentColor;
    border-radius: 18px;
    background: #fff;
    color: #262036;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
}

.lang-switcher__select:focus {
    border-color: #4800b9;
    outline: 2px solid rgba(72, 0, 185, .18);
}

.lang-switcher--navbar {
    color: #fff;
}

.lang-switcher--navbar .lang-switcher__option.is-active {
    background: #fff;
    border-color: #fff;
    color: #4800b9;
}

.lang-switcher--navbar .lang-switcher__label {
    color: #fff;
}

.lang-switcher--navbar .lang-switcher__select {
    border-color: rgba(255, 255, 255, .68);
    background: #fff;
    color: #4800b9;
}

.navbar-end > .navbar-item.lang-switcher-item {
    display: flex;
    align-items: center;
}

/* Player-only audio language chooser. Separate from UI/SEO language routing. */
.audio-language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto 22px;
    padding: 10px 14px;
    background: rgba(72, 0, 185, .06);
    border: 1px solid rgba(72, 0, 185, .16);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.audio-language-switcher__label {
    flex: 0 0 auto;
    margin: 0;
    color: #4800b9;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.2;
}

.audio-language-switcher__select-wrap {
    position: relative;
    flex: 1 1 220px;
    max-width: 320px;
}

.audio-language-switcher__select {
    width: 100%;
    min-height: 38px;
    padding: 8px 34px 8px 12px;
    border: 1px solid rgba(72, 0, 185, .25);
    border-radius: 6px;
    background: #fff;
    color: #262036;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
}

.audio-language-switcher__select:focus {
    border-color: #4800b9;
    outline: 2px solid rgba(72, 0, 185, .18);
}

@media (max-width: 768px) {
    .lang-switcher--navbar .lang-switcher__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .audio-language-switcher {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 18px;
    }

    .audio-language-switcher__label {
        text-align: center;
    }

    .audio-language-switcher__select-wrap {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
    }

    .audio-language-switcher__select {
        margin-bottom: 0;
    }
}

/* Legacy CTA buttons use a translateY offset for hero placement. Inside normal
   content pages that offset can crowd paragraph text on mobile. */
.about-us-section .content .knappreg,
.subscription-benefits-section .knappreg {
    display: block;
    box-sizing: border-box;
    width: min(300px, calc(100% - 32px));
    max-width: 100%;
    margin: 24px auto;
    transform: none;
}

/* Shared Facebook button used by auth/register templates. */
.fb-login-btn {
    display: inline-block;
    min-width: 14rem;
    padding: 10px 24px;
    background: #1877f2;
    border-radius: 6px;
    color: #fff !important;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.fb-login-btn:hover,
.fb-login-btn:focus {
    background: #166fe5;
    color: #fff !important;
    text-decoration: none;
}
