/* page layout */

section {
    margin-bottom: 15px;
}

/* form elements */

.option-group {
    display: inline-block !important;
    font-weight: normal !important;
    margin-right: 15px;
}

.month1,
.month2 {
    font-size: 0.9em;
    
    th {
        font-weight: normal;
    }
}

/* buttons */
    
.button {
    position: relative;
    display: inline-block;
    margin-top: 0.5em;
    padding: 1em 1.5em;
    box-shadow: inset 0px 1px 0px 0px #f5c056;
    background-color: #f0563d;
    border: 1px solid #704100;
    text-shadow: 0px 1px 0px #594209;
    border-radius: 2px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.1em;
    color: #FFF;
    cursor: pointer;
}

    .button:hover {
        background-color: #ff6249;
        color: #FFF !important;
        text-decoration: none;
    }

.button[disabled] {
    pointer-events: none;
    text-shadow: 0px 1px 0px #000000;
    border: solid #A1A1A1 1px;
    box-shadow: inset 0px 1px 0px 0px #000000;
    background: #898989;
}

    .button > i[class^='fa'] {
        margin-right: 5px;
    }

.button.secondary {
    text-shadow: 0px 1px 0px #000000;
    border: solid #a9a9a9 1px;
    box-shadow: inset 0px 1px 0px 0px #000000;
    background: #151515;
}

    .button.secondary:hover {
        background-color: #2b2b2b;
        color: #FFFFFF !important;
    }

    .x-small {
        padding: 0.3em 0.8em;
        font-size: 0.9em;
    }

    .small {
        padding: 0.5em 1em;
        font-size: 1.1em;
    }

    .medium {
        padding: 1em 2em;
        font-size: 1.4em;
    }


/*********************************************************************************/
/* Tweaks                                                                        */
/*********************************************************************************/

.ui-dialog {
    position: fixed !important;
    max-width: 550px;
    max-height: 400px;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

/* date range picker */

#label-obdobi {
    position: sticky;
    float: left;
    top: 20px;
    display: flex;
    justify-content: space-between;

    margin-bottom: 10px;
    padding: 5px !important;
    border: 1px solid #8C8C8C;
    background: rgba(255, 255, 255, 0.8);
}

    #label-obdobi b {
        display: flex;
        flex: 0 1 auto;
        margin-right: 10px;
        line-height: 37px;
    }
    
    #label-obdobi #filter-obdobi {
        display: flex;
        flex: 1 1 auto;
        min-width: 225px;
        cursor: pointer;
        padding: 0 10px;
    }

    #label-obdobi .fa-calendar {
        position: absolute;
        top: 15px;
        right: 13px;
        cursor: pointer;
    }

/* legenda */

.non-visible {
    position: absolute !important;
    left: -9999px !important;
}

#legenda {
    position: sticky;
    float: right;
    top: 20px;
    margin-bottom: 10px;
    padding: 5px !important;
    border: 1px solid #8C8C8C;
    background: rgba(255, 255, 255, 0.8);
}

    #legenda b {
        margin-right: 10px;
    }

    #legenda strong {
        display: inline-block;
        font-weight: normal !important;
        padding: 2px 5px;
        border: 1px solid #8C8C8C;
    }

    .v {
        background: #8EE173;
    }

    .r {
        background: #FED370;
    }

    .o {
        background: #DF8282;
    }

/* price list */

h3:has(~ table) {
    margin-bottom: -1em !important;
}

table#price-list {
    margin: 0;
    width: 100%;
}

    table#price-list tbody tr {
        border: solid 1px;
        border-left: 0;
        border-right: 0;
    }

    table#price-list td {
        padding: 0.75em 0.75em;
    }

    table#price-list th {
        font-size: 0.9em;
        font-weight: 700;
        text-align: left;
        padding: 0 0.75em 0.75em 0.75em;
    }

    table#price-list thead {
        border-bottom: solid 2px;
    }

    table#price-list tfoot {
        border-top: solid 2px;
    }

    table#price-list.alt {
        border-collapse: separate;
    }

        table#price-list.alt tbody tr td {
            border: solid 1px;
            border-left-width: 0;
            border-top-width: 0;
        }

            table#price-list.alt tbody tr td:first-child {
                border-left-width: 1px;
            }

        table#price-list.alt tbody tr:first-child td {
            border-top-width: 1px;
        }

        table#price-list.alt thead {
            border-bottom: 0;
        }

        table#price-list.alt tfoot {
            border-top: 0;
        }

table#price-list tbody tr {
    border-color: rgba(0, 0, 0, 0.1);
}

    table#price-list tbody tr:nth-child(2n + 1) {
        background-color: rgba(0, 0, 0, 0.075);
    }

