/* MFV Calendar View Toggle — Prompt 5 */

/* ── Toggle buttons (calendar + map) ────────────────────────────── */
.mfv-view-btn--calendar,
.mfv-view-btn--map {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s;
}

/* ── Calendar mount container ───────────────────────────────────── */
/* Lives inside .finder-listings (before .results-view), same as
   grid/list. Normal document flow — map stays visible on the right. */
#mfv-calendar-mount {
    width: 100%;
    padding: 16px 0 40px;
    background: #fff;
}

/* ── Error message ──────────────────────────────────────────────── */
.mfv-calendar-error {
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* ── Loading spinner ─────────────────────────────────────────────── */
.mfv-calendar-loading { opacity: 0.6; pointer-events: none; }
.mfv-calendar-loading::after {
    content: '';
    display: block;
    margin: 20px auto;
    width: 32px; height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--mfl-primary, #0e7490);
    border-radius: 50%;
    animation: mfv-spin 0.8s linear infinite;
}
@keyframes mfv-spin { to { transform: rotate(360deg); } }

/* ── FullCalendar theme overrides ───────────────────────────────── */
#mfv-calendar-mount .fc-toolbar-title {
    font-size: 18px;
    font-weight: 600;
}

#mfv-calendar-mount .fc-button-primary {
    background-color: var(--mfl-primary, #0e7490);
    border-color:     var(--mfl-primary, #0e7490);
}
#mfv-calendar-mount .fc-button-primary:hover,
#mfv-calendar-mount .fc-button-primary:not(:disabled):active,
#mfv-calendar-mount .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #0c6278;
    border-color:     #0c6278;
}

/* ── Event blocks — light yellow, dark text ─────────────────────── */
#mfv-calendar-mount .fc-event {
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 5px;
    background-color: #fef08a !important; /* light yellow */
    border-color:     #eab308 !important; /* amber border */
    color:            #713f12 !important; /* dark brown text — high contrast */
}
#mfv-calendar-mount .fc-event .fc-event-title,
#mfv-calendar-mount .fc-event .fc-event-time {
    color: #713f12 !important;
}
#mfv-calendar-mount .fc-event:hover {
    background-color: #fde047 !important;
    border-color:     #ca8a04 !important;
}

/* ── List Month view event rows ─────────────────────────────────── */
#mfv-calendar-mount .fc-list-event:hover td {
    background: #fef9c3;
}
#mfv-calendar-mount .fc-list-event-dot {
    border-color: #eab308 !important;
}

/* ── Tooltip ─────────────────────────────────────────────────────── */
#mfv-cal-tooltip {
    display: none;
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 12px 14px;
    max-width: 260px;
    min-width: 180px;
    pointer-events: none;
    font-family: inherit;
}

.mfv-cal-tooltip__title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.3;
}

.mfv-cal-tooltip__date,
.mfv-cal-tooltip__location {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 11px;
    color: #4b5563;
    margin-bottom: 3px;
    line-height: 1.4;
}

.mfv-cal-tooltip__date svg,
.mfv-cal-tooltip__location svg {
    flex-shrink: 0;
    margin-top: 1px;
    fill: #6b7280;
}

.mfv-cal-tooltip__tagline {
    font-size: 11px;
    color: #6b7280;
    font-style: italic;
    margin-top: 4px;
    line-height: 1.3;
}

.mfv-cal-tooltip__price {
    font-size: 12px;
    font-weight: 600;
    color: var(--mfl-accent, #f97316);
    margin-top: 5px;
}

.mfv-cal-tooltip__cta {
    font-size: 11px;
    color: var(--mfl-primary, #0e7490);
    font-weight: 600;
    margin-top: 7px;
    border-top: 1px solid #f3f4f6;
    padding-top: 6px;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    #mfv-calendar-mount .fc-toolbar {
        flex-direction: column;
        gap: 8px;
    }
    #mfv-calendar-mount .fc-toolbar-title { font-size: 15px; }
    #mfv-cal-tooltip { display: none !important; } /* disable tooltip on touch */
}
