/**
 * Easy Language ("Vieglā valoda") feature styles.
 * Brand palette pulled from styles.css: #66aeba (primary), #477f87 (hover).
 */

/* --- Trigger button shown on regular post views --- */
.easy-language-trigger-wrapper {
    display: flex;
    justify-content: flex-end;
    margin: 0.5rem 0 1.5rem;
}

.easy-language-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 8px 18px 8px 10px;
    border-radius: 999px;
    background-color: #66aeba;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.969rem;
    line-height: 1;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.easy-language-trigger:hover,
.easy-language-trigger:focus {
    background-color: #477f87;
    color: #fff !important;
    text-decoration: none;
}

.easy-language-trigger:focus-visible {
    outline: none;
    border-color: #34332f;
}

.easy-language-trigger .easy-language-trigger-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.easy-language-trigger .easy-language-trigger-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.easy-language-trigger-label {
    display: inline-block;
    line-height: 1;
}

/* --- Easy-read view --- */
body.easy-language-view .easy-language-page {
    padding: 1.5rem 0 3rem;
}

body.easy-language-view .easy-language-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e3e1dc;
}

body.easy-language-view .easy-language-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 6px 16px 6px 8px;
    border-radius: 999px;
    background-color: #f0f6f7;
    color: #477f87;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
}

body.easy-language-view .easy-language-badge-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

body.easy-language-view .easy-language-badge-icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

body.easy-language-view .easy-language-close {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 8px 22px;
    border-radius: 999px;
    border: 2px solid #66aeba;
    background-color: #fff;
    color: #477f87 !important;
    font-weight: 700;
    font-size: 0.969rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

body.easy-language-view .easy-language-close:hover,
body.easy-language-view .easy-language-close:focus {
    background-color: #66aeba;
    color: #fff !important;
    text-decoration: none;
}

body.easy-language-view .easy-language-close-icon {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

body.easy-language-view .easy-language-close-icon svg {
    display: block;
    width: 14px;
    height: 14px;
}

body.easy-language-view .easy-language-title {
    margin: 0 0 1.25rem;
    font-size: 2.1rem;
    line-height: 1.25;
}

body.easy-language-view .easy-language-content {
    font-size: 1.25rem;
    line-height: 1.75;
    color: #1f1f1d;
}

body.easy-language-view .easy-language-content p {
    margin-bottom: 1.25rem;
}

body.easy-language-view .easy-language-content h2 {
    font-size: 1.7rem;
    line-height: 1.3;
    margin: 2rem 0 1rem;
}

body.easy-language-view .easy-language-content h3 {
    font-size: 1.4rem;
    line-height: 1.35;
    margin: 1.75rem 0 0.85rem;
}

body.easy-language-view .easy-language-content ul,
body.easy-language-view .easy-language-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

body.easy-language-view .easy-language-content li {
    margin-bottom: 0.5rem;
}

body.easy-language-view .easy-language-content a {
    color: #477f87;
    text-decoration: underline;
    word-break: break-word;
}

body.easy-language-view .easy-language-footer-actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-start;
}

/* --- Mobile tweaks --- */
@media (max-width: 768px) {
    .easy-language-trigger-wrapper {
        justify-content: flex-start;
    }

    .easy-language-trigger {
        font-size: 0.9rem;
        padding: 7px 14px 7px 8px;
    }

    .easy-language-trigger .easy-language-trigger-icon svg {
        width: 20px;
        height: 20px;
    }

    body.easy-language-view .easy-language-title {
        font-size: 1.65rem;
    }

    body.easy-language-view .easy-language-content {
        font-size: 1.125rem;
        line-height: 1.7;
    }

    body.easy-language-view .easy-language-topbar {
        gap: 0.75rem;
    }

    body.easy-language-view .easy-language-close {
        padding: 7px 16px;
    }
}