table#price-list th {
    color: #000;
}

table#price-list thead {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

table#price-list tfoot {
    border-top-color: rgba(0, 0, 0, 0.1);
}

table#price-list.alt tbody tr td {
    border-color: rgba(0, 0, 0, 0.1);
}

/* warning */

.warning {
    clear: both;
    position: relative;
    font-weight: bold;
    margin-top: 40px;
    padding: 15px 15px 15px 80px;
    border: 1px solid rgba(0,0,0,.2);
    background-color: #e5e5e5;
}

    .warning span {
        position: absolute;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        top: 0;
        bottom: 0;
        left: 0;
        width: 60px;
        font-size: 2em;
        color: #fff;
        text-align: center;
        background-color: #777;
    }

/* time line table */

table.time-line {
    clear: both;
    width: 100%;
    border: 1px solid #8C8C8C;
    border-top: 0px;
    border-left: 0px;
    border-collapse: collapse;
    color: #000000;
    margin: 30px 0 10px 0;
}

    .time-line td,
    .time-line th {
        height: 30px;
        font-size: 1em;
        border-left: 1px solid #8C8C8C;
        border-top: 1px solid #8C8C8C;
    }

    .time-line th.date {
        width: 100px;
        border-left: 0px;
        border-top: 0px;
     }

        .time-line th.date b {
            text-transform: capitalize;
        }

        .time-line th.date span {
            display: block;
            font-weight: normal;
            font-size: 1.1em;
        }

    .time-line th.hour {
        font-size: 1.3em;
        text-align: center;
        padding: 4px 0px;
    }

    .time-line th.court,
    .time-line th.court i {
        font-weight: normal;
        font-style: normal;
    }

    .time-line th.court {
        padding: 0 0.5em;
    }
      
        .time-line .intervals {
            font-weight: normal;
            text-align: center;
            padding: 3px;
            border-top: 0px;
        }
      
        .time-line td > span {
            display: block;
            height: 100%;
            width: 100%;
            line-height: 19px;
            text-align: center;
        }

        .time-line .orange {
            color: #FED370 !important;
            background: #FED370 !important;
        }  

        .time-line .red {
            color: #DF8282 !important;
            background: #DF8282 !important;
        }   

        .time-line .green {
            cursor: pointer;
            color: #8EE173 !important;
            background: #8EE173 !important;
        } 

        .time-line .black {
            color: #111111 !important;
            background: #111111 !important;
        } 

/* formular */

#reservation-form  {
    margin-bottom: 15px;
}

    #reservation-form ul.items-list {
        display: block;
        max-width: 65vw;
        min-width: 600px;
        max-width: 700px;
        column-count: 2;
        column-rule: dotted 1px #8C8C8C;
        column-gap: 50px;
    }

        #reservation-form ul.items-list li {
            display: inline-block;
            width: calc(50% - 5px);
            break-inside: avoid-column;
            margin: 0 5px 15px 0;
            vertical-align: top;
        }

        #reservation-form #item_id_cena,
        #reservation-form #item_id_mic,
        #reservation-form #item_id_poznamka {
            width: 100%;
            margin-right: 0;
        }

        #reservation-form #item_id_kurt,
        #reservation-form #item_id_cas_do,
        #reservation-form #item_id_prijmeni,
        #reservation-form #item_id_telefon {
            margin-right: 0;
            margin-left: 5px;
        }

        #reservation-form #item_id_jmeno {
            break-before: column;
        }

            #reservation-form ul.items-list label {
                display: block;
                font-weight: bold;
                margin-bottom: 3px;
            }

            #reservation-form ul.items-list li input:not([type='checkbox']):not([type='submit']),
            #reservation-form ul.items-list li select,
            #reservation-form ul.items-list li textarea {
                min-width: 100%;
            }

            #reservation-form #id_poznamka {
                height: 55px;
                resize: none; 
            }

    #reservation-form input[readonly],
    #reservation-form input[readonly]:focus {
        border: none;
        outline: none;
    }

    #reservation-form #control-buttons {
        text-align: right;
        margin-top: 0;
    }
    
    #reservation-form #submit-it {
        float: right;
        margin: 0 0 0 25px;
    }

    #reservation-form #cancel-it {
        display: inline-block;
        font-size: 1.2em;
        line-height: 34px;
        cursor: pointer;

        &:hover {
            text-decoration: none;        
        }
    }   

    /* form error */

    #reservation-form .phorm_error,
    #reservation-form .phorm_help {
        margin: 0;
    }

    #reservation-form .phorm_error {
        color: #ff0000;
    }

        #reservation-form ul.items-list li .phorm_error li {
            display: block;
            width: unset;
            font-size: 0.9em;
            margin: 0;
        }

    #reservation-form .has_errors {
        background-color: rgba(255, 0, 0, 0.2)
    }


