/* ============================================================
   Troonrede alinea-annotaties
   Desktop : gekleurde icoonknop links van de alinea
   Mobiel  : kleine pills onder de alinea
   ============================================================ */

/* Wikkel om elke alinea die een thema raakt */
.tr-para-wrap {
    display: flex;
    flex-direction: row; /* annotaties links, tekst rechts */
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.4em;
}

/* De alineatekst zelf */
.tr-para-wrap p {
    flex: 1;
    margin: 0;
}

/* Kolom met icoonknoppen (desktop) */
.tr-anno-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
    min-width: 24px;
    align-items: center;
}

/* Individuele icoonknop */
.tr-anno-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: currentColor;
    cursor: pointer;
    font-size: 11px;
    font-family: sans-serif;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
    opacity: 0.75;
}

/* Letter wit op gevulde achtergrond */
.tr-anno-btn .tr-icon,
.tr-anno-btn .tr-label {
    color: #fff;
    position: relative;
    z-index: 1;
}

.tr-anno-btn:hover,
.tr-anno-btn:focus {
    opacity: 1;
    transform: scale(1.1);
    outline: none;
}

/* Tooltip (desktop) */
.tr-anno-btn .tr-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    right: 30px;       /* links van de knop */
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 0.5px solid #ccc;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: 400;
    white-space: nowrap;
    color: #222;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
    .tr-anno-btn .tr-tooltip {
        background: #2a2a2a;
        border-color: #555;
        color: #eee;
    }
    .tr-anno-btn:hover,
    .tr-anno-btn:focus {
        opacity: 1;
    }
}

.tr-anno-btn:hover .tr-tooltip,
.tr-anno-btn:focus .tr-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Themakleuren (12 slugs, elke slug krijgt zijn eigen kleur) */
.tr-anno-btn[data-slug="bestuur-democratie"]        { color: #534AB7; }
.tr-anno-btn[data-slug="buitenlandse-zaken"]        { color: #185FA5; }
.tr-anno-btn[data-slug="defensie-veiligheid"]       { color: #0F6E56; }
.tr-anno-btn[data-slug="economie-handel"]           { color: #3B6D11; }
.tr-anno-btn[data-slug="financien-belastingen"]     { color: #854F0B; }
.tr-anno-btn[data-slug="infrastructuur-waterstaat"] { color: #7A4010; }
.tr-anno-btn[data-slug="klimaat-natuur"]            { color: #1D9E75; }
.tr-anno-btn[data-slug="koloniaal-overzees"]        { color: #993556; }
.tr-anno-btn[data-slug="landbouw-visserij"]         { color: #639922; }
.tr-anno-btn[data-slug="onderwijs-cultuur"]         { color: #534AB7; }
.tr-anno-btn[data-slug="sociale-zekerheid-zorg"]    { color: #993C1D; }

/* ---- Mobiel: pills onder de alinea ---- */
@media (max-width: 700px) {

    .tr-para-wrap {
        flex-direction: column;
        gap: 6px;
    }

    .tr-anno-col {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
        padding-top: 0;
    }

    .tr-anno-btn {
        width: auto;
        height: auto;
        border-radius: 2em;
        padding: 3px 10px;
        font-size: 11px;
        font-weight: 500;
        opacity: 0.85;
    }

    /* Tooltip verbergen op mobiel — label staat al in de pill */
    .tr-anno-btn .tr-tooltip {
        display: none;
    }

    /* Op mobiel tonen we de volledige labeltekst i.p.v. het lettericoon */
    .tr-anno-btn .tr-icon { display: none; }
    .tr-anno-btn .tr-label { display: inline; }
}

@media (min-width: 701px) {
    .tr-anno-btn .tr-label { display: none; }
    .tr-anno-btn .tr-icon  { display: inline; }
}

/* ---- Thema-pills onderaan (bestaand blok) ---- */
.troonrede-themas {
    margin-top: 2em;
    padding: 0.75em 1em;
    border-top: 2px solid #767676;
    font-size: 0.95em;
    line-height: 1.8;
}

.troonrede-themas strong {
    margin-right: 0.4em;
    color: #333;
}

.troonrede-themas a {
    display: inline-block;
    margin: 0.15em 0.25em;
    padding: 0.2em 0.65em;
    border: 1px solid #767676;
    border-radius: 2em;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.troonrede-themas a:hover,
.troonrede-themas a:focus {
    background-color: #333;
    color: #fff;
    border-color: #333;
}
