/* ============================================================
   events-calendar-addon.css
   Add to / merge into assets/css/events.css
   ============================================================ */

/* ── Calendar wrapper ─────────────────────────────────────── */
.ev-calendar {
    display: none;           /* hidden until user clicks Calendar tab */
}
.ev-calendar.active {
    display: block;
}

/* ── Calendar head ────────────────────────────────────────── */
.ev-calendar-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0 20px;
    border-bottom: 1px solid var(--border, #2a2f3a);
    margin-bottom: 16px;
}

/* Year nav cluster */
.ev-cal-year-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ev-cal-year-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--text-2, #94a3b8);
    min-width: 40px;
    text-align: center;
}
.ev-cal-year-btn {
    font-size: 15px !important;
    padding: 2px 7px !important;
}

/* Month nav cluster */
.ev-cal-month-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.ev-cal-month {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1, #f1f5f9);
    white-space: nowrap;
}
.ev-cal-month em {
    color: var(--accent, #06b6d4);
    font-style: normal;
    margin-right: 4px;
}

/* Today button */
.ev-cal-today {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent, #06b6d4);
    border: 1px solid var(--accent, #06b6d4);
    border-radius: 4px;
    padding: 4px 12px;
    text-decoration: none;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.ev-cal-today:hover {
    background: var(--accent, #06b6d4);
    color: #000;
}

/* Scroll / nav buttons (reuse existing .scroll-btn where possible) */
.scroll-btn,
a.scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border, #2a2f3a);
    background: transparent;
    color: var(--text-2, #94a3b8);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
}
a.scroll-btn:hover,
.scroll-btn:hover {
    border-color: var(--accent, #06b6d4);
    color: var(--accent, #06b6d4);
}

/* ── 7-column grid ────────────────────────────────────────── */
.ev-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--border, #2a2f3a);   /* gap colour */
    border: 1px solid var(--border, #2a2f3a);
    border-radius: 8px;
    overflow: hidden;
}

/* Day-of-week header row */
.ev-cal-dow {
    background: var(--surface-2, #1a1f2e);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
    padding: 8px 4px;
}

/* Day cells */
.ev-cal-cell {
    background: #fff;
    min-height: 90px;
    padding: 6px;
    vertical-align: top;
    position: relative;
}
.ev-cal-blank {
    background: #fff;
}
.ev-cal-today-cell {
    background: #fff;
    outline-offset: -2px;
}
.ev-cal-has-event {
    cursor: default;
}

/* Day number */
.ev-cal-day-num {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2, #94a3b8);
    margin-bottom: 4px;
    line-height: 1;
}
.ev-cal-today-cell .ev-cal-day-num {
    color: var(--accent, #06b6d4);
}

/* Event pills inside cells */
.ev-cal-event-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ev-cal-event-pill {
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    padding: 2px 5px;
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--accent, #06b6d4);
    color: #000;
    transition: opacity .15s;
}
.ev-cal-event-pill:hover { opacity: .85; }

/* Format-specific pill colours */
.ev-cal-fmt-conference    { background: #06b6d4; color: #000; }
.ev-cal-fmt-expo,
.ev-cal-fmt-trade-show    { background: #8b5cf6; color: #fff; }
.ev-cal-fmt-summit        { background: #f59e0b; color: #000; }
.ev-cal-fmt-webinar       { background: #10b981; color: #000; }
.ev-cal-fmt-awards        { background: #f97316; color: #000; }
.ev-cal-fmt-workshop      { background: #ec4899; color: #fff; }

/* "+N more" link */
.ev-cal-more {
    font-size: 10px;
    color: var(--accent, #06b6d4);
    text-decoration: none;
    font-weight: 600;
}
.ev-cal-more:hover { text-decoration: underline; }

/* ── Legend ───────────────────────────────────────────────── */
.ev-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.ev-cal-legend-item {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    /* colour inherited from .ev-cal-fmt-* classes above */
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .ev-cal-cell    { min-height: 56px; padding: 4px; }
    .ev-cal-dow     { font-size: 10px; padding: 5px 2px; }
    .ev-cal-day-num { font-size: 11px; }
    .ev-cal-event-pill { display: none; }   /* too small — show dot instead */
    .ev-cal-has-event::after {
        content: '';
        display: block;
        width: 5px; height: 5px;
        border-radius: 50%;
        background: var(--accent, #06b6d4);
        margin: 2px auto 0;
    }
}
