﻿/*=======================================================================
    Root
=======================================================================*/
:root
{
    --color-theme: #FCF5A3;
    --color-theme-light: #fffbd1;
    --color-theme-dark: #CCC573;
    --color-theme-hamburger: #FCF5A380;
}


/*=======================================================================
    Elements Styles
=======================================================================*/
*
{
    padding: 0;
    margin: 0;
    font-family: "Noto Sans", Tahoma, Sans-Serif, Arial;
}

html
{
    scroll-behavior: auto !important;
}

body
{
}

h3
{
    margin-bottom: 30px;
}

h4
{
    margin-top: 50px;
}

.f09
{
    font-size: 0.9rem;
}

.f08
{
    font-size: 0.8rem;
}

.f07
{
    font-size: 0.7rem;
}

a
{
    text-decoration: none;
}

.flex-1
{
    flex: 1;
}

.flex-2
{
    flex: 2;
}


/*=======================================================================
    Bootstrap Adjustments
=======================================================================*/
#MainNavBar .navbar
{
    border-radius: 0;
    border: 1px solid #222;
    min-height: 86px !important;
    margin-bottom: 0;
}

#MainNavBar .navbar-brand
{
    padding-top: 2px;
    width: 240px;
    height: 86px;
}

#MainNavBar .navbar-nav > li > a
{
    padding: 0 20px;
    line-height: 86px;
    text-align: center;
}

#MainNavBar .navbar-toggle
{
    margin-top: 28px;
    line-height: 86px;
}

#MainNavBar .dropdown:hover .dropdown-menu
{
    display: block;
}

/*
#MainNavBar label
{
    font-weight: normal;
}
*/

#MainNavBar select
{
    color: #000;
}

#MainNavBar .dropdown-menu, .dropdown-menu li
{
    border: none;
    background-color: #222;
    text-align: right;
}

#MainNavBar .dropdown-menu li a
{
    /* color: #999; */
    font-size: var(--bs-nav-link-font-size);
    font-weight: var(--bs-nav-link-font-weight);
    color: var(--bs-nav-link-color);
}

#MainNavBar .dropdown-menu li a:hover
{
    color: #CCC;
}

#MainNavBar .dropdown-menu li a:hover
{
    background-color: inherit;
}

#MainNavBar .dropdown-submenu
{
    padding-top: 10px;
    height: 40px;
}

#MainNavBar a, a:active, a:focus
{
    outline: none;
}

.btn
{
    transition: all 0.1s ease !important;
}

.btn:active, .btn.active
{
    transform: scale(0.95) !important;
}

.table-hover tbody tr td
{
    transition: all 0.2s ease-in-out !important;
}

.big-checkbox
{
    transform: scale(1.5);
    margin: 0.4em 0.5em 0 0.2em;
}

.form-label
{
    margin-bottom: 0;
}

@media only screen and (min-width: 992px)
{
    .navbar .dropdown-menu
    {
        margin-top: -20px;
        padding: 5px 10px;
        background-color: #2B3035 !important;
        border-radius: 2px !important;
    }

    .navbar .dropdown-menu .dropdown-item
    {
        padding: 5px 10px;
        background-color: #2B3035 !important;
    }
}


/*=======================================================================
    Generic Classes Styles
=======================================================================*/
.ok_text
{
    color: #006600;
    font-weight: bold;
}

.ok_box
{
    padding: 10px;
}

.grayed
{
    color: #999;
}

.error_text
{
    color: #FF0000;
    font-weight: bold;
}

.error_list
{
    margin-left: 20px;
    margin-bottom: 20px;
}

.error_row
{
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

.no_records_row td
{
    padding: 20px 30px !important;
    font-style: italic;
}

.rounded
{
    border-radius: 10px;
}

.hidden
{
    display: none;
}

.small_button
{
    font-size: small;
    padding: 4px 10px;
}

.very_small_button
{
    font-size: x-small;
    padding: 2px 7px;
}

.no_border
{
    border: none !important;
}

.text_left
{
    text-align: left !important;
}

.standard_table
{
    border: 1px solid #BBB;
}

.standard_table th,
.details_table th
{
    padding: 5px;
    text-align: center;
    background-color: #DDD;
    color: #333;
}

.standard_table th
{
    border: 1px solid #BBB;
    text-align: center;
}

.details_table th
{
    text-align: left;
}

.standard_table td,
.details_table td
{
    padding: 5px;
}

.standard_table td
{
    border: 1px solid #BBB;
    text-align: center;
}

.details_table td
{
    text-align: left;
}

.details_table td.commands
{
    padding-top: 15px;
}

.details_div
{
    background-color: #DDD;
    border-radius: 5px;
    padding: 10px;
    display: inline-block;
}

.sep_atl
{
    height: 8px;
    line-height: 8px;
    vertical-align: middle;
}

#logo
{
    width: 200px;
    height: 82px;
    background-image: url('images/LogoSitoTTC.png');
    background-repeat: no-repeat;
}

#logo-tts
{
    width: 200px;
    height: 82px;
    background-image: url('/TTScore/images/LogoSitoTTS.png');
    background-repeat: no-repeat;
}

.theme-color
{
    background-color: var(--color-theme) !important;
}

tr.theme-color td,
tr.theme-color th
{
    background-color: var(--color-theme) !important;
}

.pager table,
.pager table td
{
    border: 1px solid lightgray;
    padding: 2px 12px;
}

.pager table td span,
.pager table td a
{
    font-size: 0.9em;
    text-decoration: none;
}

#containerPartite
{
    display: flex;
    flex-wrap: wrap;

    /*
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    */

    gap: 2rem;
}

.card-partita
{
    background-color: var(--color-theme);

    border: 2px solid var(--color-theme-dark);
    border-radius: 10px;
    transition: all 0.4s ease-out;
    overflow: hidden;
    max-height: 500px;
    white-space: nowrap;

    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);

    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(33.333% - 1.333rem);
}

