body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* SPINNER DE CARGA */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.spinner-overlay.hidden {
    display: none;
}

.spinner-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-content p {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
}

.container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.calendar-wrapper {
    width: 85%;
}

.calendar {
    height: fit-content;
    border: 1px solid #ccc;
}

/* ocultar horas */
.fc-timegrid-axis,
.fc-timegrid-slot-label {
    display: none;
}

.fc-scroller {
  overflow: hidden !important;
}

.fc-view-harness, .fc-view-harness-passive {
    height: 100% !important;
}

/* modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    max-height: 100vh;
    overflow: auto;
    padding: 10px;
}

.modal-content {
    background: white;
    padding: 20px;
    width: 300px;
    border-radius: 6px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content input {
    width: 100%;
    margin-bottom: 10px;
}

.modal-content button {
    width: 100%;
    margin-top: 10px;
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-box {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-block;
  cursor: pointer;
  border: 2px solid #ccc;
}

input[type="radio"] {
  display: none;
}

input[type="radio"]:checked + .color-box {
  border: 3px solid black;
}

.fin-de-semana {
    background-color: #f3f3f3 !important;
}

.fc .fc-toolbar.fc-header-toolbar{
    margin-bottom: 0px;
}

/* =========================
   MEDIA QUERIES - MOBILE
========================= */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 0 !important;
    }

    .nav-calendarios {
        display: flex;
        gap: 10px;
        justify-content: center;
        margin-bottom: 15px;
    }

    .nav-calendarios button {
        flex: 1;
        max-width: 120px;
        padding: 10px 20px !important;
        font-size: 20px !important;
        font-weight: bold;
    }

    .nav-calendarios button:nth-child(3) {
        margin-left: 35px;
    }

    .calendar-wrapper {
        width: 100% !important;
        margin-bottom: 15px;
    }

    .calendar-wrapper h2 {
        font-size: 18px !important;
        margin-bottom: 10px;
        text-align: center;
    }

    .calendar {
        font-size: 12px;
    }

    .fc .fc-button-primary {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }

    .fc .fc-daygrid-day-number {
        font-size: 12px !important;
        padding: 4px 2px !important;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 60px !important;
    }

    .fc .fc-event {
        font-size: 11px !important;
        padding: 2px !important;
    }

    .fc .fc-event-title {
        font-weight: bold;
        padding: 2px !important;
    }

    /* Botones de acciones */
    .container > div:last-child {
        display: flex;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }

    .container > div:last-child button {
        flex: 1;
        padding: 12px 15px !important;
        font-size: 14px !important;
        font-weight: bold;
    }

    /* MODAL Mobile */
    .modal {
        padding: 15px;
    }

    .modal-content {
        width: 100% !important;
        padding: 15px !important;
        border-radius: 10px;
    }

    .modal-content h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .modal-content label {
        display: block;
        font-size: 14px;
        font-weight: bold;
        margin: 12px 0 5px 0;
    }

    .modal-content input,
    .modal-content select {
        width: 100%;
        padding: 10px !important;
        font-size: 16px !important;
        margin-bottom: 12px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }

    .modal-content button {
        width: 100%;
        padding: 12px !important;
        margin-top: 10px !important;
        font-size: 14px !important;
        font-weight: bold;
    }

    .color-options {
        display: flex;
        gap: 15px;
        margin: 15px 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .color-box {
        width: 40px !important;
        height: 40px !important;
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .calendar-wrapper h2 {
        font-size: 16px !important;
    }

    .nav-calendarios {
        gap: 8px;
    }

    .nav-calendarios button {
        font-size: 18px !important;
        padding: 8px 18px !important;
    }

    .nav-calendarios button:nth-child(3) {
        margin-left: 28px;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 50px !important;
    }

    .modal-content {
        padding: 12px !important;
    }

    .container > div:last-child button {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
}