/*
 * Copyright (C) 2026 sitegui
 *
 * 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/>.
 */

:root {
    --primary-bg: #DB0000;
    --secondary-bg: #BFA2DB;
    --body-bg: #FFF7EC;
    --header-bg: #3D2C3E;

    --primary-text: #eee;
    --secondary-text: #111;
    --body-text: #111;
    --header-text: #eee;
    --muted-text: #333;

    --spacing: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    background-color: var(--body-bg);
    color: var(--body-text);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-bg);
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--primary-bg);
    text-decoration: underline var(--primary-bg);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing);
    position: relative;
}

.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background-color: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px var(--secondary-bg) solid;
    z-index: 20;
    padding: 4px 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.site-header a {
    color: inherit;
    text-decoration: none;
}

.site-header .align-right {
    margin-left: auto;
}

.brand {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.brand .logo {
    height: 40px;
    margin-top: 5px;
    margin-right: 5px;
}

.header-button {
    background: none;
    border: none;
    padding: 0;
    height: 30px;
    cursor: pointer;
    margin-right: 10px;

    img {
        height: 100%;
    }
}

.side-drawer {
    top: 0;
    left: 100%;
    width: 200px;
    height: 100%;
    max-height: 100%;
    background-color: #f3f3f3;
    transition: margin-left 0.3s ease;
    margin: 0 0 0 -200px;
    overflow-y: auto;
    border: none;
    padding: 0;

    @starting-style {
        margin-left: 0;
    }
}

.drawer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
}

.side-drawer nav {
    padding: 60px 20px 20px;
}

.side-drawer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-drawer nav li {
    margin-bottom: 1rem;
}

section {
    margin: var(--spacing) 0;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    color: var(--primary-bg);
    text-decoration: underline;
    text-align: left;
}

.btn, .btn-secondary {
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    margin: 5px 0;
    line-height: 1.4;
    font-size: inherit;
}

.btn {
    padding: 10px 15px;
    font-weight: 700;
    background: var(--primary-bg);
    color: var(--primary-text);
}

.btn:focus {
    outline-offset: 2px;
}

.btn-secondary {
    padding: 5px 7px;
    background: var(--secondary-bg);
    color: var(--secondary-text);
}

.btn-disabled {
    opacity: 0.75;
    cursor: default;
}

.small-text {
    color: var(--muted-text);
    font-size: 0.75rem;
    line-height: 1;
}

footer {
    margin-top: 1em !important;
    color: var(--muted-text);
    font-size: 0.8rem;
    border-top: 1px var(--secondary-bg) solid;
}

form {
    input:not([type="checkbox"]), textarea, select {
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
    }

    textarea {
        height: 200px;
        resize: none;
    }
}

.global-loading-indicator, .with-global-loading-indicator::before {
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    animation: 2s linear infinite alternate global-loading-indicator;
    content: "";
    background-image: linear-gradient(to right, transparent 45%, #090 46%, #090 50%, #090 54%, transparent 55%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    display: none;
}

body.loading {
    .global-loading-indicator, .with-global-loading-indicator::before {
        display: block;
    }
}

@keyframes global-loading-indicator {
    0% {
        background-position: -55vw 0;
    }
    100% {
        background-position: 55vw 0;
    }
}

