#booking-form>#booking-modules{grid-column:1/-1!important;grid-row:1!important;width:100%;min-width:0;margin:0!important}
#booking-modules .bm-module{margin:0 0 14px;min-width:0;border:0;background:transparent}
#booking-modules .bm-heading{display:flex;align-items:center;gap:10px;padding:8px 12px}
#booking-modules .bm-open{flex:1;min-width:0;border:0;background:transparent;color:#173923;font-size:14px;font-weight:800;text-align:left;cursor:pointer;min-height:40px}
#booking-modules .bm-remove{border:0;background:transparent;color:#42644e;font-size:12px;text-decoration:underline;padding:8px;cursor:pointer}
#booking-modules .bm-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 12px 12px;color:#173923;font-size:13px;overflow-wrap:anywhere}
#booking-modules .bm-preview span{display:block;font-size:11px;font-weight:800;text-transform:uppercase;margin-bottom:4px}
#booking-modules .bm-editor{min-width:0;padding:0 0 8px}
#booking-modules [hidden],.booking-cart-summary[hidden],#booking-summary>.space-y-4[hidden]{display:none!important}
#booking-modules .booking-card-rail-shell{position:relative;display:flex!important;flex-direction:column!important;gap:8px!important;padding-bottom:8px!important;min-width:0;width:100%;isolation:isolate}
#booking-modules .bm-controls{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;margin:18px 0 22px}
#booking-modules .bm-controls>button{min-height:44px;padding:9px 22px;border:1px solid #608771;border-radius:10px;background:#fff;color:#173923;font-size:14px;font-weight:800;cursor:pointer}
#booking-modules button:disabled{opacity:.5;cursor:default}
.bm-status,#booking-series-status{margin:8px 0;text-align:center;font-size:13px;color:#74400e;overflow-wrap:anywhere}
.booking-cart-summary{max-height:440px;overflow:auto;overscroll-behavior:contain}
.booking-cart-caption{font-weight:700;font-size:14px;margin:0 0 12px}
.booking-cart-line{display:flex;justify-content:space-between;align-items:start;gap:16px;padding:12px 0;border-bottom:1px solid #c4d8c8;font-size:14px}
.booking-cart-line>div{min-width:0;overflow-wrap:anywhere}.booking-cart-line>strong{white-space:nowrap}.booking-cart-line p{font-size:12px;margin:4px 0 0;color:#475569}
@media(max-width:639px){#booking-modules .bm-preview{grid-template-columns:repeat(2,minmax(0,1fr))}#booking-modules .bm-editor{display:flex;flex-direction:column;gap:12px}.booking-cart-summary{max-height:360px}}

.booking-recurring-plan{display:flex;flex-direction:column;gap:6px;margin-bottom:16px;font-size:13px;font-weight:700}.booking-recurring-plan[hidden]{display:none!important}.booking-recurring-plan select{min-height:44px;max-width:100%;border:1px solid #b5cdbb;border-radius:8px;background:#fff;padding:8px;color:#173923}

@media(max-width:639px){#booking-modules #booking-date-dropdown:has(#booking-recurring-calendar:not([hidden])){height:auto!important}#booking-modules #booking-date-dropdown:has(#booking-recurring-calendar:not([hidden])) #booking-date-menu{position:static!important;display:block!important;width:100%!important;max-height:none!important;margin:0!important;transform:none!important}#booking-modules #booking-recurring-calendar{overflow:visible;min-height:280px}#booking-modules .bm-editor>*{flex-shrink:0}}

.booking-cart-retry{padding:10px 16px;min-height:44px;background:white;border:1px solid #608771;border-radius:8px;color:#173923}.booking-cart-retry[hidden]{display:none!important}

/* Clear visit cards and readable order breakdown, 2026-10-20. */
#booking-modules .bm-module{margin:0 0 20px;border:1px solid #bed1c2;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 2px 6px #17392308}
#booking-modules .bm-module.bm-active{border-color:#608771;box-shadow:0 0 0 1px #608771}
#booking-modules .bm-heading{padding:10px 16px;background:#f1f7ef;border-bottom:1px solid #dbe6dc}
#booking-modules .bm-open{font-size:18px;line-height:1.4;min-height:44px}
#booking-modules .bm-remove{font-size:14px;min-height:44px;color:#365b41}
#booking-modules .bm-preview{padding:18px 16px;gap:18px;font-size:16px;line-height:1.5}
#booking-modules .bm-preview span{font-size:12px;letter-spacing:.04em;color:#526d59;margin-bottom:6px}
#booking-modules .bm-preview strong{display:block;font-weight:700}
#booking-modules .bm-editor{padding:12px 10px 8px}
.booking-cart-summary{max-height:680px;padding:2px}
.booking-cart-caption{font-size:16px;line-height:1.5;margin-bottom:16px;color:#365b41}
.booking-cart-line{padding:18px 16px;margin:0 0 12px;border:1px solid #ccdbce;border-radius:12px;background:#fff;gap:18px;font-size:17px;line-height:1.5}
.booking-cart-visit{display:block;margin-bottom:5px;color:#526d59;font-size:13px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.booking-cart-date{display:block;font-size:18px;color:#173923}
.booking-cart-line p{font-size:16px;line-height:1.5;margin:5px 0 0;color:#475569}
.booking-cart-line p.booking-cart-time{font-size:18px;font-weight:700;color:#173923}
.booking-cart-line>strong{font-size:20px;color:#173923}
#booking-summary-total{font-size:28px!important}
@media(min-width:640px){
 #booking-modules .bm-open{font-size:21px}
 #booking-modules .bm-remove{font-size:15px}
 #booking-modules .bm-preview{font-size:18px;padding:22px 20px;gap:22px}
 #booking-modules .bm-preview span{font-size:13px}
 #booking-modules .bm-controls>button{font-size:17px;padding:12px 24px}
 .booking-cart-caption{font-size:17px}
 .booking-cart-date{font-size:20px}
 .booking-cart-line p.booking-cart-time{font-size:19px}
 .booking-cart-line>strong{font-size:22px}
 #booking-summary-date,#booking-summary-time,#booking-summary-service,#booking-summary-addons{font-size:18px!important;line-height:1.55}
 #booking-summary>.space-y-4>div>div:first-child{font-size:13px!important}
 #booking-summary-total{font-size:30px!important}
}
@media(min-width:640px) and (max-width:1023px){#booking-modules .bm-preview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:639px){
 #booking-modules .bm-heading{padding:8px 12px}
 #booking-modules .bm-preview{padding:16px 12px;gap:16px}
 .booking-cart-summary{max-height:480px}
 .booking-cart-line{padding:14px 12px;gap:10px}
 .booking-cart-date{font-size:17px}
 .booking-cart-line>strong{font-size:18px}
}


/* Compact visit cards and order summary, 2026-10-20. */

/* Valitut vuorot: otsikko ja tiedot samalle riville. */
#booking-modules .bm-module:not(.bm-active){
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    column-gap:12px;
    padding:10px 14px;
    margin-bottom:10px;
}

#booking-modules .bm-module:not(.bm-active) .bm-heading{
    display:contents;
}

#booking-modules .bm-module:not(.bm-active) .bm-open{
    grid-column:1;
    padding:6px 8px;
    min-height:44px;
    white-space:nowrap;
    font-size:17px;
}

#booking-modules .bm-module:not(.bm-active) .bm-preview{
    grid-column:2;
    grid-row:1;
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    gap:clamp(10px,2vw,28px);
    padding:0;
    min-width:0;
    font-size:15px;
    line-height:1.35;
}

#booking-modules .bm-module:not(.bm-active) .bm-preview>div{
    min-width:0;
    flex:1 1 0;
}

#booking-modules .bm-module:not(.bm-active) .bm-preview span{
    font-size:10px;
    margin-bottom:2px;
}

#booking-modules .bm-module:not(.bm-active) .bm-preview strong{
    font-size:15px;
    overflow-wrap:anywhere;
}

#booking-modules .bm-module:not(.bm-active) .bm-remove{
    grid-column:3;
    grid-row:1;
    white-space:nowrap;
    font-size:13px;
}

/* Aktiivisesta vuorosta pois ylimääräinen korostusreunus. */
#booking-modules .bm-module.bm-active{
    border-color:transparent;
    box-shadow:none;
    background:transparent;
    overflow:visible;
}

#booking-modules .bm-module.bm-active .bm-heading{
    border-bottom:0;
    border-radius:12px;
}

#booking-modules .bm-module.bm-active .bm-editor{
    padding:12px 0 8px;
}

/* Yhteenveto: vuoron numero, päivä ja aika yhdellä rivillä. */
.booking-cart-line{
    align-items:center;
    padding:12px 14px;
    margin-bottom:8px;
    gap:12px;
    line-height:1.35;
}

.booking-cart-line>div{
    flex:1 1 auto;
    min-width:0;
}

.booking-cart-primary{
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:3px 10px;
}

.booking-cart-visit,
.booking-cart-date,
.booking-cart-line p.booking-cart-time{
    display:inline;
    margin:0;
    line-height:1.35;
}

.booking-cart-visit{
    font-size:12px;
    white-space:nowrap;
}

.booking-cart-date{
    font-size:16px;
}

.booking-cart-line p.booking-cart-time{
    font-size:15px;
    white-space:nowrap;
}

.booking-cart-line p:not(.booking-cart-time){
    margin:3px 0 0;
    font-size:13px;
    line-height:1.3;
}

.booking-cart-line>strong{
    flex:0 0 auto;
    font-size:18px;
    white-space:nowrap;
}

.booking-cart-caption{
    margin-bottom:10px;
}

/* Tablet: pidetään valitut vuorot kompakteina. */
@media(min-width:640px) and (max-width:1023px){
    #booking-modules .bm-module:not(.bm-active){
        column-gap:8px;
        padding:8px 10px;
    }

    #booking-modules .bm-module:not(.bm-active) .bm-preview{
        gap:8px;
    }

    #booking-modules .bm-module:not(.bm-active) .bm-preview strong{
        font-size:13px;
    }

    #booking-modules .bm-module:not(.bm-active) .bm-open{
        font-size:15px;
    }
}

/* Puhelin: tiedot voivat jakautua kahdelle riville. */
@media(max-width:639px){
    #booking-modules .bm-module:not(.bm-active){
        grid-template-columns:minmax(0,1fr) auto;
        row-gap:6px;
    }

    #booking-modules .bm-module:not(.bm-active) .bm-open{
        grid-column:1;
        grid-row:1;
    }

    #booking-modules .bm-module:not(.bm-active) .bm-remove{
        grid-column:2;
        grid-row:1;
    }

    #booking-modules .bm-module:not(.bm-active) .bm-preview{
        grid-column:1/-1;
        grid-row:2;
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:8px 12px;
    }

    .booking-cart-line{
        padding:10px;
    }

    .booking-cart-date{
        font-size:14px;
    }

    .booking-cart-line p.booking-cart-time{
        font-size:14px;
    }

    .booking-cart-line>strong{
        font-size:16px;
    }
}

/* Vuorokortin klikkausalue */
#booking-modules .bm-module:not(.bm-active),
#booking-modules .bm-module.bm-active .bm-heading {
    cursor:pointer;
}

#booking-modules .bm-module:not(.bm-active):hover {
    background:#f8fbf7;
}

#booking-modules .bm-module .bm-remove {
    cursor:pointer;
}