@media (max-width: 640px) {
    .time-line th.court {
        text-align: center;
        padding: 0;
    }
    
    .time-line th.court i {
        display: none;
    }

    h3:has(~ table) {
        margin-bottom: 1em !important;
    }
}

@media (max-width: 768px) {

    /*********************************************************************************/
    /* Gallery                                                                       */
    /*********************************************************************************/
    .galerie a.thumbnail {
        width: auto !important;
    }
        
    /*********************************************************************************/
    /* Online reservation                                                            */
    /*********************************************************************************/

    #label-obdobi {
        top: 5px !important;
        width: 100%;
    }

        #label-obdobi b {
            white-space: nowrap;
            overflow: hidden;
        }

    #legenda {
        position: static !important;
        width: 100%;
    }

        #legenda strong {
            font-size: 0.9em;
        }

    #reservation-form ul.items-list {
        min-width: 85vw !important;
        min-width: 85vw !important;
        column-count: revert !important;
        column-rule: none !important;
        column-gap: 0 !important;
    }

        #reservation-form ul.items-list li {
            display: block !important;
            width: 100% !important;
            margin: 0 0 10px 0 !important;
        }

    table.time-line {
        display: flex;
        flex-wrap: wrap;
    }

        .time-line thead {
            display: flex;
            flex: 0 1 auto;
        }

        .time-line tbody {
            display: flex;
            flex: 1 1 auto;
        }

            .time-line thead tr,
            .time-line tbody tr {
                display: flex;
                flex-direction: column;
            }

            .time-line tr.tr-intervals {
                align-self: flex-end;
            }

            .time-line tr.tr-court {
                flex: 1 1 auto;
            }

                .time-line th.date {
                    width: auto !important;
                }

                    .time-line th.date b {
                        display: none !important;
                    }

                    .time-line th.date span {
                        font-size: 0.95em !important;
                        font-weight: bold !important;
                    }

                .time-line th.hour {
                    padding: 0;
                    height: 60px;
                    line-height: 60px;
                }

                .time-line th.intervals {
                    border-top: 1px solid #8C8C8C;
                }

    /*********************************************************************************/
    /* New user / login / reset / activation / settings form                         */
    /*********************************************************************************/

    #settings-form ul.items-list li,
    #activation-form ul.items-list li,
    #reset-form ul.items-list li,
    #login-form ul.items-list li,
    #registration-form ul.items-list li {
        min-width: 100% !important;
    }

    #login-form p + p {
        display: block;
        text-align: left !important;
    }

    /*********************************************************************************/
    /* Camps reservation                                                             */
    /*********************************************************************************/

    #camp-registration-form ul.items-list li {
        width: 50% !important;
    }

    #camp-registration-form #item_id_id_akce_termin {
        min-width: 100% !important;
    }

    /*********************************************************************************/
    /* Tournament reservation                                                        */
    /*********************************************************************************/

    .item {
        height: auto !important;
    }

        .item .image.left {
            float: none;
            width: 90vw;
            height: 140px;
            margin: 0 0 0.5em 0 !important;
        }

        .item .button {
            position: static !important;
            bottom: auto !important;
        }

    #tournament-detail dt {
        flex-basis: 100%;
    }

    #tournament-registration-form ul.items-list li {
        width: 50% !important;
    }

    #tournament-registration-form #item_id_id_akce_termin {
        min-width: 100% !important;
    }

    /*********************************************************************************/
    /* User's reservation                                                            */
    /*********************************************************************************/

    table.reservations thead {
        position: absolute;
        height: 0;
        visibility: hidden;
    }

    table.reservations tr {
        display: block;
        margin-bottom: 2em;
    }

        table.reservations td {
            display: block;
            border-bottom: 0 !important;
        }

        table.reservations td::before {
            float: left;
            content: attr(data-label);
            width: calc(100% + 10px);
            margin-left: -5px;
            font-weight: bold;
            line-height: 1.6em;
            padding: 0 5px;
            border-bottom: 1px solid rgba(0,0,0,.5);
            background-color: #e5e5e5;
        }

        table.reservations td:has(.button) {
            text-align: left;
            border: none;
        }

            table.reservations td .button {
                margin-top: 8px;
                margin-left: -5px;
            }

    /*********************************************************************************/
    /* Tweaks                                                                        */
    /*********************************************************************************/

    .ui-dialog {
        max-width: 95vw !important;
    }
}    