/*
 * Shared FullCalendar overrides for the PKG calendar (admin view:
 * views/admin/kalendar_pkg.php, public view: pkgcalendar.php). FullCalendar's
 * defaults truncate event titles/times to one line and hide overflow behind
 * a "+N more" link once a day cell fills up - this makes titles wrap fully
 * and lets day cells grow instead, so nothing gets cut off.
 */
.fc .fc-daygrid-event {
    white-space: normal;
    align-items: flex-start;
}
/*
 * FullCalendar's default lays [time][title] out side by side in one flex
 * row, which squeezes the time text (clipping it mid-character, e.g. "07::")
 * once the title needs the rest of the width. Stacking them - time on its
 * own line, title below - gives each the full event width instead, so
 * neither has to shrink to make room for the other.
 */
.fc .fc-daygrid-event .fc-event-main-frame {
    flex-direction: column;
    align-items: flex-start;
}
.fc .fc-daygrid-event .fc-event-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
}
.fc .fc-daygrid-event .fc-event-time {
    flex-shrink: 0;
    overflow: visible;
    white-space: nowrap;
    font-weight: 600;
}
.fc .fc-daygrid-day-frame {
    min-height: 90px;
}
.fc .fc-daygrid-day-events {
    min-height: unset;
}
.fc .fc-list-event-title,
.fc .fc-list-event-time {
    white-space: normal;
}
.fc .fc-popover {
    max-width: 320px;
}
.fc .fc-popover .fc-event-title {
    white-space: normal;
}

/*
 * Event text size, adjustable via the A-/A+ toolbar buttons (see the
 * calendar init script). Defaults to 12px - smaller than FullCalendar's
 * default, since the wrapped/stacked layout above already takes more
 * vertical space than the old single truncated line did.
 */
.fc .fc-daygrid-event .fc-event-title,
.fc .fc-daygrid-event .fc-event-time,
.fc .fc-list-event-title,
.fc .fc-list-event-time,
.fc .fc-popover .fc-event-title {
    font-size: var(--pkgcal-event-font-size, 12px);
}

/*
 * "Clean minimal" theme (Google Calendar-style): pastel event pills with a
 * solid left accent bar instead of solid fill blocks, soft gridlines, a
 * gentle today highlight with a circular date badge, and ghost-style
 * toolbar buttons. Event backgroundColor/textColor/borderColor are set
 * per-PKG server-side (PkgCalendarController::PKG_VENUE_COLORS) - this
 * only shapes how those colors are presented.
 */
.fc {
    --fc-border-color: #e2e8f0;
    --fc-page-bg-color: #ffffff;
    --fc-neutral-bg-color: #f8fafc;
    --fc-today-bg-color: #eff6ff;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.fc .fc-toolbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
}
.fc .fc-col-header-cell-cushion {
    padding: 8px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Event pills: pastel fill, accent-colored left bar only, rounded, lift on hover. */
.fc .fc-daygrid-event {
    border-width: 0 !important;
    border-left-width: 4px !important;
    border-style: solid !important;
    border-radius: 6px;
    padding: 3px 8px;
    margin: 2px 4px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.fc .fc-daygrid-event:hover {
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
    cursor: pointer;
}
.fc .fc-daygrid-day-frame {
    padding: 2px;
}
.fc .fc-daygrid-day.fc-day-today {
    background-color: var(--fc-today-bg-color);
}

/* Today's date number gets a small filled circle badge, like Google Calendar. */
.fc .fc-daygrid-day-top {
    padding: 4px 6px;
}
.fc .fc-day-today .fc-daygrid-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

/* Ghost-style toolbar buttons instead of FullCalendar's default solid-filled ones. */
.fc .fc-button {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-weight: 600;
    text-transform: none;
    box-shadow: none !important;
    border-radius: 8px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.fc .fc-button:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
.fc .fc-button:disabled {
    opacity: 0.4;
}
