/**
 * Light Events Calendar - Stylesheet
 * Customizable via CSS variables.
 */

/* ─── CSS Variables ─── */
.lec-calendar {
    --lec-primary: #1e3a5f;
    --lec-primary-light: #2d5a8e;
    --lec-bg: #ffffff;
    --lec-border: #e2e8f0;
    --lec-text: #1a202c;
    --lec-text-light: #718096;
    --lec-today: #ebf8ff;
    --lec-hover: #f7fafc;
    --lec-training: #38a169;
    --lec-wedstrijd: #e53e3e;
    --lec-other: #805ad5;
    --lec-radius: 8px;
    --lec-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);

    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--lec-text);
}

/* ─── Header ─── */
.lec-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--lec-primary);
    color: #fff;
    border-radius: var(--lec-radius) var(--lec-radius) 0 0;
}

.lec-month-title {
    font-size: 1.2em;
    font-weight: 700;
    text-transform: capitalize;
}

.lec-nav {
    color: #fff !important;
    text-decoration: none !important;
    padding: 6px 14px;
    border-radius: 4px;
    background: rgba(255,255,255,0.15);
    font-size: 0.9em;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}

.lec-nav:hover {
    background: rgba(255,255,255,0.3);
}

/* ─── Grid ─── */
.lec-calendar-grid {
    border: 1px solid var(--lec-border);
    border-top: none;
    border-radius: 0 0 var(--lec-radius) var(--lec-radius);
    overflow: hidden;
}

.lec-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--lec-primary);
    color: #fff;
}

.lec-weekday {
    padding: 10px;
    text-align: center;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lec-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--lec-bg);
}

/* ─── Day Cells ─── */
.lec-day {
    min-height: 90px;
    border-right: 1px solid var(--lec-border);
    border-bottom: 1px solid var(--lec-border);
    padding: 6px;
    vertical-align: top;
    position: relative;
    transition: background 0.15s;
}

.lec-day:nth-child(7n) {
    border-right: none;
}

.lec-day:hover:not(.lec-day-empty) {
    background: var(--lec-hover);
}

.lec-day-empty {
    background: #f7fafc;
    opacity: 0.5;
}

.lec-today {
    background: var(--lec-today) !important;
}

.lec-today .lec-day-number {
    background: var(--lec-primary);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.lec-day-number {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--lec-text);
    margin-bottom: 4px;
}

/* ─── Events in Calendar ─── */
.lec-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lec-event {
    display: flex;
    gap: 4px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.78em;
    line-height: 1.3;
    color: #fff;
    background: var(--lec-primary);
    cursor: default;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.lec-event:hover {
    opacity: 0.85;
}

.lec-event-time {
    font-weight: 600;
    flex-shrink: 0;
}

.lec-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category colors */
.lec-cat-training {
    background: var(--lec-training) !important;
}

.lec-cat-wedstrijd {
    background: var(--lec-wedstrijd) !important;
}

.lec-cat-other, .leccat-evenement {
    background: var(--lec-other) !important;
}

/* ─── Legend ─── */
.lec-legend {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #f7fafc;
    border-radius: var(--lec-radius);
    font-size: 0.9em;
}

.lec-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lec-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.lec-legend-training {
    background: var(--lec-training);
}

.lec-legend-wedstrijd {
    background: var(--lec-wedstrijd);
}

/* ─── List View ─── */
.lec-event-list {
    max-width: 100%;
    margin: 0 auto;
}

.lec-list-date {
    padding: 10px 0 4px;
    border-bottom: 2px solid var(--lec-primary);
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--lec-primary);
    text-transform: capitalize;
}

.lec-list-item {
    display: flex;
    gap: 16px;
    padding: 12px 14px;
    margin-bottom: 6px;
    background: var(--lec-bg);
    border: 1px solid var(--lec-border);
    border-left: 4px solid var(--lec-primary);
    border-radius: 4px;
    transition: box-shadow 0.15s;
}

.lec-list-item:hover {
    box-shadow: var(--lec-shadow);
}

.lec-list-item.lec-cat-training {
    border-left-color: var(--lec-training);
}

.lec-list-item.lec-cat-wedstrijd {
    border-left-color: var(--lec-wedstrijd);
}

.lec-list-time {
    min-width: 90px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--lec-text-light);
}

.lec-list-title {
    font-weight: 600;
    font-size: 1em;
}

.lec-list-location {
    font-size: 0.85em;
    color: var(--lec-text-light);
    margin-top: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .lec-day {
        min-height: 60px;
        padding: 4px;
    }

    .lec-day-number {
        font-size: 0.8em;
    }

    .lec-event {
        font-size: 0.7em;
        padding: 2px 4px;
    }

    .lec-event-time {
        display: none;
    }

    .lec-weekday {
        font-size: 0.75em;
        padding: 6px 2px;
    }

    .lec-list-item {
        flex-direction: column;
        gap: 4px;
    }
}

/* ─── Single Event Page ─── */
.single-lec_event .lec-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: #f7fafc;
    border-radius: var(--lec-radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--lec-primary);
}

.lec-single-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.lec-single-meta-label {
    font-weight: 600;
    color: var(--lec-text-light);
}
