/* Printimise stiilid sõnarägastikule */

@media print {
    /* Peida kõik, mida ei ole vaja printida */
    body > *:not(#printContent) {
        display: none !important;
    }
    
    nav, .navbar, .section, .columns, .field, .control, button {
        display: none !important;
    }
    
    /* Näita ainult printimise sisu */
    #printContent {
        display: block !important;
        visibility: visible !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* A4 formaadi seaded */
    @page {
        size: A4;
        margin: 2cm;
    }
    
    body {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    /* Printimise konteineri stiilid */
    .print-container {
        max-width: 100%;
        min-height: 100vh;
        margin: 0 auto;
        font-family: Arial, sans-serif;
        background: white;
        page-break-after: always;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    /* Viimane versioon ei vajaks page break'i, aga see ei ole kriitiline */
    .print-container:last-child {
        page-break-after: avoid;
    }
    
    /* Pealkiri */
    .print-title {
        font-size: 24pt;
        font-weight: bold;
        text-align: center;
        margin-bottom: 20pt;
        color: #000;
        border-bottom: 2pt solid #000;
        padding-bottom: 10pt;
    }
    
    /* Väiksem pealkiri suuremate rägastike jaoks */
    .print-title.size-small,
    .print-title.size-tiny,
    .print-title.size-micro {
        font-size: 18pt;
        margin-bottom: 15pt;
        padding-bottom: 8pt;
    }
    
    /* Rägastiku konteiner */
    .print-grid-container {
        display: flex;
        justify-content: center;
        margin: 20pt 0;
        page-break-inside: avoid;
        max-width: 100%;
        overflow: visible;
    }
    
    /* Rägastik ise */
    .print-grid {
        font-family: 'Courier New', monospace;
        font-size: 14pt;
        font-weight: bold;
        line-height: 1.8;
        letter-spacing: 0.8em;
        white-space: pre;
        text-align: left;
        color: #000;
        border: 2pt solid #000;
        padding: 15pt;
        background: white;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Väiksemad fondid suuremate rägastike jaoks */
    .print-grid.size-small {
        font-size: 10pt;
        line-height: 1.6;
        letter-spacing: 0.6em;
        padding: 10pt;
    }
    
    .print-grid.size-tiny {
        font-size: 8pt;
        line-height: 1.4;
        letter-spacing: 0.5em;
        padding: 8pt;
    }
    
    .print-grid.size-micro {
        font-size: 6pt;
        line-height: 1.3;
        letter-spacing: 0.4em;
        padding: 6pt;
    }
    
    /* Sõnade nimekiri */
    .print-words-container {
        margin-top: 30pt;
        page-break-inside: avoid;
    }
    
    .print-words-title {
        font-size: 16pt;
        font-weight: bold;
        margin-bottom: 10pt;
        color: #000;
        border-bottom: 1pt solid #000;
        padding-bottom: 5pt;
    }
    
    .print-words-list {
        font-size: 12pt;
        line-height: 1.6;
        column-count: 3;
        column-gap: 20pt;
        color: #000;
    }
    
    .print-word {
        break-inside: avoid;
        margin-bottom: 5pt;
    }
    
    /* Väiksemad fondid sõnade nimekirjale suuremate rägastike jaoks */
    .print-words-list.size-small {
        font-size: 10pt;
        column-count: 4;
    }
    
    .print-words-list.size-tiny {
        font-size: 9pt;
        column-count: 4;
    }
    
    .print-words-list.size-micro {
        font-size: 8pt;
        column-count: 5;
    }
    
    /* Sisu konteiner, et footer saaks lehe lõppu */
    .print-content {
        flex: 1;
    }
    
    /* Jalus */
    .print-footer {
        margin-top: auto;
        padding-top: 10pt;
        border-top: 1pt solid #ccc;
        font-size: 10pt;
        text-align: center;
        color: #666;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    /* Eemalda värvid ja taustad */
    * {
        color: #000 !important;
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Säilita ainult printimise konteineris olevad stiilid */
    #printContent * {
        color: inherit !important;
    }
}

/* Ekraanivaate stiilid printimise eelvaatele */
#printContent {
    display: none;
}

