/* ── MONTH CALENDAR ───────────────────────────────────────── */
.ac-calendar {
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

/* Loading state during AJAX */
.ac-calendar.ac-loading .ac-grid-wrap {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Header */
.ac-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.ac-header-title {
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.ac-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #d0d7de;
    background: transparent;
    color: #374151;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
}
.ac-nav-btn:hover {
    background: #1a3c2e;
    color: #fff;
    border-color: #1a3c2e;
}
/* CSS fallback arrows when no icon is chosen */
.ac-nav-btn.ac-prev:empty::before { content: '←'; }
.ac-nav-btn.ac-next:empty::before { content: '→'; }


.ac-nav-btn svg,
.ac-nav-btn i,
.ac-nav-btn span.eicon,
.ac-nav-btn .elementor-icon {
    pointer-events: none;
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

/* Grid */
.ac-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.ac-grid-wrap {
    position: relative;
    transition: opacity 0.2s;
}

/* Grid lines — opt-in via .ac-has-grid-lines class on .ac-calendar */
.ac-calendar.ac-has-grid-lines .ac-grid {
    gap: 0;
    border-top: 1px solid var(--ac-grid-line-color, #e5e7eb);
    border-left: 1px solid var(--ac-grid-line-color, #e5e7eb);
}
.ac-calendar.ac-has-grid-lines .ac-day,
.ac-calendar.ac-has-grid-lines .ac-weekday,
.ac-calendar.ac-has-grid-lines .ac-empty {
    border-right: 1px solid var(--ac-grid-line-color, #e5e7eb);
    border-bottom: 1px solid var(--ac-grid-line-color, #e5e7eb);
    border-radius: 0;
}

/* Weekday labels */
.ac-weekday {
    text-align: center;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    padding: 4px 0 8px;
}

/* Day cells */
.ac-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    padding: 6px 4px 4px;
    border-radius: 6px;
    box-sizing: border-box;
}
.ac-day.ac-empty { background: transparent !important; }

.ac-day-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.88em;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s;
    z-index: 1;
}
.ac-day-number[href="#"] { pointer-events: none; }

/* Today */
.ac-day.is-today .ac-day-number {
    background: #1a3c2e;
    color: #fff;
    font-weight: 700;
}

/* Event days */
.ac-day.has-events { cursor: pointer; }
.ac-day.has-events .ac-day-number:hover {
    background: rgba(26,60,46,0.12);
}

/* Event dot */
.ac-event-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #1a3c2e;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ── TOOLTIP CARD ─────────────────────────────────────────── */
.ac-tooltip-card {
    display: none;
    position: absolute;
    z-index: 9999;
    left: 50%;
    transform: translateX(-50%);
    background: #1a3c2e;
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    width: 240px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    text-align: left;
    pointer-events: auto;
}
.ac-day.has-events:hover .ac-tooltip-card,
.ac-day.has-events:focus-within .ac-tooltip-card {
    display: block;
}
.ac-tooltip-event { margin-bottom: 10px; }
.ac-tooltip-event:last-child { margin-bottom: 0; }
.ac-tooltip-event-title {
    display: block;
    font-weight: 700;
    font-size: 0.9em;
    color: #fff;
    text-decoration: none;
    margin-bottom: 3px;
}
.ac-tooltip-event-title:hover { text-decoration: underline; }
.ac-tooltip-event-meta { font-size: 0.78em; color: #a8c5b8; margin-bottom: 3px; }
.ac-tooltip-event-desc { font-size: 0.75em; color: #d4e8e0; line-height: 1.45; }
.ac-tooltip-divider { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 8px 0; }

/* ── LIST VIEW ────────────────────────────────────────────── */
.ac-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

.ac-list-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    /* No default shadow — add via Elementor controls */
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s, transform 0.2s;
}

/* Featured Image — full width at TOP */
.ac-list-image {
    width: 100%;
    flex-shrink: 0;
}
.ac-list-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.ac-image-placeholder {
    width: 100%;
    height: 160px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.9em;
    gap: 6px;
}

/* Body below image */
.ac-list-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    flex: 1;
}

/* Date Badge */
.ac-list-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a3c2e;
    color: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 60px;
    flex-shrink: 0;
    text-align: center;
}
.ac-list-date-month {
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a8c5b8;
    line-height: 1;
    margin-bottom: 2px;
}
.ac-list-date-day {
    font-size: 1.8em;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}
.ac-list-date-time {
    font-size: 0.65em;
    color: #a8c5b8;
    margin-top: 4px;
    line-height: 1.3;
    text-align: center;
}

/* Card content */
.ac-list-content { flex: 1; min-width: 0; }

.ac-list-title { margin: 0 0 8px; font-size: 1.05em; line-height: 1.35; }
.ac-list-title a { color: inherit; text-decoration: none; font-weight: 700; }
.ac-list-title a:hover { text-decoration: underline; }

.ac-list-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82em;
    color: #6b7280;
    margin-bottom: 5px;
}
.ac-list-meta i,
.ac-list-meta svg,
.ac-meta-icon {
    font-size: 0.9em;
    width: 14px;
    flex-shrink: 0;
    color: #6b7280;
}

.ac-list-desc {
    font-size: 0.85em;
    color: #6b7280;
    margin: 8px 0 0;
    line-height: 1.55;
}

.ac-no-events { color: #9ca3af; font-style: italic; padding: 20px 0; }

/* ── LIST PAGINATION ──────────────────────────────────────── */
.ac-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}
.ac-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    background: #1a3c2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
    line-height: 1;
}
.ac-page-btn:hover { background: #2a5c46; color: #fff; }
.ac-page-btn:disabled,
.ac-page-btn.ac-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}
.ac-page-btn svg,
.ac-page-btn i {
    font-size: 0.85em;
    line-height: 1;
}
.ac-page-info {
    font-size: 0.85em;
    color: #6b7280;
    white-space: nowrap;
}

/* ── ADD TO CALENDAR BUTTON ───────────────────────────────── */
.ac-add-cal-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
/* Remove Elementor's default block display so wrapper hugs the button */
.elementor-widget-agency_add_to_calendar {
    display: inline-block;
    width: auto;
}
.ac-add-cal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #1a3c2e;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95em;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.ac-add-cal-btn:hover { background: #2a5c46; color: #fff; }
.ac-add-cal-btn i, .ac-add-cal-btn svg { font-size: 1em; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .ac-list { grid-template-columns: 1fr !important; }
    .ac-tooltip-card { width: 200px; font-size: 0.88em; }
}
@media (max-width: 480px) {
    .ac-weekday { font-size: 0.6em; letter-spacing: 0; }
    .ac-day { min-height: 36px; padding: 4px 2px; }
    .ac-day-number { width: 26px; height: 26px; font-size: 0.8em; }
    .ac-list-body { gap: 10px; padding: 12px; }
    .ac-list-date-badge { min-width: 50px; padding: 8px; }
    .ac-list-date-day { font-size: 1.5em; }
}

