/* CMLF Schedules — visual styles */

.cmlf-sched {
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 1px 0 rgba(10, 27, 57, 0.06);
    font-family: inherit;
}

.cmlf-sched--container {
    background-color: #D2E9F7;
    border-radius: 16px;
}

.cmlf-sched-top {
    display: flex;
    justify-content: space-between;
}

.cmlf-sched-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cmlf-sched-tab {
    display: inline-block;
    line-height: 30px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #FFFFFF;
    border: 1px solid #d3deee;
    font-weight: 500;
    text-decoration: none;
    color: #22477F;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.cmlf-sched-tab:hover { border-color: #8fb5ea; }
.cmlf-sched-tab.is-active {
    background: #22477F;
    color: #FFFFFF;
    border-color: #0b63ce;
    box-shadow: 0 0 0 2px rgba(11, 99, 206, 0.18) inset;
}

.cmlf-sched-frame {
    font-weight: 800;
    color: #22477F;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmlf-sched-arrows {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.cmlf-sched-arrow {
    display: inline-flex;
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
    background: #ffffff;
    border: 1px solid #d3deee;
    border-radius: 10px;
    text-decoration: none;
    color: #153a69;
    font-size: 18px;
    font-weight: 800;
    transition: transform .1s ease, border-color .15s ease;
}
.cmlf-sched-arrow:hover { border-color: #8fb5ea; transform: translateY(-1px); }

/* Days list */
.cmlf-sched-days {
    margin-top: 14px;
    display: flex; flex-direction: column; gap: 16px;
}

.cmlf-sched-day {
    padding: 16px;
}

.cmlf-sched-day__title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 900;
    color: #22477F;
}

/* Happenings */
.cmlf-sched-happenings {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px 14px;
    align-items: start;
    margin-bottom: 12px;
}
.cmlf-sched-happenings__label {
    font-weight: 700;
    color: #22477F;
}
.cmlf-sched-happenings__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.cmlf-sched-happenings__none {
    color: #5f789d;
}

/* Event card */
.cmlf-sched-card {
    display: block;
    background: #ffffff;
    border: 1px solid #cfd9ea;
    border-radius: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: #143a69;
    font-weight: 700;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cmlf-sched-card:hover {
    border-color: #8fb5ea;
    box-shadow: 0 2px 0 rgba(10,27,57,0.06);
}
.cmlf-sched-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Table */
.cmlf-sched-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cmlf-sched-row {
    display: contents;
    margin-bottom: 12px;
}

.cmlf-sched-col {
    background: #ffffff;
    border: 1px solid #2F5C84;
    border-radius: 8px;
    padding: 0 12px;
    color: #0f2e52;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.cmlf-sched-col--head {
    font-weight: 500;
    color: #22477F;
    background: transparent;
    border: none;
}

.cmlf-chip {
    display: inline-block;
    min-width: 90px;
    text-align: center;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 500;
}

.cmlf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 3px 12px;
    font-weight: 500;
    border: 1px solid transparent;
    font-size: 16px;
}
.cmlf-badge.is-yes {
    background: #e7f6ea;
    color: #1f7a33;
    border-color: #bfe6c8;
}
.cmlf-badge.is-no {
    background: #fde9ea;
    color: #9d2c36;
    border-color: #f6c3c7;
}

/* Icons (simple fallbacks) */
.cmlf-i { font-style: normal; }
.cmlf-i--calendar { opacity: .8; }
.cmlf-i--info { display:inline-block; width:18px; height:18px; border-radius:50%; text-align:center; line-height:18px; font-weight:900; background:#dfe9fb; color:#22477F; margin-right:6px; }

/* Big date frame */
.cmlf-sched-frame--big {
    font-size: 32px;
    font-weight: 800;
    color: #22477F;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Date selector (pill) */
.cmlf-datepicker {
    display: inline-grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #d3deee;
    border-radius: 12px;
    background: #fff;
}
.cmlf-datepicker__label { color: #153a69; white-space: nowrap; }
.cmlf-datepicker__input {
    appearance: none;
    border: 0; padding: 6px 8px;
    border-radius: 8px;
    background: #f6f9fe;
    font-weight: 700;
    color:#153a69;
    font-family: Poppins, sans-serif!important;
    font-size: 14px!important;
}

.cmlf-datepicker__input::placeholder {
    color: #9aa4b2!important;
}
.cmlf-datepicker__input:focus { outline: 2px solid #8fb5ea; }
.cmlf-datepicker__icon { opacity: .8; }

/* Download link */
.cmlf-sched-download {
    text-decoration: underline;
    font-weight: 800;
    color: #153a69;
    white-space: nowrap;
}
.cmlf-wave { color:#1bb1a6; margin-right: 6px; }

/* Arrows (top already exists; add bottom spacing) */
.cmlf-sched-bottom { margin-top: 16px; }
.cmlf-sched-arrows--bottom { justify-content: flex-end; }


.cmlf-sched-top--row1 {
    margin-bottom: 16px;
}

/* Mobile */
@media (max-width: 900px) {
    .cmlf-sched-top--row1 { flex-direction: column;  }
    .cmlf-sched-top--row2 { flex-direction: column; }
    .cmlf-sched-arrows--top { justify-content: flex-start; margin-top: 8px; }
    .cmlf-sched-download { justify-self: start; }
    .cmlf-sched-arrows { justify-content: center; }
    .cmlf-sched-frame { order: 3; }
}

@media (max-width: 720px) {
    .cmlf-sched-table { grid-template-columns: 1fr; }
    .cmlf-sched-row--head { display: none; }

    .cmlf-sched-top {
        gap: 10px;
    }

    .cmlf-sched-col {
        display: grid;
        grid-template-columns: 140px 1fr; /* label | value */
        gap: 8px;
        align-items: center;
    }

    .cmlf-sched-col::before {
        content: attr(data-label);
        font-weight: 500;
        color: #22477F;
        font-size: 14px;
    }

    .cmlf-chip, .cmlf-badge { justify-self: start; }
    .cmlf-chip { font-size: 14px; }
    .cmlf-sched-happenings { grid-template-columns: 1fr; }
    .cmlf-sched-table { grid-template-columns: 1fr; }
    .cmlf-sched-row--head { display: none; }

    .cmlf-sched-row .cmlf-sched-col:last-child { margin-bottom: 15px; }

    .cmlf-sched-tab {
        width: 100%;
    }
}
