/* =============================================
   SYY-SEURAUS LASKURI — TYYLIT
   Perustuu oirelaskurin omatTyylit.css pohjaan
   Brändiväri: #579D1C
   ============================================= */

/* --- Perusasettelu --- 
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 20px;
}
    */

/* --- Pääkontti --- */
.laskuri-container {
    max-width: 800px;
    margin: 0 auto;
}

/* --- Otsikkoalue --- */
.laskuri-header {
    text-align: center;
    margin-bottom: 24px;
}

.laskuri-header h1 {
    font-size: 26px;
    color: #579D1C;
    margin-bottom: 8px;
}

.laskuri-kuvaus {
    font-size: 15px;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Lomake (yhteinen luokka oirelaskurin kanssa) --- */
.lupausForms {
    text-align: center;
    border: 2px solid #579D1C;
    padding: 20px;
    margin: 10px 0;
    background-color: #fff;
    border-radius: 6px;
}

.lomake-ohje {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #333;
}

/* --- Osa-alueiden lista --- */
.osa-alue-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.osa-alue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: default;
    transition: background-color 0.15s;
}

.osa-alue-item:hover {
    background-color: #f0f7e8;
}

.osa-alue-item.valittu {
    background-color: #e8f5d4;
    border-color: #579D1C;
}

.osa-alue-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #579D1C;
    cursor: pointer;
    flex-shrink: 0;
}

.osa-alue-nimi {
    flex: 1;
    font-size: 15px;
    color: #333;
    min-width: 0;
}

/* --- Napit (yhteinen luokka oirelaskurin kanssa) --- */
.lupausButtons {
    width: 160px;
    background-color: #579D1C;
    font-size: 16px;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    margin: 5px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.lupausButtons:hover {
    background-color: #3B6D11;
}

.lupausButtons--toissijainen {
    background-color: #fff;
    color: #579D1C;
    border: 2px solid #579D1C;
}

.lupausButtons--toissijainen:hover {
    background-color: #f0f7e8;
}

.nappi-rivi {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* --- Tulokset --- */
.tulokset-alue {
    margin-top: 16px;
}

.tulokset-otsikko {
    text-align: center;
    margin-bottom: 12px;
}

.tulokset-otsikko h2 {
    font-size: 22px;
    color: #579D1C;
}

.valitut-label {
    font-size: 14px;
    color: #555;
    margin-top: 4px;
}

.tulokset-osio {
    margin-bottom: 16px;
    text-align: left;
}

.osio-otsikko {
    font-size: 17px;
    color: #579D1C;
    margin-bottom: 4px;
    text-align: center;
}

.osio-kuvaus {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
    text-align: center;
}

/* --- Tulosrivi --- */
.tulos-rivi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 6px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.15s;
}

.tulos-rivi:hover {
    background-color: #f0f7e8;
    border-color: #579D1C;
}

.tulos-vasen {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tulos-piste {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.piste-syy { background-color: #E24B4A; }
.piste-seuraus { background-color: #EF9F27; }

.tulos-nimi {
    font-size: 15px;
}

.tulos-oikea {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tulos-prosentti {
    font-size: 15px;
    font-weight: bold;
    min-width: 42px;
    text-align: right;
}

.tulos-palkki-tausta {
    width: 80px;
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.tulos-palkki {
    height: 100%;
    border-radius: 3px;
}

.palkki-syy { background-color: #E24B4A; }
.palkki-seuraus { background-color: #EF9F27; }

.tulos-nuoli {
    font-size: 14px;
    color: #579D1C;
}

/* --- Kunnossa-tila --- */
.tila-napit {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.tila-nappi {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.tila-nappi.tila-ongelma:hover,
.tila-nappi.tila-ongelma.aktiivinen {
    background: #E24B4A;
    border-color: #E24B4A;
    color: white;
}

.tila-nappi.tila-kunnossa:hover,
.tila-nappi.tila-kunnossa.aktiivinen {
    background: #579D1C;
    border-color: #579D1C;
    color: white;
}

.tila-ongelma-aktiivinen {
    background-color: #fef2f2;
    border-color: #E24B4A;
}

.tila-kunnossa-aktiivinen {
    background-color: #e8f5d4;
    border-color: #579D1C;
}

.noidankehä-rivi {
    padding: 6px 0;
    font-size: 14px;
    color: #A32D2D;
    border-bottom: 0.5px solid #F7C1C1;
}

.noidankehä-rivi:last-child {
    border-bottom: none;
}

#noidankehaOsio .tulos-rivi:hover {
    background-color: #fef2f2;
    border-color: #E24B4A;
}

.noidankeha-palkki-placeholder {
    visibility: hidden;
}

.noidankeha-keha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.noidankeha-keha svg {
    display: block;
    min-width: 28px;
    min-height: 28px;
}

/* --- Tulostus --- */
.print-logo {
    display: none;
}

@media print {
    .print-logo {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        margin: 10px;
        width: 140px;
        height: auto;
    }

    .nappi-rivi {
        display: none;
    }
}

/* --- Mobiili --- */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    .lupausButtons {
        width: 140px;
        font-size: 14px;
    }

    .tulos-palkki-tausta {
        display: none;
    }

    .osa-alue-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tila-napit {
        width: 100%;
        justify-content: flex-end;
    }

    .tila-nappi {
        flex: 1;
        text-align: center;
    }
}

/* --- Muutossarakkeet --- */
.muutos-sarakkeet {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-top: 8px;
}

.muutos-sarake {
    flex: 1;
    min-width: 0;
}

.muutos-sarake-otsikko {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #eee;
}

.muutos-nousu {
    color: #579D1C;
}

.muutos-lasku {
    color: #E24B4A;
}

@media (max-width: 600px) {
    .muutos-sarakkeet {
        flex-direction: column;
        gap: 16px;
    }
}
