/* ==========================================================
   CALENDAR CELLS
   ========================================================== */

.calendar-day {

    position: relative;

    aspect-ratio: 1;

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, .03),
            rgba(255, 255, 255, .01)),
        var(--surface);

    border-radius: 28px;

    border: 1px solid var(--border);

    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: center;

    min-height: 44px;
    padding: 6px 4px 7px;

    cursor: pointer;

    transition: .2s ease;

    box-shadow:
        0 10px 22px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .05);

    overflow: hidden;

    width: 100%;
    aspect-ratio: 1;
    justify-self: center;

}

.calendar-day:hover {

    transform:
        translateY(-3px) scale(1.03);

    border-color: rgba(255, 175, 119, .35);
    box-shadow:

        0 16px 30px rgba(0, 0, 0, .35),

        0 0 0 1px rgba(255, 175, 119, .12);

}

.calendar-day.other-month {

    opacity: .35;

}

.calendar-day.today {

    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, .03),
            rgba(255, 255, 255, .01)),
        var(--surface);

    color: var(--text);

    border-color: #ffaf77;

}

/* ================= NUMBER ================= */

.day-number {

    align-self: center;
    font-size: clamp(14px, 4vw, 16px);

    font-weight: 700;

    line-height: 1.2;

    z-index: 2;

}

/* ================= EVENTS ================= */

.event-dot {
    position: static;
    align-self: end;
    margin-top: 2px;

    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: #ff6900;

    z-index: 2;
}

/* ================= EVENT COUNT ================= */

.event-count {

    position: absolute;

    left: 8px;

    top: 8px;

    min-width: 18px;

    height: 18px;

    border-radius: 999px;

    background: var(--primary);

    color: #3d2518;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 11px;

    font-weight: 700;

}

/* ================= EMPTY STATE ================= */

.empty-state {

    margin-top: 60px;

    text-align: center;

    color: var(--text-secondary);

}

.empty-state h2 {

    margin-top: 16px;

    margin-bottom: 10px;

    color: var(--text);

    font-size: 24px;

}

.empty-state p {

    line-height: 1.6;

}

@media (max-width:540px) {

    .calendar-grid {
        gap: clamp(6px, 2vw, 8px);
    }

    .calendar-day {
        border-radius: 16px;
        min-height: 44px;
    }

    .day-number {
        font-size: 15px;
    }

}

@media (min-width: 541px) {
    .calendar-day {
        min-height: 56px;
        padding: 9px 6px;
    }

    .event-dot {
        width: 8px;
        height: 8px;
    }
}

@media (min-width: 600px) {
    .calendar-grid {
        grid-auto-rows: clamp(60px, 8vw, 72px);
    }

    .calendar-day {
        aspect-ratio: auto;
        min-height: 0;
        height: 100%;
        padding: 8px 6px;
        border-radius: 20px;
    }

    .day-number {
        font-size: clamp(17px, 2.25vw, 20px);
    }

    .event-dot {
        width: 9px;
        height: 9px;
        margin-top: 3px;
    }
}

.event-dot.past { background: #ffb17a; opacity: 1; }
