/* =========================================
   WP Events — Mini Calendar
   ========================================= */

.wpe-calendar-wrap {
    position: relative;
    display: inline-block;
    font-family: -apple-system, 'Segoe UI', sans-serif;
}

.wpe-calendar {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    padding: 20px 22px 16px;
    min-width: 290px;
    user-select: none;
}

/* Header: arrows + month label */
.wpe-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.wpe-month-label {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: .3px;
    text-transform: capitalize;
}

.wpe-arrow {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    padding: 0 4px;
    transition: opacity .15s, transform .15s;
    /* color injected dynamically via JS */
}
.wpe-arrow:hover { opacity: .6; transform: scale(1.15); }

/* Day-of-week names */
.wpe-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}
.wpe-day-names span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Day cells */
.wpe-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 0;
}

.wpe-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 34px;
    width: 100%;
    font-size: 13px;
    color: #2d2d3a;
    border-radius: 8px;
    transition: background .15s;
}

.wpe-day.wpe-empty { pointer-events: none; }

.wpe-day.wpe-today {
    background: #f4f4f8;
    font-weight: 700;
    color: #1a1a2e;
}

.wpe-day.wpe-has-event {
    cursor: pointer;
    font-weight: 700;
    /* background + color injected dynamically via JS */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    margin: 2px auto;
}
.wpe-day.wpe-has-event:hover {
    filter: brightness(.92);
}

/* Desktop: slightly larger calendar */
@media (min-width: 768px) {
    .wpe-calendar {
        padding: 26px 28px 22px;
        min-width: 340px;
    }
    .wpe-month-label { font-size: 16px; }
    .wpe-day { height: 40px; font-size: 14px; }
    .wpe-day.wpe-has-event { width: 34px; height: 34px; }
    .wpe-day-names span { font-size: 12px; }
}

/* =========================================
   Upcoming Events List
   ========================================= */
.wpe-upcoming {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: -apple-system, 'Segoe UI', sans-serif;
}

.wpe-upcoming-item {
    display: block;
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid #e8e8ee;
    transition: opacity .15s;
}
.wpe-upcoming-item:first-child { border-top: 1px solid #e8e8ee; }
.wpe-upcoming-item:hover { opacity: .7; }

.wpe-upcoming-date-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.wpe-upcoming-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--wpe-text, #1a1a2e);
    opacity: .55;
}

.wpe-upcoming-time {
    font-size: 11px;
    color: var(--wpe-text, #1a1a2e);
    opacity: .4;
}

.wpe-upcoming-lieu {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--wpe-text, #1a1a2e);
    opacity: .5;
    margin-bottom: 5px;
}

.wpe-upcoming-lieu svg {
    flex-shrink: 0;
    color: var(--wpe-text, #686E75);
}

.wpe-upcoming-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wpe-text, #1a1a2e);
    line-height: 1.3;
}

/* =========================================
   Popup
   ========================================= */
.wpe-event-popup {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    padding: 14px 16px 12px;
    min-width: 200px;
    max-width: 280px;
}

.wpe-popup-date {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #a0a0b0;
    margin-bottom: 10px;
}

.wpe-popup-event {
    display: block;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8f8fb;
    margin-bottom: 6px;
    transition: background .15s;
}
.wpe-popup-event:hover { background: #eeeef6; }

.wpe-popup-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 3px;
}

.wpe-popup-meta {
    display: block;
    font-size: 11px;
    color: #7a7a8c;
}

.wpe-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: #b0b0c0;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.wpe-popup-close:hover { color: #555; }
