@charset "UTF-8";
/* ***********************************************************************
 *
 *  File:   comenius_bib.css
 *
 *  Descr:  Styles specific to comenius_bib.php.
 *
 *  Author: Jomar Hønsi, 2026
 *
 * ************************************************************************/

p.intro a {
    text-decoration: underline;
}

/* "Zobrazit podle" tabs, combined on one line with the "Zahrnout" filter. */
.filter-row.tab-row {
    justify-content: space-between;
    align-items: flex-end;
    gap: 1em;
    border-bottom: 1px solid #d8cdb8;
    padding-bottom: 0;
    margin-bottom: 0;
    font-size: 1.1em;
}

.filter-row.tab-row .tabs {
    display: flex;
    align-items: center;
}

.filter-row.tab-row .filter-label {
    margin-right: 0.8em;
}

.filter-row.tab-row .tabs label {
    margin-right: 0;
    padding: 0.7em 1.6em;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background: #f4efe3;
    color: #5a4522;
    position: relative;
}

.filter-row.tab-row .tabs label:hover {
    background: #ece3cd;
}

.filter-row.tab-row .tabs label:has(input:checked) {
    background: #fff;
    border-color: #d8cdb8;
    color: darkred;
    font-weight: bold;
    position: relative;
    top: 1px;
}

.filter-row.tab-row .tabs input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-row.tab-row .filter-trigger {
    display: flex;
    align-items: center;
    align-self: center;
}

.filter-row.tab-row .tool-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.5em 0.9em;
    font: inherit;
    border: 1px solid #d8cdb8;
    border-radius: 4px;
    background: #f4efe3;
    color: #5a4522;
    cursor: pointer;
}

.filter-row.tab-row .tool-button:hover {
    background: #ece3cd;
}

.filter-dialog {
    position: fixed;
    margin: 0;
    border: 1px solid #d8cdb8;
    border-radius: 8px;
    padding: 1em 1.5em;
    font-family: var(--main-font);
    color: #333;
    background: #f8ecd0;
}

.filter-dialog::backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.filter-dialog h3 {
    margin: 0 0 0.6em;
}

.filter-dialog label {
    display: block;
    margin-bottom: 0.4em;
}

.filter-dialog .dialog-actions {
    margin-top: 1em;
    text-align: right;
}

.filter-dialog .dialog-section {
    margin-top: 1em;
    padding-top: 0.8em;
    border-top: 1px solid #d8cdb8;
}

.filter-dialog .dialog-section[hidden] {
    display: none;
}

.filter-dialog .sort-control {
    justify-content: flex-start;
    margin: 0;
}

.filter-dialog .sort-control label {
    margin-bottom: 0;
}

.tab-panel {
    background: #fff;
    border: 1px solid #d8cdb8;
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 0.8em;
    margin-bottom: 1em;
}

/* Mobile: tabs become a full-width segmented control, settings button moves below. */
@media (max-width: 700px) {
    .filter-row.tab-row {
        flex-wrap: wrap;
        font-size: 1em;
        gap: 0.5em;
        border-bottom: none;
    }

    .filter-row.tab-row .tabs {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .filter-row.tab-row .filter-label {
        flex: 1 1 100%;
        margin: 0 0 0.3em;
        font-size: 0.9em;
    }

    .filter-row.tab-row .tabs label {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.6em 0.3em;
        text-align: center;
        border: 1px solid #d8cdb8;
        border-radius: 0;
        top: 0;
    }

    .filter-row.tab-row .tabs label:first-of-type {
        border-radius: 4px 0 0 4px;
    }

    .filter-row.tab-row .tabs label:last-of-type {
        border-radius: 0 4px 4px 0;
    }

    .filter-row.tab-row .tabs label:not(:first-of-type) {
        margin-left: -1px;
    }

    .filter-row.tab-row .tabs label:has(input:checked) {
        background: #fff;
        border-bottom: 3px solid darkred;
    }

    .filter-row.tab-row .filter-trigger {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .tab-panel {
        border-top: 1px solid #d8cdb8;
        border-radius: 4px;
        padding: 0.5em;
    }

    .filter-dialog {
        width: calc(100% - 2em);
        max-width: 360px;
        box-sizing: border-box;
    }
}

/* Below 800px the settings button shows only the cogwheel. */
@media (max-width: 799px) {
    .filter-row.tab-row .tool-button .tool-button-text {
        display: none;
    }
}

@media (max-width: 700px) {
    .filter-row.tab-row .filter-label {
        text-align: center;
        font-weight: bold;
    }
}
