/*
Copyright (C) 2022-2026 Petr Aubrecht <petr@aubrecht.net>
 
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
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 General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

/*
Colors:
https://paletton.com/#uid=30z050ksvw0k5p9o4seyYFBKPOY

primary: FF8D1C
primary lighter 1: E18C38
primary lighter 2: C8894B
primary darker 1: FF7F00
primary darker 2: FF7F00

secondary: 1975A1
secondary lighter 1: 0984C0
secondary lighter 2: 0596DC
secondary darker 1: 286D8E
secondary darker 2: 33667F

ternary: 119999
ternary lighter 1: 00BBBB
ternary lighter 2: 00D9D9
ternary darker 1: 218787
ternary darker 2: 2D7878
*/

:root {
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #ffffff;
    font-family: var(--font-sans);
    color: #212529;
}

div .login-button {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
}

div .big-title {
    font-size: 700%;
    font-weight: bold;
    font-family: var(--font-sans);
    color: #33667F;
    overflow-wrap: anywhere;
    margin-bottom: -0.5ex; /* put subtitle closer to the title*/
    text-shadow: 0.05ex 0.025em 4px rgba(0, 0, 0, 0.15);
}

@media(max-width: 1100px) {
    div .big-title {
        font-size: 500%;
    }
}

@media(max-width: 800px) {
    div .big-title {
        font-size: 400%;
    }
}

div .subtitle {
    font-size: 150%;
    font-family: var(--font-sans);
    color: #33667F;
}

@media(max-width: 800px) {
    div .subtitle {
        font-size: 100%;
    }
}

/* links color */
body .ui-commandlink, body .ui-link {
    color: #1975A1;
}

/* PF datatable headers */
body .ui-datatable thead th {
    background-color: #FF8D1C;
    border: 1px solid #f38510;
}

/* Nearest races — middle row (today) is biggest, past races smaller and gray */
div .nearest-races-1 {
    font-size: 1.1em;
    font-weight: bold;
    opacity: 0.55;
}

div .nearest-races-2 {
    font-size: 1.1em;
    font-weight: bold;
    opacity: 0.55;
}

div .nearest-races-3 {
    font-size: 1.3em;
    font-weight: bold;
    opacity: 0.7;
}

div .nearest-races-4 {
    font-size: 1.6em;
    font-weight: bold;
    opacity: 1;
    border-left-color: #FF8D1C;
    background-color: #FFF7EF;
}

div .nearest-races-5 {
    font-size: 1.3em;
    font-weight: bold;
    opacity: 0.9;
}

div .nearest-races-6 {
    font-size: 1.1em;
    font-weight: bold;
    opacity: 0.8;
}

div .nearest-races-7 {
    font-size: 1.1em;
    font-weight: bold;
    opacity: 0.8;
}

.race-row {
    padding: 0.3em 0.5em;
    margin: 0.15em 0;
    border-left: 4px solid transparent;
    border-radius: 0 4px 4px 0;
}

.race-row:hover {
    background-color: #FFF3E6;
}

/* Big panels with pictures */
.big-blocks {
    display: flex;
    justify-content: center;
    padding: 0 0.4em;
}

a.big-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4em;
    width: 100%;
    padding: 1em;
    border: 2px solid;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #33667F;
    font-weight: bold;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.big-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

a.big-block-races {
    background-color: #FFF3E6;
    border-color: #FF8D1C;
}

a.big-block-people {
    background-color: #EAF4FA;
    border-color: #1975A1;
}

a.big-block-tournament {
    background-color: #E6F5F5;
    border-color: #119999;
}

/* links to static pages */
.static-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
}

a.static-pages-link {
    font-size: 1.8em;
    font-weight: bold;
}

a.dynamic-pages-link {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
}

.dynamic-pages-static {
    font-size: 2em;
    font-weight: bold;
    color: #33667F;
}

.special-championship-evaluation {
    margin: 0.5em 0;
    padding: 1em;
    position: relative;
    width: 100%;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Races list: one full-width row per race, evaluation as a full-width footer */
.race-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.race-today-divider {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin: 0.75em 0 0.25em;
    color: #FF8D1C;
    font-weight: bold;
    font-size: 0.85em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.race-today-divider::before,
.race-today-divider::after {
    content: "";
    flex: 1;
    height: 2px;
    background-color: #FF8D1C;
}

.race-item {
    border: 1px solid #dee2e6;
    border-left: 4px solid #FF8D1C;
    border-radius: 0 6px 6px 0;
    padding: 0.5em 0.75em;
    background-color: #fff;
}

.race-item:hover {
    background-color: #FFF3E6;
}

.race-item-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25em 1em;
}

.race-item-id {
    color: #6c757d;
    font-size: 0.8em;
}

.race-item-title {
    font-size: 1.1em;
    font-weight: bold;
    flex: 1 1 auto;
}

.race-item-championship {
    margin-left: 0.5em;
    color: #495057;
    font-size: 0.9em;
    font-weight: normal;
}

.race-item-date {
    color: #495057;
    white-space: nowrap;
}

.race-item-actions {
    display: flex;
    gap: 0.25em;
    margin-left: auto;
}

.race-item-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em 1.25em;
    margin-top: 0.35em;
    font-size: 0.95em;
}

