/* =========================================================
   CALENDAR
   ========================================================= */

.prx-cal {
    width: 100%;
    max-width: 1100px;
}

.prx-cal.is-loading {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(0.1);
}

/* Header */

.prx-cal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.prx-cal__title {
    flex: 1;
    font-weight: 700;
    font-size: clamp(16px, 2vw, 22px);
    text-align: center;
    line-height: 1.2;
    color: inherit;
}

.prx-cal__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-decoration: none;
    user-select: none;
}

/* Weekdays */

.prx-cal__weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    opacity: 0.8;
}

.prx-cal__weekdays>div {
    padding: 6px 8px;
    font-family: var(--typography-p-font-family);
    font-size: var(--typography-p-font-size);
    letter-spacing: var(--typography-p-letter-spacing);
    line-height: var(--typography-p-line-height);
}

/* Grid */

.prx-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.prx-cal__cell {
    position: relative;
    min-height: 110px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.prx-cal__cell--empty {
    border: 0;
    background: transparent;
}

.prx-cal__cell.is-today {
    outline: 2px solid rgb(51, 102, 204);
    background-color: rgba(51, 102, 204, 0.2);
}

/* Day number */

.prx-cal__daynum {
    font-family: var(--typography-p-font-family);
    font-size: var(--typography-p-font-size);
    letter-spacing: var(--typography-p-letter-spacing);
    line-height: var(--typography-p-line-height);
    opacity: 0.85;
}

/* Events */

.prx-cal__events {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.prx-cal__event {
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgb(51, 102, 204);
    background-color: rgb(51, 102, 204);
    color: #fff;
    fill: #fff;
}

.prx-cal__eventline {
    font-family: var(--typography-p-font-family);
    font-size: 0.8em;
    letter-spacing: var(--typography-p-letter-spacing);
    line-height: var(--typography-p-line-height);
}

.prx-cal__eventtime {
    font-weight: 700;
}

.prx-cal__eventtitle {
    font-weight: 400;
}

.prx-cal__eventdesc {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.25;
    opacity: 0.85;
    white-space: normal;
}

/* =========================================================
   MOBILE CALENDAR
   ========================================================= */

@media (max-width: 720px) {
    .prx-cal__grid {
        gap: 6px;
    }

    .prx-cal__cell {
        min-height: 86px;
        padding: 6px;
        border-radius: 10px;
    }

    .prx-cal__weekdays {
        gap: 6px;
        font-size: 12px;
    }

    .prx-cal__nav {
        width: 34px;
        height: 34px;
    }
}

.prx-cal--mobile .prx-cal__weekdays,
.prx-cal--mobile .prx-cal__grid {
    display: none;
}

/* =========================================================
   CALENDAR LIST VIEW
   ========================================================= */

.prx-cal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 720px;
    font-family: var(--typography-p-font-family);
}

.prx-cal-list__item {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 14px;
    padding: 10px 0;
    align-items: start;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.prx-cal-list__date {
    width: 62px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #fff;
    box-shadow:
        0 0 2px rgba(52, 58, 67, 0.1),
        0 2px 5px rgba(52, 58, 67, 0.08),
        0 5px 15px rgba(52, 58, 67, 0.08);
}

.prx-cal-list__mon {
    padding: 6px 0;
    text-align: center;
    font-weight: 700;
    text-transform: lowercase;
    background-color: #3366cc;
    color: #fff;
    box-shadow: 0 2px 0 #3366cc;
}

.prx-cal-list__day {
    padding: 10px 0;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.02);
}

.prx-cal-list__body {
    font-family: var(--typography-p-font-family);
    font-size: var(--typography-p-font-size);
    letter-spacing: var(--typography-p-letter-spacing);
    line-height: var(--typography-p-line-height);
}

.prx-cal-list__title {
    margin: 5px 0 10px;
    font-weight: 800;
}

.prx-cal-list__meta,
.prx-cal-list__desc {
    font-size: 13px;
}

.prx-cal-list__meta {
    opacity: 0.8;
}

.prx-cal-list__desc {
    margin-top: 6px;
    opacity: 0.9;
    line-height: 1.35;
}

@media (max-width: 520px) {
    .prx-cal-list__item {
        grid-template-columns: 54px 1fr;
    }

    .prx-cal-list__day {
        font-size: 20px;
    }
}

/* =========================================================
   AGENDA
   ========================================================= */

.prx-agenda {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 2rem 0;
}

.prx-agenda__day {
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.prx-agenda__daytitle,
.prx-agenda__time,
.prx-agenda__title,
.prx-agenda__desc {
    font-family: var(--typography-p-font-family);
    letter-spacing: var(--typography-p-letter-spacing);
    line-height: var(--typography-p-line-height);
}

.prx-agenda__dayline {
    height: 1px;
    margin: 10px 0 12px;
    background: rgba(0, 0, 0, 0.12);
}

.prx-agenda__item {
    padding: 10px 0;
}

.prx-agenda__item+.prx-agenda__item {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
}

.prx-agenda__time {
    margin-bottom: 4px;
    font-weight: 800;
    opacity: 0.85;
}

.prx-agenda__desc {
    margin-top: 6px;
    opacity: 0.9;
}

.prx-agenda__empty {
    text-align: center;
}