﻿.toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background-color: var(--bs-body-bg);
    border-radius: 8px;
    width: 100%;
}

/* Encabezado del toolbar: Botón - Etiqueta - Botón */
.toolbar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

/* Botones de navegación */
.nav-btn {
    padding: 8px 12px;
    border: none;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

    .nav-btn:hover {
        background-color: #005a9e;
    }

/* Etiqueta del mes */
.month-label {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Contenedor de la leyenda */
.legend {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Elementos de la leyenda */
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Cajas de colores */
.color-box {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--bs-body-color) !important;
}

.present {
    background-color: green;
}

.absent {
    background-color: red;
}

.late {
    background-color: yellow;
}

.license {
    background-color: blue;
}

/* RESPONSIVE DESIGN */

/* Para pantallas menores a 768px (móviles) */
@media (max-width: 768px) {
    .toolbar {
        padding: 10px;
    }

    .toolbar-header {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .legend {
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
}


.table-desktop {
    width: 100%;
    border-collapse: collapse;
}

    .table-desktop tr th {
        background-color: var(--bs-body-color);
        color: var(--bs-body-bg);
        border: 1px solid #ccc;
        padding: 5px;
    }

    .table-desktop tr th {
        border: 1px solid #ccc;
        padding: 5px;
    }

    .table-desktop td {
        border: 1px solid #ccc;
        padding: 5px;
    }

    .table-desktop tr:nth-of-type(even) {
        background-color: #299fdf;
    }

.table-mobile {
    display: none;
    width: 100%;
}

    .table-mobile .fila .columna {
        display: flex;
    }

        .table-mobile .fila .columna .header,
        .table-mobile .fila .columna .contenido {
            border: 1px solid #ccc;
            border-bottom: none;
            padding: 10px;
        }

        .table-mobile .fila .columna .header {
            width: 40%;
            font-weight: bold;
            background-color: var(--bs-body-color);
            color: var(--bs-body-bg);
        }

        .table-mobile .fila .columna .contenido {
            width: 60%;
            background-color: var(--bs-body-bg);
            color: var(--bs-body-color);
        }

    .table-mobile .fila:nth-of-type(even) .columna .contenido {
        background-color: #299fdf;
    }

    .table-mobile .fila .columna:last-of-type .header,
    .table-mobile .fila .columna:last-of-type .contenido {
        border-bottom: 1px solid #ccc;
    }

@media (max-width: 500px) {
    .table-mobile {
        display: block;
    }

    .table-desktop {
        display: none;
    }
}

.scheduler {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: 0;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: var(--bs-body-bg) !important;
}

    .scheduler > .header > .actions {
        padding: 10px;
        display: flex;
        justify-content: space-between;
        background-color: var(--bs-body-bg) !important;
    }

        .scheduler > .header > .actions > .navigation > .selected-month {
            width: 160px;
            display: inline-block;
            text-align: center;
            font-size: 1.25rem;
            vertical-align: middle;
        }

        .scheduler > .header > .actions .btn {
            background-color: #ddd;
            border: none;
            color: black;
            text-align: center;
            text-decoration: none;
            display: inline-block;
        }

            .scheduler > .header > .actions .btn:focus {
                outline: none;
            }

        .scheduler > .header > .actions .icon-btn {
            background: initial;
            border-radius: 50%;
        }

            .scheduler > .header > .actions .icon-btn:hover {
                background-color: #ddd;
            }

            .scheduler > .header > .actions .icon-btn > svg {
                width: 1em;
                height: 1em;
                fill: currentColor;
                font-size: 1.5rem;
                margin: -6px;
            }

    .scheduler > .month {
        display: flex;
        flex-direction: column;
    }

        .scheduler > .month > .week {
            position: relative;
        }

        .scheduler > .month > div:not(:last-of-type) {
            border-bottom: 1px solid #eee;
        }

        .scheduler > .month > .week > .days {
            display: flex;
            justify-content: space-around;
            height: max(8.313rem, calc(1.5rem + 5px + 8px + var(--maxAppointments) * 1.5rem));
        }

        .scheduler > .month > .week.header {
            display: flex;
            justify-content: space-around;
            border-bottom: 1px solid #eee;
            border-top: 1px solid #eee !important;
        }

            .scheduler > .month > .week.header > .day-of-month {
                background-color: var(--bs-body-bg) !important;
                text-align: center;
                font-weight: bold;
                flex: 1;
            }


                .scheduler > .month > .week.header > .day-of-month > .short-dayname {
                    display: none;
                }

            .scheduler > .month > .week.header > div:not(:last-of-type) {
                border-right: 1px solid #eee !important;
            }

        .scheduler > .month > .week > .days > .day {
            background-color: var(--bs-body-bg) !important;
            flex: 1;
            text-align: center;
        }

        .scheduler > .month > .week > .days > div:not(:last-of-type) {
            border-right: 1px solid #eee;
        }

        .scheduler > .month > .week > .days > .day > span {
            margin-top: 5px;
            font-size: .9rem;
            font-size: .75rem;
            display: inline-block;
            background-color: inherit !important;
            text-align: center;
            border-radius: 50%;
            --size: 1.5rem;
            min-width: var(--size);
            height: var(--size);
            line-height: var(--size);
        }

        .scheduler > .month > .week > .days > .day.diff-month {
            background-color: #b1b1b1 !important;
            color: var(--bs-body-color) !important;
        }

        .scheduler > .month > .week > .appointments > .appointment {
            position: absolute;
            left: calc(var(--start) / 7 * 100%);
            top: max(10px, calc(15px + (var(--order) * 1.5rem)));
            border-radius: 2px;
            margin-left: 2px;
            width: calc((var(--end) - var(--start) + 1) / 7 * 100% - 4px);
            padding-left: 4px;
            font-size: .95rem;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

            .scheduler > .month > .week > .appointments > .appointment.new-appointment {
                top: 30px;
                z-index: 1;
                box-shadow: 3px 6px 6px rgb(0 0 0 / 50%);
            }

        .scheduler > .month > .week > .appointments > .appointment-timed {
            background-color: var(--bs-body-bg) !important;
            width: calc(100% / 7 - 4px);
        }


            .scheduler > .month > .week > .appointments > .appointment-timed.new-appointment {
                border: 1px solid #eee;
            }

        .scheduler > .month > .week > .appointments > .appointment > .dot {
            --size: 7px;
            display: inline-block;
            width: var(--size);
            height: var(--size);
            line-height: 1rem;
            vertical-align: middle;
            border-radius: 50%;
            background-color: red;
        }

.scheduler-loader,
.scheduler-loader:after {
    border-radius: 50%;
    width: var(--size);
    height: var(--size);
}

.scheduler-loader {
    border-top: calc(var(--size)/10) solid var(--color1);
    border-right: calc(var(--size)/10) solid var(--color2);
    border-bottom: calc(var(--size)/10) solid var(--color2);
    border-left: calc(var(--size)/10) solid var(--color2);
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation: scheduler-loader-anim 1.1s infinite linear;
    animation: scheduler-loader-anim 1.1s infinite linear;
}

@-webkit-keyframes scheduler-loader-anim {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes scheduler-loader-anim {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@media only screen and (max-width: 550px) {
    .scheduler > .month > .week.header > .day-of-month > .full-dayname {
        display: none;
    }

    .scheduler > .month > .week.header > .day-of-month > .short-dayname {
        display: initial;
    }
}
