/* ---------- Grouped schedule (ultra Dracula theme) ----------
   Unpaginated: one continuous list. Length is controlled by shortcode
   [romence length="N"] or the "Grouped list length" setting (0 = all). ---------- */

.romence-template-grouped .day-wrap {
    margin-bottom: 1.25rem;
}

.romence-template-grouped .row-info {
    display: flex;
    background: #21222c;
    padding: 10px;
    font-weight: 700;
    color: #bd93f9;
    border-left: 3px solid #ff79c6;
}

/* Shared column flex: 0 0 prevents grow/shrink so header and section align */
.romence-template-grouped .row-info .info-date,
.romence-template-grouped .row-class .info-col {
    flex: 0 0 25%;
    min-width: 0;
}

.romence-template-grouped .row-info .info-class,
.romence-template-grouped .row-class .bk-ttl {
    flex: 0 0 45%;
    min-width: 0;
}

.romence-template-grouped .row-info .info-teach,
.romence-template-grouped .row-class p.bk-teach {
    flex: 0 0 20%;
    min-width: 0;
}

.romence-template-grouped .row-info .info-reserve,
.romence-template-grouped .row-class a.res-btn {
    flex: 0 0 10%;
    min-width: 0;
}

.romence-template-grouped .row-class {
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    padding: 10px;
    align-items: start;
    background: #282a36;
    color: #f8f8f2;
    border-left: 3px solid #44475a;
}

.romence-template-grouped .row-class:nth-of-type(even) {
    background: #1e1f29;
    border-left-color: #6272a4;
}

.romence-template-grouped .row-class div.bk-ttl {
    margin: 0;
    line-height: 1;
}

.romence-template-grouped .row-class div.bk-ttl h3 {
    color: #8be9fd;
    margin-top: 0;
}

.romence-template-grouped .row-class .info-col span {
    display: block;
    color: #6272a4;
}

.romence-template-grouped .row-class p.bk-teach {
    flex: 0 0 20%;
    min-width: 0;
    margin: 0;
    color: #6272a4;
}

.romence-template-grouped .row-class a.res-btn {
    text-decoration: none;
    background: #44475a;
    color: #50fa7b;
    border: 1px solid #6272a4;
    flex: 0 0 10%;
    min-width: 0;
    padding: 4px 10px;
    border-radius: 5px 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: clamp(10px, calc(11.18px + 0.416vw), 14px);
    box-shadow: none;
}

.romence-template-grouped .row-class a.res-btn:hover {
    background: #6272a4;
    color: #f1fa8c;
    border-color: #bd93f9;
}

.romence-template-grouped .row-class p.ic {
    flex: 0 0 100%;
    margin: 20px 0;
    color: #f1fa8c;
}

.romence-template-grouped .row-class p.ic .ic-tt {
    display: block;
    overflow: hidden;
    height: 1em;
    line-height: 1;
}

/* ----- 768px and below: hide instructor, relax layout ----- */
@media (max-width: 768px) {
    .romence-template-grouped .row-info .info-teach {
        display: none;
    }

    .romence-template-grouped .row-info .info-date,
    .romence-template-grouped .row-class .info-col {
        flex: 0 0 22%;
    }

    .romence-template-grouped .row-info .info-class,
    .romence-template-grouped .row-class .bk-ttl {
        flex: 0 0 48%;
    }

    .romence-template-grouped .row-info .info-reserve,
    .romence-template-grouped .row-class a.res-btn {
        flex: 0 0 30%;
        min-width: 80px;
    }

    .romence-template-grouped .row-class p.bk-teach {
        display: none;
    }
}

/* ----- 500px and below: stack everything ----- */
@media (max-width: 500px) {

    .romence-template-grouped .row-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 12px 14px;
    }

    .romence-template-grouped .row-info .info-date,
    .romence-template-grouped .row-info .info-class {
        width: 100%;
    }

    .romence-template-grouped .row-class {
        flex-direction: column;
        gap: 0.5rem;
        padding: 12px 14px;
        overflow: visible;
    }

    .romence-template-grouped .row-class .info-col {
        width: 100%;
    }

    .romence-template-grouped .row-class .info-col span {
        display: inline;
    }

    .romence-template-grouped .row-class .info-col span + span::before {
        content: " · ";
        margin: 0 0.2em;
    }

    .romence-template-grouped .row-class div.bk-ttl {
        width: 100%;
    }

    .romence-template-grouped .row-class div.bk-ttl h3 {
        margin: 0 0 0.25em;
        line-height: 1.3;
    }

    .romence-template-grouped .row-class a.res-btn {
        width: 100%;
        min-width: unset;
        padding: 10px 14px;
        font-size: 14px;
        order: 10;
    }

    .romence-template-grouped .row-class p.ic {
        margin: 12px 0 0;
        order: 11;
    }

    .romence-template-grouped .row-class p.ic .ic-tt {
        height: auto;
        line-height: 1.4;
        overflow: visible;
    }
}