/**
 * Bilingual Posts - Language Switcher Styles
 *
 * Styling for the post language switcher component.
 *
 * @package MaloneyjaProfessional
 * @since 1.0.0
 */

/* ==========================================================================
   Post Language Switcher
   ========================================================================== */

.post-language-switcher {
    margin-bottom: 2rem;
}

.post-language-switcher .lang-toggle-wrapper {
    display: flex;
    justify-content: center;
}

.post-language-switcher .lang-toggle {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.post-language-switcher .lang-toggle a {
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2d3748;
    background: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-language-switcher .lang-toggle a + a {
    border-left: 1px solid #e2e8f0;
}

.post-language-switcher .lang-toggle a.is-active {
    background: var(--primary-color, #1e3a5f);
    color: #fff;
}

.post-language-switcher .lang-toggle a:hover:not(.is-active) {
    background: #f7fafc;
}

.post-language-switcher .lang-toggle a:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(30, 58, 95, 0.3);
}

/* ==========================================================================
   Hero Language Switcher (for single post hero area)
   ========================================================================== */

.hero-language-switcher {
    margin-top: 1.5rem;
}

.hero-language-switcher .lang-toggle-wrapper {
    display: flex;
    justify-content: center;
}

.hero-language-switcher .lang-toggle {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-language-switcher .lang-toggle a {
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hero-language-switcher .lang-toggle a + a {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-language-switcher .lang-toggle a.is-active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color, #1e3a5f);
}

.hero-language-switcher .lang-toggle a:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.hero-language-switcher .lang-toggle a:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Blog Language Filter (for blog archive content area)
   ========================================================================== */

.blog-language-filter {
    margin-bottom: 2rem;
}

.blog-language-filter .lang-toggle-wrapper {
    display: flex;
    justify-content: center;
}

.blog-language-filter .lang-toggle {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.blog-language-filter .lang-toggle a {
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    color: #2d3748;
    background: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-language-filter .lang-toggle a + a {
    border-left: 1px solid #e2e8f0;
}

.blog-language-filter .lang-toggle a:hover:not(.is-active) {
    background: #f7fafc;
}

.blog-language-filter .lang-toggle a.is-active {
    background: var(--primary-color, #1e3a5f);
    color: #fff;
}

.blog-language-filter .lang-toggle a:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(30, 58, 95, 0.3);
}

/* ==========================================================================
   Language Badge (for post cards in archive)
   ========================================================================== */

.post-language-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 3px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.post-language-badge.lang-en {
    background: #e8f4fd;
    color: var(--primary-color, #1e3a5f);
}

.post-language-badge.lang-es {
    background: #fef3e8;
    color: #c05621;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .post-language-switcher {
        margin: 1rem 0;
    }

    .post-language-switcher .lang-toggle a {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .hero-language-switcher {
        margin-top: 1rem;
    }

    .hero-language-switcher .lang-toggle a {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .blog-language-filter {
        margin-bottom: 1.5rem;
    }

    .blog-language-filter .lang-toggle a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .post-language-badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.4rem;
    }
}