.race-item-field {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.race-item-label {
    color: #6c757d;
}

.race-item-evaluation {
    margin-top: 0.5em;
}

.race-item-evaluation-title {
    font-weight: bold;
    color: #33667F;
}

/* chat */
.chatter-link {
    font-weight: bold;
    margin: 0 0.4ex 0 0;
    border: #1975A1 solid 3px;
    border-radius: 6px;
    padding: 3px;
}

.message-short-version,
.message-body-short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-short-version p,
.message-body-short p {
    margin: 0;
}

.whole-message {
    border: #1975A1 solid 3px; /* darker orange */
    margin: 0.5em 0 0.5em 0;
    padding: 0.3em;
    position: relative;
    border-radius: 8px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: #1975A1;
    margin-bottom: 0.2em;
}

/* Tournament */
body .ui-datatable .ui-datatable-data > tr > td.tournament-cell {
    padding: 0.3rem;
}

body .ui-datatable thead > tr > th.tournament-cell {
    padding: 0.3rem;
    writing-mode: vertical-lr;
}

/*rich editor*/
.ql-align-center {
    text-align: center;
}
.ql-align-justify {
    text-align:justify;
}
.ql-align-right {
    text-align:right;
}
.ql-size-huge {
    font-size: 2.5em;
}
.ql-size-large {
    font-size: 1.5em;
}
.ql-size-small {
    font-size: .75em;
}

/*Edit race, notes*/
.proposal {
    font-size: 1.2rem;
    color: #1975A1;
    font-weight: bold;
}
.proposal:before {
    content: "\e924"; /*pi-info-circle, icon of i in a circle*/
    font-family: 'primeicons';
    font-style: normal;
}
.results {
    font-size: 1.2rem;
    color: #c0392b;
    font-weight: bold;
}
.results:before {
    content: "\ea01"; /*pi-stopwatch, icon with stopwatch*/
    font-family: 'primeicons';
    font-style: normal;
}
.photos {
    font-size: 1.2rem;
    color: #119999;
    font-weight: bold;
}
.photos:before {
    content: "\e96c"; /*pi-camera, icon with camear*/
    font-family: 'primeicons';
    font-style: normal;
}

/*Membership page*/
.member {
    background: lightgreen;
}

.non-member {
    background: lightgray;
}

.hidden {
    display: none;
}

.no-underline {
    text-decoration: none;
}

.w-100 {
    width: 100%;
}

.m-r-1 {
    margin-right: 1em;
}

.bg-member {
    background: lightgreen;
}

.bg-non-member {
    background: lightgray;
}

.h-small {
    height: 0.8em;
}

.flex-column-wrap,
.chat-header-content {
    display: flex;
    flex-flow: column wrap;
    align-items: center;
}

.large-icon {
    height: 10em;
}

.small-snek {
    height: 0.8em;
}

.clear-both {
    clear: both;
}

/* Common header - first line: big orange stripe with brand and mascot */
.header-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 0.75em 1em;
    background-color: #FF8D1C;
}

.header-hero .header-brand-link {
    text-decoration: none;
    background-color: inherit;
    display: flex;
}

.header-hero .header-mascot img {
    height: 150px;
}

@media(max-width: 800px) {
    .header-hero .header-mascot img {
        height: 100px;
    }
}

/* Common header - second line: navigation rectangles with season and login */
.header-navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 0.5em 1em;
    margin: 0 0 1em;
    background-color: #1975A1;
    color: #ffffff;
}

.header-season {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: #ffffff;
}

.header-navbar .ui-outputlabel {
    background-color: inherit;
    color: #ffffff;
}

.header-navbar .ui-selectonemenu {
    background-color: #FF8D1C;
    color: #ffffff;
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.header-navbar .header-rect {
    display: inline-block;
    padding: 0.35em 0.9em;
    background-color: #FF8D1C;
    color: #ffffff;
    border-radius: 0.4em;
    font-weight: bold;
    text-decoration: none;
}

.header-navbar .header-rect:hover {
    background-color: #e37500;
}

.header-tools {
    display: flex;
    align-items: baseline;
    gap: 1em;
    color: #ffffff;
    background-color: inherit;
}

.header-user {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5em;
    color: #ffffff;
}

@media(max-width: 800px) {
    .header-hero {
        justify-content: center;
    }

    .header-navbar {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .header-nav {
        justify-content: center;
    }

    .header-tools.login-button {
        justify-content: center;
    }
}

/* Club intro on index page */
.club-intro {
    margin-bottom: 1.5em;
    padding: 1.25em;
    border-left: 4px solid #1975A1;
    border-radius: 0 8px 8px 0;
    background-color: #f8f9fa;
}

.club-intro-title {
    margin: 0 0 0.5em;
    font-size: 1.6em;
    color: #1975A1;
}

.club-intro-text {
    margin: 0 0 0.75em;
    line-height: 1.6;
    color: #333;
}

.club-intro-text:last-child {
    margin-bottom: 0;
}

.grid.big-blocks-section {
    margin-top: 2em;
}

/* Footer */
.site-footer {
    margin-top: 2em;
    background-color: #1975A1;
    color: #ffffff;
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1em;
    padding: 1em;
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer a {
    color: #ffffff;
}

.site-footer-credit a {
    color: #d7e6ee;
    font-size: 0.85em;
    text-decoration: none;
}

.site-footer-spacer {
    flex: 1;
}

@media(max-width: 800px) {
    .site-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
