html,
body {
    height: 100%;
    margin: 0;
}

#content-calendar {
    height: calc(91dvh - 42px);
}

#content-bitacora {
    height: 100dvh;
}

#calendar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#bitacora-container {
    height: 100%;
    width: 100%;
}

.fc-license-message {
    display: none;
}

#calendar {
    width: 100%;
    height: 94%;
}

.bar {
    background-color: #CEE7FF;
    /* Color de fondo de la barra (puedes cambiarlo) */
    color: #000000;
    /* Para centrar el texto verticalmente */
    display: inline-flex;
    /* Cambiado a inline-flex para ajustar el ancho */
    flex-wrap: wrap;
    font-size: 10px;
}

.fc-header-toolbar {
    padding-top: 0;
    padding-left: 1em;
    padding-right: 1em;
}

.fc .fc-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
}

/* .fc .fc-scrollgrid-liquid {
    height: 70% !important;
    min-height: 0;
} */

/* Cuando la ventana es muy pequeña, cambiar a display: grid */


@media (max-width: 768px) {

    #content-calendar {
        height: calc(75dvh - 42px);
    }

    .fc-header-toolbar {
        display: grid !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .fc-toolbar-chunk {
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
    }
}

.fc .fc-button-primary {
    background-color: transparent !important;
    border: #0d6efd solid 1px !important;
    color: #0d6efd !important;
}

.fc .fc-button-primary:hover:not(:disabled) {
    background-color: #0d6efd !important;
    color: #FFFFFF !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #0d6efd !important;
    color: #FFFFFF !important;
}

.infonote {
    color: #007bff;
}

/* Revierte el orden de los botones */
.dhtmlx_popup_controls {
    display: flex;
    flex-direction: row-reverse;
}

/* Coloca el botón de cancelar a la izquierda */
.dhtmlx_popup_button_cancel {
    order: 1;
}

/* Coloca el botón de aceptar a la derecha */
.dhtmlx_popup_button {
    order: 2;
}

/* Quita el radio del borde */
.no_radius {
    border-radius: 0;
}

#tbl_trazabilidad_container {
    height: calc(100dvh - 150px);
}

.fc-col-header-cell-cushion,
.fc-daygrid-day-number,
.fc-event,
.fc-list-day-text,
.fc-list-day-side-text {
    color: #000000;
    text-decoration: none;
}

/* .fc-event-main{
    width: 100%;
} */
/* Cuando el texto del evento es mucho */
.fc-event-main,
.fc-daygrid-event-harness {
    overflow: hidden;
}

.fc-event-main:hover {
    overflow: auto;
}

/* Efecto de cambio de color con variables */
.color-changing {
    animation: colorChange 1s infinite;
}

@keyframes colorChange {

    0%,
    100% {
        color: var(--start-color);
    }

    50% {
        color: white;
    }
}

/* Colores específicos para cada clase */
.color-changing-saldo {
    --start-color: red;
}

.color-changing-presupuesto {
    --start-color: green;
}

.fc .fc-event,
.fc .fc-scrollgrid table tbody tr {
    height: 100px;
}

/* Asegura que el evento se ajuste a la altura de su contenedor */
.fc .fc-event {
    height: 100%;
}

.custom-tooltip {
    --bs-tooltip-bg: #FFFFFF;
    --bs-tooltip-color: #000000;
}

.eventLineHeight {
    line-height: 1;
}

.pointer {
    cursor: pointer;
}

.fc-header-toolbar {
    display: none !important;
}

#resultadosLinks {
    max-height: 500px;
    /* Altura máxima del contenedor */
    overflow-y: auto;
    /* Activar scroll vertical */
    border: 1px solid #ddd;
    /* Bordes para mejor visualización */
    padding: 10px;
    background-color: #f9f9f9;
    /* Fondo claro */
    border-radius: 5px;
    /* Bordes redondeados */
}

.fc .fc-col-header-cell-cushion {
    display: block;
    padding: 2px 4px;
    white-space: normal;
    word-wrap: break-word;
}

/* Estilos generales */
#calendar-actions {
    background-color: white;
    border-bottom: 1px solid #ddd;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 992px) {
    #content-calendar {
        height: calc(91dvh - 42px);
    }

    #calendar-actions h2 {
        font-size: 1.1rem;
    }

    #calendar-actions h6 {
        font-size: 0.9rem;
    }

    #calendar-actions .btn {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    #calendar-actions input[type="date"] {
        width: 100%;
        max-width: none;
    }

    /* Que el collapse cubra todo el ancho */
    #mobileActions {
        background-color: #f8f9fa;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 10px;
        margin-top: 5px;
    }
}

/* Móviles promedio */
@media (max-width: 600px) {
    #content-calendar {
        height: calc(91dvh - 42px);
    }
    .fc .fc-event,
    .fc .fc-scrollgrid table tbody tr {
        height: '100px'
    }

    .fc .fc-event {
        height: 100%;
    }
}


/* Móviles pequeños (iPhone SE, etc.) */
@media (max-width: 500px) {
    #content-calendar {
        height: calc(87dvh - 42px);
    }

    .fc .fc-event,
    .fc .fc-scrollgrid table tbody tr {
        height: 200px !important;
    }
}