.jtgcalendar-component {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Leyenda de calendarios: chips redondeados, cada uno actúa también como
   interruptor de filtro (ver calendar.js). El estilo es neutro a propósito
   para no chocar con ninguno de los 5 temas de FullCalendar. */
.jtgcalendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0 0 0 12px;
    list-style: none;
}

.jtgcalendar-legend[hidden] {
    display: none;
}

.jtgcalendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 14px 5px 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;
    background: #fff;
    color: #26272b;
    font: inherit;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease, opacity .15s ease, color .15s ease;
}

.jtgcalendar-legend-item:hover {
    border-color: rgba(0, 0, 0, .16);
    box-shadow: 0 3px 8px rgba(16, 24, 40, .1);
    transform: translateY(-1px);
}

.jtgcalendar-legend-item:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.jtgcalendar-legend-item.is-hidden {
    color: #8b8d98;
    box-shadow: none;
    transform: none;
}

.jtgcalendar-legend-item.is-hidden .jtgcalendar-legend-swatch {
    background: transparent !important;
}

.jtgcalendar-legend-swatch {
    display: inline-block;
    flex: none;
    box-sizing: border-box;
    width: 10px;
    height: 10px;
    border: 2px solid;
    border-radius: 50%;
    transition: background-color .15s ease;
}

.jtgcalendar-toolbar-filter {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .fc-header-toolbar {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .fc-header-toolbar .fc-toolbar-chunk {
        max-width: 100%;
    }

    .jtgcalendar-toolbar-filter {
        font-size: .875rem;
    }
}

.jtgcalendar-filter-modal .modal-content {
    background: #fff;
    color: #212529;
}

.jtgcalendar-filter-modal,
#jtgcalendar-modal {
    z-index: 1055;
}

.jtgcalendar-filter-modal .list-group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    border-radius: 8px;
    border-color: transparent;
    transition: background-color .15s ease;
}

.jtgcalendar-filter-modal .list-group-item:hover {
    background-color: rgba(0, 0, 0, .03);
}

.jtgcalendar-filter-modal .form-check {
    margin: 0;
}

.jtgcalendar-filter-modal .jtgcalendar-legend-swatch {
    width: 12px;
    height: 12px;
}

.modal-classic .modal-content {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-classic .modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-classic .modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

.modal-classic .modal-body {
    padding: 1.5rem;
}

.modal-classic .event-date-badge {
    display: flex;
    flex-direction: column;
    width: auto;
    margin: 0 auto 1.5rem auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    text-align: center;
}

.modal-classic .event-date-badge .badge-header {
    color: #fff;
    padding: 0.25rem;
    font-size: 0.9em;
    font-weight: bold;
}

.modal-classic .event-date-badge .badge-body {
    padding: 0.5rem;
    background: #fff;
}

.modal-classic .event-date-badge .day-number {
    font-size: 2.2em;
    font-weight: 700;
    line-height: 1.1;
    color: #212529;
}

.modal-classic .event-date-badge .month-number {
    font-size: 1em;
    line-height: 1;
    color: #6c757d;
}

.modal-classic .event-date-badge .year-number {
    display: none;
}

.modal-classic .event-meta-info .meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95em;
}

.modal-classic .event-meta-info .meta-item:not(:last-child) {
    margin-bottom: 0.75rem;
}

.modal-classic .event-meta-info .meta-icon {
    flex-shrink: 0;
}

.modal-classic .event-meta-info .meta-content {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.modal-classic .event-meta-info .meta-label {
    font-size: 0.8em;
    color: #6c757d;
    text-transform: uppercase;
}

.modal-classic .event-meta-info .meta-value {
    font-weight: 500;
    color: #212529;
}

#jtgcalendar {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    min-height: 700px;
}

.jtgcalendar-shell {
    position: relative;
}

.jtgcalendar-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(255, 255, 255, .72);
    pointer-events: none;
}

.jtgcalendar-loading[hidden] {
    display: none;
}

.jtgcalendar-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: .25rem solid rgba(13, 110, 253, .2);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: jtgcalendar-spin .75s linear infinite;
}

@keyframes jtgcalendar-spin {
    to {
        transform: rotate(360deg);
    }
}

.fc-toolbar-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.fc-event {
    cursor: pointer;
    border: 0;
    box-shadow: none;
}

.fc-event-title {
    font-weight: 600;
}

.jtgcalendar-empty {
    padding: 20px;
    border: 1px dashed #d0d0d0;
    background: #fafafa;
    border-radius: 8px;
    color: #666;
}

.jtgcalendar-event-meta {
    margin-top: 12px;
    font-size: 0.95rem;
    color: #444;
}

.jtgcalendar-event-meta strong {
    display: inline-block;
    min-width: 100px;
}

.jtgcalendar-event-description {
    margin-top: 16px;
    line-height: 1.6;
}