.card-partita .card-partita-header
{
    background-color: var(--color-theme-dark);
    white-space: nowrap;

    /*
    display: flex;
    flex-wrap: wrap;
    column-gap: 1rem;
    */
}

.card-partita .btn
{
    min-width: 60px;
}

.card-partita.htmx-swapping
{
    opacity: 0;
    /* transform: scale(0.95) translateY(-10px); */
    transform: scale(0) translateY(-20px);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    pointer-events: none; /* Impedisce altri click durante l'uscita */
}

.table .pagination
{
    margin: 10px;
}

.pagination .page-item:not(.active) .page-link:hover
{
    background-color: #CCC;
    border-color: #CCC;
}


/*=======================================================================
    Tournament Table
=======================================================================*/
.tournaments_table
{
    width: 100%;
    border-width: 0;
}

.tournament_div
{
    width: 100%;
    white-space: nowrap;
}

.tournament_div .header
{
    font-size: 120%;
    font-weight: bold;
    color: #333;
    background-color: #CCC;
    border-radius: 10px 10px 0 0;
}

.truncate-ellipsis
{
    display: table;
    table-layout: fixed;
    width: 100%;
    white-space: nowrap;
}

.truncate-ellipsis > *
{
    display: table-cell;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 20px;
}

.tournament_div .body
{
    color: #333;
    background-color: #EEE;
    border: 1px solid #EEE;
    border-radius: 0 0 10px 10px;
    padding: 10px 20px;
}

.tournament_div .body table tr td
{
    padding-right: 10px;
}

.tournament_div .body .commands
{
    padding-top: 15px;
    padding-bottom: 5px;
}

.grafico_classifica
{
    width: auto !important;
    height: auto !important;
}


/*=======================================================================
    TTScore
=======================================================================*/
.score-point
{
    font-weight: 800;
    line-height: 1;
    font-size: 10rem;
}

.score-set
{
    background-color: #666;
    border-radius: 5px;
    padding: 3px 6px;
    color: #f0f0f0;
}

.boxServizioIniziale
{
    /* background-color: #eee; */
    /* background-color: var(--bg-body-emphasis); */
    padding: 0.6rem 0.8rem;
    overflow: hidden;
}

.labelFissa
{
    color: #999;
    font-size: 0.8rem;
}

.simbolo-servizio
{
    color: #ee9;
    font-size: 0.5em;
    transition: 0.5s ease;
}

.partita-container
{
    /* width: fit-content; */
    background: linear-gradient(180deg, var(--color-theme-light) 0%, var(--color-theme) 50%);
}

.partita-giocatori
{
    font-weight: bold;
    white-space: nowrap;
}

.partita-punteggio
{
    font-weight: bold;
    white-space: nowrap;
    background-color: #F9F9F9 !important;
    border: 2px solid #CCC !important;
}

.partita-data
{
}

.partita-grafico-set
{
    min-height: 180px;
}

.anima-tabella-titolo
{
    opacity: 0;
    animation: entraDaSinistra 0.7s ease-out forwards;
}

@keyframes entraDaSinistra
{
    0%
    {
        transform: translateX(-100%);
        opacity: 0;
    }

    100%
    {
        transform: translateX(0);
        opacity: 1;
    }
}

.anima-tabella-dati
{
    opacity: 0;
    animation: pop 0.7s ease-out forwards;
}

@keyframes pop
{
    0%
    {
        opacity: 0;
        transform: scale(0%);
    }

    70%
    {
        transform: scale(102%)
    }

    100%
    {
        opacity: 1;
        transform: scale(100%)
    }
}

.tooltip {
    --bs-tooltip-bg: #333;
    --bs-tooltip-color: var(--color-theme-light);
}


/*=======================================================================
    Tabella con logo
=======================================================================*/
.table-logo
{
    position: relative !important;
    z-index: 1 !important;
    background-color: transparent !important;
    overflow: hidden;
}

