/*
:filename: docs/doc.css
:author: Brigitte Bigi
:contact: contact@sppas.org
:summary: CSS for Whakerexa documentation pages

-------------------------------------------------------------------------

This file is part of Whakerexa: https://github.com/brigitte-bigi/Whakerexa

Copyright (C) 2023-2026 Brigitte Bigi, CNRS
Laboratoire Parole et Langage, Aix-en-Provence, France

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

This banner notice must not be removed.

-------------------------------------------------------------------------

*/

/* ------------------------------------------------------------------ */
/* The band of a documentation page                                    */
/* ------------------------------------------------------------------ */

/* It holds one line, the path to the page: no ground of its own, so the
   text is written in the ink of the page, and no animation on arrival. */

:root {
    --header-height:   calc(2 * var(--font-size));
    --header-bg-color: transparent;
    --header-fg-color: var(--fg-color-alt);
    --header-slidein:  none;
}

/* ------------------------------------------------------------------ */
/* Card for component rendering in doc pages                           */
/* ------------------------------------------------------------------ */

/* A card of layout.css, and what a demonstration adds to it: it takes the
   whole width instead of the one a grid gives a card, it stands apart from
   the text it illustrates, and it carries the ground of a page, since what
   it shows is what a page is made of. */

.card-doc {
    max-width: none;
    margin-left: var(--typography-spacing-horizontal);
    margin-top: var(--typography-spacing-vertical);
    margin-bottom: var(--typography-spacing-vertical);
    background-color: var(--bg-color);
}

.card-view {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: calc(0.67 * var(--typography-spacing-vertical)) var(--typography-spacing-horizontal);
    padding: calc(1.6 * var(--font-size));
}

/* The code of a demonstration is shown on the ground of a page, and the
   line on its side says where it starts. */
.card-doc pre {
    background-color: var(--bg-color);
    border-left: calc(var(--border-width) * 2) solid var(--border-color);
}


/* The panel of every drawing the page can ask for: a cell is read as a whole,
   the name under a drawing large enough to be told from its neighbour. */
#icons-carried .wrap-item {
    width: calc(var(--font-size) * 7);
    text-align: center;
}

#icons-carried span[data-icon] {
    --icon-width:  calc(var(--font-size) * 2.5);
    --icon-height: calc(var(--font-size) * 2.5);
    display: block;
}
