/* max-width and centering now on .rave-layout */
.ra-volunteer-calendar {
}

/* FullCalendar toolbar button colours — Rural Aid green */
.ra-volunteer-calendar .fc-button-primary {
    background-color: #8dc63f !important;
    border-color: #7ab332 !important;
    color: #fff !important;
}

.ra-volunteer-calendar .fc-button-primary:hover {
    background-color: #7ab332 !important;
    border-color: #6a9e2a !important;
}

.ra-volunteer-calendar .fc-button-primary:not(:disabled).fc-button-active,
.ra-volunteer-calendar .fc-button-primary:not(:disabled):active {
    background-color: #4c5e2a !important;
    border-color: #4c5e2a !important;
}

/* Popup backdrop */
.rave-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Popup container */
.rave-popup {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    font-family: inherit;
}

/* Popup header */
.rave-popup__header {
    background: #4c5e2a;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.rave-popup__title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.rave-popup__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.rave-popup__close:hover {
    color: #fff;
}

.rave-popup__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Status badge */
.rave-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 12px;
}

.rave-badge--ongoing {
    background: #8dc63f;
    color: #fff;
}

.rave-badge--ended {
    background: #aaaaaa;
    color: #fff;
}

/* Popup body */
.rave-popup__body {
    padding: 16px 20px 20px;
}

.rave-popup__date {
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
}

.rave-popup__desc {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    margin: 0 0 16px;
}

/* CTA button */
.rave-popup__btn {
    display: block;
    background: #8dc63f;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}

.rave-popup__btn:hover {
    background: #7ab332;
    color: #fff;
    text-decoration: none;
}

.rave-popup__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .rave-popup__btn {
        transition: none;
    }
}

/* =====================================================
   Two-column layout
   ===================================================== */
.rave-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.rave-calendar-col {
    flex: 1 1 0;
    min-width: 0;
}

/* =====================================================
   Upcoming events sidebar
   ===================================================== */
.rave-sidebar {
    flex: 0 0 280px;
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.rave-sidebar__header {
    background: #4c5e2a;
    padding: 14px 16px;
    border-radius: 7px 7px 0 0;
    position: sticky;
    top: 0;
}

.rave-sidebar__title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    margin: 0;
}

.rave-sidebar__range {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    margin-top: 2px;
}

.rave-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rave-sidebar__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s;
}

.rave-sidebar__item:last-child {
    border-bottom: none;
}

.rave-sidebar__item:hover {
    background: #f4f9ec;
}

.rave-sidebar__item:focus-visible {
    outline: 2px solid #4c5e2a;
    outline-offset: -2px;
}

.rave-sidebar__badge {
    flex-shrink: 0;
    width: 44px;
    border-radius: 6px;
    text-align: center;
    padding: 4px 0;
    color: #fff;
}

.rave-sidebar__month {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.rave-sidebar__day {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.rave-sidebar__info {
    min-width: 0;
}

.rave-sidebar__name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rave-sidebar__dates {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.rave-sidebar__empty {
    padding: 16px 14px;
    font-size: 13px;
    color: #999;
    font-style: italic;
}

@media (max-width: 768px) {
    .rave-layout {
        flex-direction: column;
    }

    .rave-sidebar {
        flex: none;
        width: 100%;
        max-height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rave-sidebar__item {
        transition: none;
    }
}