.table-logo::before
{
    content: "" !important;
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/TTScore/images/LogoSitoTTS_watermark_dark.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 150px !important;
    background-size: 60% !important;
    opacity: 0.70 !important;
    z-index: 0 !important;
    display: block !important;
    pointer-events: none !important;
}

.table-logo table,
.table-logo table thead,
.table-logo table tbody,
.table-logo table tr,
.table-logo table td,
.table-logo table th
{
    background-color: transparent !important;
    background: transparent !important;
    --bs-table-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    position: relative;
}

.table-logo tr.theme-color td,
.table-logo tr.theme-color th
{
    background-color: var(--color-theme) !important;
}


/*=======================================================================
    User Bar
=======================================================================*/
#UserBar
{
    margin-top: 104px;
    font-size: 12px;
    /* height: 32px; */
    /* line-height: 32px; */
    border-radius: 0;
    min-height: 32px !important;
    margin-bottom: 0;
    border: 1px solid #999;
    border-left: none;
    border-right: none;
    z-index: 990;
}

#UserBar a
{
    text-decoration: none;
}


/*=======================================================================
    Main
=======================================================================*/
#main
{
    margin: 140px 0 40px 0;
}


/*=======================================================================
    Footer
=======================================================================*/
footer
{
    /* font-size: x-small; */
    font-size: x-small;
    padding: 20px;
    margin-top: 10px;
    color: #999;
    text-align: center;
    white-space: nowrap;
}

footer a
{
    color: #999;
}

footer a:hover
{
    color: #999;
    text-decoration: underline;
}

footer .sf
{
    margin-top: 5px;
}


/*=======================================================================
    Cookie Bar
=======================================================================*/
#cookie-bar
{
    background: #111111;
    height: auto;
    line-height: 24px;
    color: #eeeeee;
    text-align: center;
    padding: 3px 0;
}

#cookie-bar.fixed
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

#cookie-bar.fixed.bottom
{
    bottom: 0;
    top: auto;
}

#cookie-bar p
{
    margin: 0;
    padding: 0;
}

#cookie-bar a
{
    color: #ffffff;
    display: inline-block;
    border-radius: 3px;
    text-decoration: none;
    padding: 0 6px;
    margin-left: 8px;
}

#cookie-bar .cb-enable
{
    background: #007700;
}

#cookie-bar .cb-enable:hover
{
    background: #009900;
}

#cookie-bar .cb-disable
{
    background: #990000;
}

#cookie-bar .cb-disable:hover
{
    background: #bb0000;
}

#cookie-bar .cb-policy
{
    background: #0033bb;
}

#cookie-bar .cb-policy:hover
{
    background: #0055dd;
}


/*=======================================================================
    Media Queries
=======================================================================*/
@media only screen and (max-width: 991px)
{
    /*=======================================================================
        Bootstrap Adjustments
    =======================================================================*/
    #MainNavBar .navbar
    {
        min-height: 45px !important;
    }

    #MainNavBar .navbar-brand
    {
        padding-top: 2px;
        height: 45px;
    }

    #MainNavBar .navbar-toggle
    {
        margin-top: 8px;
        line-height: 45px;
    }

    #MainNavBar .navbar-nav > li > a
    {
        line-height: 50px;
    }

    #MainNavBar .dropdown-menu, .dropdown-menu li
    {
        /*
        width: 100%;
        background-color: #222;
        */
    }

    #MainNavBar .dropdown-menu li a
    {
        /*background-color: #CCC;
        color: #333 !important;*/
        padding: 14px 0 !important;
        text-align: center;
        min-height: 40px;
    }

    #MainNavBar .dropdown-menu li a:hover
    {
        /* background-color: #CCC;
        color: #FFF !important; */
    }

    #MainNavBar .dropdown-submenu
    {
        padding: 0;
    }

    #MainNavBar #logo
    {
        margin-top: 0px;
        width: 100px;
        height: 41px;
        background-image: url('images/LogoSitoTTC_Small.png');
    }

    #MainNavBar #logo-tts
    {
        margin-top: 0px;
        width: 100px;
        height: 41px;
        background-image: url('/TTScore/images/LogoSitoTTS_Small.png');
    }

    .navbar-toggler
    {
        border-color: var(--color-theme-hamburger) !important;
        border-width: 2px;
        transition: all 0.1s ease !important;
    }

    .navbar-toggler:focus
    {
        text-decoration: none;
        outline: 0;
        /* Un'ombra blu sfumata invece del bordo netto */
        box-shadow: 0 0 0 0.25rem var(--color-theme-hamburger);
    }

    .navbar-toggler:active
    {
        transform: scale(0.9);
    }


    /*=======================================================================
        Other Adjustments
    =======================================================================*/

    #UserBar
    {
        margin-top: 61px;
    }

    #main
    {
        margin: 90px 0 30px 0;
    }

    .score-point
    {
        font-weight: 800;
        line-height: 1;
        font-size: 20vw;
    }

    .table-logo::before
    {
        background-size: 90% !important;
    }

    .card-partita
    {
        flex: 0 0 100%;
    }
}
