/* Theme-owned compatibility layer for MEC 7.36+. Keep plugin files unmodified. */
.icasal-monthly.icasal-monthly,
.icasal-monthly.icasal-monthly .mec-calendar,
.icasal-monthly.icasal-monthly .mec-calendar-topsec {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.icasal-monthly.icasal-monthly .mec-calendar .mec-calendar-side {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    padding: 0;
}
.icasal-monthly.icasal-monthly .mec-calendar-topsec { display: block; }
/* Compact calendars embedded in any page/sidebar: no home-page red date panel. */
.icasal-monthly-compact:not(.icasal-monthly-home) .mec-calendar .mec-calendar-side {
    height: auto;
    min-height: 290px;
}
.icasal-monthly-compact:not(.icasal-monthly-home) .mec-calendar .mec-calendar-events-side {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 160px;
    padding: 20px;
    background: #fff;
}
.icasal-monthly-compact:not(.icasal-monthly-home) .mec-calendar .mec-calendar-events-sec {
    position: relative;
    height: auto;
}
.icasal-monthly-compact:not(.icasal-monthly-home) .mec-calendar h6.mec-table-side-title {
    display: block;
    position: static !important;
    width: auto;
    height: auto;
    margin: 0 0 12px;
    padding: 0;
    text-align: left;
    font-size: 15px;
    line-height: 1.5;
    color: #53565a;
}
.icasal-monthly-compact:not(.icasal-monthly-home) .mec-calendar .mec-table-side-day {
    display: inline;
    float: none;
    width: auto;
    height: auto;
    margin: 0 0 0 8px;
    padding: 0;
    font-size: 20px !important;
    line-height: inherit;
    color: #b33320;
}
.icasal-monthly-compact:not(.icasal-monthly-home) .icasal-calendar-articles {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
}
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar dt.mec-selected-day {
    background: #b33320 !important;
    color: #fff;
    border-radius: 50%;
}
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar dt.mec-selected-day a { color: #fff !important; }
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar dt.mec-table-nullday,
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar dt.mec-table-nullday a { color: #999 !important; }
/* Full monthly view keeps event cards, rather than shrinking them into circles. */
.icasal-monthly-full.icasal-monthly-full .mec-calendar .mec-calendar-header {
    margin: 0;
}
.icasal-monthly-full.icasal-monthly-full .mec-calendar .mec-load-month {
    top: 50% !important;
    width: 28px !important;
    background: transparent;
    border: 0;
}
.icasal-monthly-full.icasal-monthly-full .mec-load-month-link { font-size: 0; }
.icasal-monthly-full.icasal-monthly-full .mec-calendar-table {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
}
.icasal-monthly-full.icasal-monthly-full .mec-calendar-table-head,
.icasal-monthly-full.icasal-monthly-full .mec-calendar-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
}
.icasal-monthly-full.icasal-monthly-full .mec-calendar-table-head::before,
.icasal-monthly-full.icasal-monthly-full .mec-calendar-table-head::after,
.icasal-monthly-full.icasal-monthly-full .mec-calendar-row::before,
.icasal-monthly-full.icasal-monthly-full .mec-calendar-row::after { display: none; }
.icasal-monthly-full.icasal-monthly-full .mec-calendar .mec-calendar-day-head,
.icasal-monthly-full.icasal-monthly-full .mec-calendar dt {
    display: block;
    box-sizing: border-box;
    float: none;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 8px;
    border-radius: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.icasal-monthly-full.icasal-monthly-full .mec-calendar dt { min-height: 110px; }
.icasal-monthly-full.icasal-monthly-full .mec-event-article { max-width: 100%; padding: 6px; }
.icasal-monthly-full.icasal-monthly-full .mec-event-title { font-size: 12px; line-height: 1.4; }
@media (max-width: 767px) {
    .icasal-monthly-full.icasal-monthly-full .mec-month-container { min-width: 700px; }
}
.home_calendar.home_calendar {
    --icasal-calendar-top: 320px;
    --icasal-calendar-bottom: 275px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    align-items: stretch;
}
.home_calendar.home_calendar .card,
.home_calendar.home_calendar .calendar_block_2,
.home_calendar.home_calendar .mec-wrap,
.home_calendar.home_calendar .mec-calendar,
.home_calendar.home_calendar .mec-calendar-topsec { min-width: 0; width: 100%; }
.home_calendar.home_calendar .calendar_block_1 { max-height: none; }
.home_calendar.home_calendar .bkg_grey_day {
    box-sizing: border-box;
    height: var(--icasal-calendar-top);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    text-align: left;
}
.home_calendar.home_calendar .cal_tit_1,
.home_calendar.home_calendar .cal_tit_1_2 { margin: 0 0 4px; padding: 0; font-size: 22px; line-height: 1.25; }
.home_calendar.home_calendar .cal_tit_2 { margin: 0; font-size: 42px; line-height: 1.15; }
.home_calendar.home_calendar .cal_tit_points { margin: 0; padding: 0; line-height: 24px; }
.home_calendar.home_calendar .mec-calendar-topsec { display: block; }
.home_calendar.home_calendar .mec-calendar .mec-calendar-side {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: var(--icasal-calendar-top);
    padding: 0;
}
.icasal-monthly.icasal-monthly .mec-month-navigator,
.icasal-monthly.icasal-monthly .mec-calendar-header { width: 100%; min-width: 0; }
.icasal-monthly.icasal-monthly .mec-calendar-header h2 { font-size: 16px; }
.icasal-monthly.icasal-monthly .mec-month-navigator {
    position: relative;
    padding: 8px 10px;
    box-sizing: border-box;
}
.icasal-monthly.icasal-monthly .mec-month-navigator .mec-calendar-header {
    box-sizing: border-box;
    padding-left: 56px;
}
.icasal-monthly.icasal-monthly .mec-calendar-header h2 { margin: 0; line-height: 32px; }
.icasal-monthly.icasal-monthly .mec-calendar-side .mec-previous-month,
.icasal-monthly.icasal-monthly .mec-calendar-side .mec-next-month {
    position: absolute;
    display: block;
    top: 50%;
    transform: translateY(-50%);
    right: auto;
    width: 28px;
    height: 32px;
    line-height: 32px;
    margin: 0;
    padding: 0;
}
.icasal-monthly.icasal-monthly .mec-calendar-side .mec-previous-month { left: 10px; }
.icasal-monthly.icasal-monthly .mec-calendar-side .mec-next-month { left: 38px; }
.icasal-monthly.icasal-monthly .mec-load-month-link {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
}
.icasal-monthly.icasal-monthly .mec-load-month-link i {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.icasal-monthly.icasal-monthly .mec-load-month-link i::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-top: 1px solid #b33320;
    border-right: 1px solid #b33320;
    transform: rotate(45deg);
}
.icasal-monthly.icasal-monthly .mec-previous-month i::before { transform: rotate(-135deg); }
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-side .mec-calendar-table {
    width: auto;
    margin: 15px 12px;
    min-height: 0;
}
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-table-head,
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
}
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-table-head::before,
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-table-head::after,
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-row::before,
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar-row::after { display: none; }
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar .mec-calendar-day-head,
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar dt {
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 32px;
    height: 32px;
    line-height: 32px;
    margin: 0 auto;
    padding: 0;
    font-size: 12px;
}
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar .mec-calendar-day-head { font-size: 10px; }
.icasal-monthly-compact.icasal-monthly-compact .mec-calendar .mec-has-event a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    line-height: inherit;
    border-radius: 50%;
    background: transparent !important;
}
.home_calendar.home_calendar .mec-calendar-events-side {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: var(--icasal-calendar-bottom);
    padding: 24px;
    background: #fff;
}
.home_calendar.home_calendar .mec-calendar-events-sec { position: static; height: auto; }
.home_calendar.home_calendar .icasal-calendar-articles {
    max-height: calc(var(--icasal-calendar-bottom) - 48px);
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
    scrollbar-color: #b33320 #f2f2f2;
}
.home_calendar.home_calendar .mec-calendar-events-sec > h6.mec-table-side-title {
    position: absolute !important;
    box-sizing: border-box;
    left: -100% !important;
    top: 0;
    bottom: auto;
    width: 100%;
    height: var(--icasal-calendar-bottom);
    margin: 0 !important;
    padding: 28px 12px 12px;
    text-align: center;
    font-size: 20px;
    line-height: 1.4;
    color: #fff;
    white-space: normal;
}
.home_calendar.home_calendar .mec-calendar-events-side .mec-table-side-day {
    display: block;
    float: none;
    width: 100%;
    height: auto;
    margin: 24px 0 0;
    padding: 0;
    font-size: 100px;
    line-height: 1;
    color: #fff;
}
.home_calendar.home_calendar > .all_news_link {
    position: static !important;
    grid-column: 1 / -1;
    width: auto !important;
    margin: 24px 0 0 !important;
    text-align: right;
}
.icasal-monthly.icasal-monthly .mec-calendar dt.icasal-event-day:not(.mec-selected-day) {
    background: var(--icasal-event-color) !important;
    color: #fff;
    border-radius: 50%;
}
.icasal-monthly.icasal-monthly .mec-calendar dt.icasal-event-day a { color: #fff !important; }
.home_calendar.home_calendar .mec-calendar dt.mec-selected-day {
    background: #b33320 !important;
    color: #fff;
    border-radius: 50%;
}
.home_calendar.home_calendar .mec-calendar dt.mec-selected-day a { color: #fff !important; }
.home_calendar.home_calendar .mec-calendar dt.mec-table-nullday,
.home_calendar.home_calendar .mec-calendar dt.mec-table-nullday a { color: #999 !important; }
@media (min-width: 951px) and (max-width: 1200px) {
    .home_calendar.home_calendar .cal_tit_1,
    .home_calendar.home_calendar .cal_tit_1_2 { font-size: 18px; }
    .home_calendar.home_calendar .bkg_grey_day { padding: 16px; }
    .home_calendar.home_calendar .cal_tit_2 { font-size: 27px; }
    .home_calendar.home_calendar .mec-calendar-events-sec > h6.mec-table-side-title { font-size: 16px; }
}
@media (max-width: 600px) {
    .home_calendar.home_calendar { grid-template-columns: minmax(0, 1fr); }
    .home_calendar.home_calendar .mob_cal_tit { float: none; }
    .home_calendar.home_calendar .mec-calendar-events-sec > h6.mec-table-side-title {
        position: static !important;
        height: auto;
        padding: 0 0 12px;
        text-align: left;
        color: #53565a;
        font-size: 16px;
    }
    .home_calendar.home_calendar .mec-calendar-events-side .mec-table-side-day {
        display: inline;
        margin: 0 0 0 8px;
        font-size: 20px;
        color: #b33320;
    }
    .home_calendar.home_calendar .mec-calendar-events-side { height: auto; min-height: 120px; }
}
