/* =========================
   VARIABLES DE COLOR
   ========================= */
:root {
    --green: #3BBFAD;
    --green-soft: rgba(59, 191, 173, 0.15);
    --green-glow: rgba(59, 191, 173, 0.35);

    --blue: #2D728F;
    --blue-soft: rgba(45, 114, 143, 0.15);

    --dark: #575756;
    --dark-soft: rgba(87, 87, 86, 0.6);

    --bg: #ffffff;
}

/* =========================
   CALENDARIO CONTENEDOR
   ========================= */
#acf-calendar {
    width: 450px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 14px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(0, 0, 0, 0.04);
    padding: 18px;
    font-family: inherit;
}

/* =========================
   CABECERA
   ========================= */
.acf-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.acf-calendar-header button {
    background: var(--green-soft);
    border: none;
    color: var(--green);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.acf-calendar-header button:hover {
    background: var(--green);
    color: #fff;
    box-shadow: 0 0 0 6px var(--green-soft);
}

.acf-calendar-header .month-year {
    font-weight: 600;
    font-size: 15px;
    color: var(--dark);
    text-transform: capitalize;
}

/* =========================
   GRID DEL CALENDARIO
   ========================= */
.acf-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    width: 100%;
}

/* =========================
   DÍAS
   ========================= */
.day,
.empty {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 10px;
}

.empty {
    pointer-events: none;
}

.day {
    color: var(--dark);
    cursor: default;
    transition: all 0.25s ease;
}

/* Hover general */
.day:not(.has-event):hover {
    background: rgba(0, 0, 0, 0.04);
}

/* =========================
   DÍAS CON EVENTO
   ========================= */
.day.has-event {
    background: var(--green-soft);
    color: var(--green);
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.day.has-event::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
}

.day.has-event:hover {
    background: var(--green);
    color: #fff;
    box-shadow:
        0 8px 20px var(--green-glow),
        inset 0 0 0 1px rgba(255,255,255,0.2);
}

/* =========================
   POPUP OVERLAY
   ========================= */
#acf-event-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

#acf-event-popup .popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(45, 114, 143, 0.65);
    backdrop-filter: blur(3px);
}

/* =========================
   POPUP CONTENIDO
   ========================= */
#acf-event-popup .popup-content {
    position: relative;
    background: #fff;
    width: 92%;
    max-width: 720px;
    margin: 6vh auto;
    border-radius: 16px;
    padding: 26px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.25);
    max-height: 88vh;
    overflow-y: auto;
}

/* =========================
   BOTÓN CERRAR
   ========================= */
.close-popup {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: var(--dark-soft);
    transition: color 0.2s ease;
}

.close-popup:hover {
    color: var(--dark);
}

/* =========================
   EVENTOS EN POPUP
   ========================= */
.event-item {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--blue-soft);
    margin-bottom: 12px;
    border-left: 4px solid var(--blue);
}

.event-item h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--blue);
}

.event-item p {
    margin: 2px 0;
    font-size: 13px;
    color: var(--dark);
}
