/* ============================================================
   UDOV static-site-generator styles — calendar component.
   Builds on the theme's CSS variables (--primary, etc.).
   ============================================================ */

.cal-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 0 auto 2.5rem;
    max-width: 1100px;
}

.cal-month {
    background: var(--white, #fff);
    border: 1px solid #e7e2d8;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1rem 1rem 1.25rem;
}

.cal-month-name {
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary, #58A88C);
    margin-bottom: 0.75rem;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-dow {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a8276;
    padding-bottom: 4px;
}

.cal-cell {
    position: relative;
    min-height: 58px;
    border-radius: 8px;
    padding: 4px;
    background: #faf8f3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: var(--text, #2A2A2A);
    border: 1px solid transparent;
}

.cal-empty-cell {
    background: transparent;
}

.cal-num {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b6357;
}

.cal-today {
    border-color: var(--ojai-gold, #C9A961);
}

.cal-today .cal-num {
    background: var(--ojai-gold, #C9A961);
    color: #fff;
    border-radius: 50%;
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a.cal-has-event {
    background: var(--primary-light, #6BC4A6);
    background: linear-gradient(160deg, var(--primary-light, #6BC4A6), var(--primary, #58A88C));
    color: #fff;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

a.cal-has-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(68, 136, 112, 0.35);
}

a.cal-has-event .cal-num {
    color: #fff;
}

.cal-event-pill {
    font-size: 0.62rem;
    line-height: 1.15;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    padding: 2px 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ---- Upcoming list ---- */
.cal-upcoming {
    max-width: 820px;
    margin: 0 auto;
}

.cal-upcoming-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cal-upcoming .event-card {
    scroll-margin-top: 120px;
}

.cal-upcoming .event-card:target {
    outline: 3px solid var(--ojai-gold, #C9A961);
    outline-offset: 3px;
}

.event-desc {
    margin-top: 0.5rem;
    color: #4a463f;
}

.cal-legend {
    text-align: center;
    color: #6b6357;
    font-size: 0.9rem;
    margin: 0 auto 2rem;
}

.cal-legend .swatch {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 3px;
    vertical-align: -1px;
    margin: 0 4px 0 12px;
}

.cal-legend .swatch.event {
    background: var(--primary, #58A88C);
}

.cal-legend .swatch.today {
    background: var(--ojai-gold, #C9A961);
}

.cal-empty {
    text-align: center;
    color: #6b6357;
}

@media (max-width: 600px) {
    .cal-cell { min-height: 48px; }
    .cal-event-pill { font-size: 0.55rem; }
}
