/* Creative Edge Toolkit for YOOtheme Pro — Calendar / Agenda */

.el-calendar-agenda .cafy-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--grey-200, #e5e5e5); border: 1px solid var(--grey-200, #e5e5e5); }
.el-calendar-agenda .cafy-cal-head { background: transparent; padding: 8px 4px; text-align: center; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.el-calendar-agenda .cafy-cal-cell { background: #fff; min-width: 0; min-height: 60px; padding: 6px; vertical-align: top; overflow-wrap: break-word; }
.el-calendar-agenda .cafy-cal-cell.is-empty { background: transparent; }
.el-calendar-agenda .cafy-cal-day { font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; display: inline-block; }
.el-calendar-agenda .cafy-cal-cell.is-today .cafy-cal-day { border-radius: 50%; width: 1.6em; height: 1.6em; line-height: 1.6em; text-align: center; color: #fff !important; background-color: var(--el-primary, #1e87f0); }
.el-calendar-agenda .cafy-month-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 12px; }
.el-calendar-agenda .cafy-month-nav a { flex: none; }

/* Row Gap: Grid's own setting, set per calendar as --cafy-row-gap(-l). */
.el-calendar-agenda .cafy-filter-target > .cafy-filter-item { max-width: 100%; }
.el-calendar-agenda .cafy-filter-target > .cafy-filter-item:not(:last-child) { margin-bottom: var(--cafy-row-gap, 30px); }
.el-calendar-agenda .cafy-filter-target > .cafy-filter-item img { max-width: 100%; height: auto; }

@media (min-width: 1200px) {
    .el-calendar-agenda .cafy-filter-target > .cafy-filter-item:not(:last-child) { margin-bottom: var(--cafy-row-gap-l, var(--cafy-row-gap, 30px)); }
}

/*
 * View Breakpoint: below the chosen width, hide the Calendar tab and force
 * the Agenda pane visible, whatever the switcher's own JS state is.
 */
@media (max-width: 639px) {
    .el-calendar-agenda.cafy-view-bp-s .cafy-tab-calendar { display: none; }
    .el-calendar-agenda.cafy-view-bp-s > .uk-switcher > li:nth-child(1) { display: none !important; }
    .el-calendar-agenda.cafy-view-bp-s > .uk-switcher > li:nth-child(2) { display: block !important; }
}

@media (max-width: 959px) {
    .el-calendar-agenda.cafy-view-bp-m .cafy-tab-calendar { display: none; }
    .el-calendar-agenda.cafy-view-bp-m > .uk-switcher > li:nth-child(1) { display: none !important; }
    .el-calendar-agenda.cafy-view-bp-m > .uk-switcher > li:nth-child(2) { display: block !important; }
}

@media (max-width: 1199px) {
    .el-calendar-agenda.cafy-view-bp-l .cafy-tab-calendar { display: none; }
    .el-calendar-agenda.cafy-view-bp-l > .uk-switcher > li:nth-child(1) { display: none !important; }
    .el-calendar-agenda.cafy-view-bp-l > .uk-switcher > li:nth-child(2) { display: block !important; }
}

@media (max-width: 1599px) {
    .el-calendar-agenda.cafy-view-bp-xl .cafy-tab-calendar { display: none; }
    .el-calendar-agenda.cafy-view-bp-xl > .uk-switcher > li:nth-child(1) { display: none !important; }
    .el-calendar-agenda.cafy-view-bp-xl > .uk-switcher > li:nth-child(2) { display: block !important; }
}
