/* BeautyLabor only: the shared legacy styles remain untouched. */
.bl-theme .bl-course-topics {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
    font: 400 11px/16px Montserrat, sans-serif;
    color: #836b75;
    text-align: left;
    letter-spacing: 0;
    text-transform: none;
}
.bl-theme .bl-course-topic-row { display: contents; }
.bl-theme .bl-course-topic-row::before { content: none; }
.bl-theme .bl-course-tag-set { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 12px 0; padding: 0; }
/* One chip style in cards, dialogs, expanded mobile sections and payment pages. */
.bl-theme .bl-course-tag,
.bl-theme .bl-course-topic-name,
.bl-theme .bl-course-tags-more,
.bl-theme .bl-course-tags-less {
    display: inline-block;
    max-width: 100%;
    min-width: 0;
    width: auto;
    box-sizing: border-box;
    padding: 3px 8px;
    border: 1px solid #d9c7ce;
    border-radius: 999px;
    background: #fff;
    color: #825e6d;
    font: 400 11px/16px Montserrat, sans-serif;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.bl-theme .bl-course-tags-more,
.bl-theme .bl-course-tags-less { margin: 0; flex-shrink: 0; border-color: #b98f9f; cursor: pointer; }
.bl-theme .bl-course-tags-more:hover,
.bl-theme .bl-course-tags-less:hover { border-color: #95677b; color: #634652; text-decoration: none; }
.bl-theme .bl-course-tags-more:focus-visible, .bl-theme .bl-course-tags-close:focus-visible { outline: 2px solid #bc788d; outline-offset: 3px; }
/* Natural row maxima, not a fixed card/text height. Preserve native hover. */
.bl-theme .bl-course-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; align-items: stretch; }
.bl-theme .bl-course-grid > .course-directions__item {
    display: flex;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    text-align: left;
}
.bl-theme .bl-course-grid > .course-directions__item > [data-entity="item"] { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bl-theme .bl-course-grid .img { border-radius: 0; }
.bl-theme .bl-course-grid .text { display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; flex: 1; padding: 20px 24px 16px; min-height: 0; }
.bl-theme .bl-course-grid .text > .title { margin: 0; min-height: 0; height: auto; flex-shrink: 0; }
.bl-theme .bl-course-grid .text > meta { display: none; }
.bl-theme .bl-course-grid .properties { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.bl-theme .bl-course-grid .properties > span { margin: 0; padding: 0; font-size: 9px; line-height: 18px; }
.bl-theme .bl-course-grid .properties .duration .icon { position: static; }
.bl-theme .bl-course-grid .text .desc { display: block; margin: 0; max-height: none; height: auto; overflow: visible; -webkit-line-clamp: unset; flex-shrink: 0; line-height: 18px; }
.bl-theme .bl-course-grid .bl-course-topics { margin-top: auto; }
.bl-theme .bl-course-grid .button-default { width: 100%; box-sizing: border-box; border-radius: 0; flex-shrink: 0; align-self: stretch; }
@media (min-width: 640px) { .bl-theme .bl-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .bl-theme .bl-course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 55px; row-gap: 55px; } }
@media (min-width: 1440px) { .bl-theme .bl-course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 60px; } }
/* Home uses horizontal rows on desktop, not the catalogue card grid. */
.bl-theme .course-list__item .bl-course-topics { margin: 8px 0; }
@media (min-width: 1200px) {
    .bl-theme .course-list__item .text { min-width: 0; gap: 8px; }
    .bl-theme .course-list__item .bl-course-topics { flex: 0 1 190px; width: 190px; margin: 0; }
}
/* The checkout head stays absolute at the legacy desktop/tablet breakpoints.
   JS reserves its measured natural height in the header, never shrinks the photo. */
.bl-theme .bl-checkout-topics .head { height: auto; bottom: auto; justify-content: flex-start; }
.bl-theme .bl-checkout-topics .head > .img { flex-shrink: 0; }
@media (min-width: 560px) {
    .bl-theme .bl-checkout-topics .head > .img { position: relative; width: 100%; height: 440px; }
}
.bl-theme .bl-checkout-topics .head > .text-block { margin-top: 24px; }
.bl-theme .bl-checkout-topics .head > .tags { margin: 20px 0 12px; }
.bl-theme .bl-checkout-topics .head > .bl-course-tag-set { margin: 0; }
.bl-theme .bl-checkout-topics .head > .course-properties:empty { display: none; }
.bl-theme .bl-course-tags-popover {
    position: fixed;
    z-index: 10000;
    width: 330px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e8dfe3;
    border-radius: 12px;
    box-shadow: 0 8px 26px #47313f29;
    font-family: Montserrat, sans-serif;
    color: #6b535e;
    text-align: left;
}
.bl-theme .bl-course-tags-popover[hidden] { display: none; }
.bl-theme .bl-course-tags-title { font: 600 11px/16px Montserrat, sans-serif; margin: 0 24px 8px 0; }
.bl-theme .bl-course-tags-popover .bl-course-tag-set { margin: 0; }
.bl-theme .bl-course-tags-close { position: absolute; right: 3px; top: 3px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #9a7484; font: 24px/28px Arial, sans-serif; cursor: pointer; }
.bl-theme .bl-course-tags-close:hover { background: #f4ecef; color: #634652; }
/* Small screens expand within the card instead of opening a floating dialog. */
.bl-theme .bl-course-tags-inline[hidden],
.bl-theme .bl-course-tags-more[hidden] { display: none !important; }
.bl-theme .bl-course-topics.is-expanded > .bl-course-topic-row { display: none; }
.bl-theme .bl-course-tags-inline { width: 100%; min-width: 0; }
.bl-theme .bl-course-tags-inline .bl-course-tag-set { margin: 0 0 8px; }
.bl-theme .bl-course-tags-less:focus-visible { outline: 2px solid #bc788d; outline-offset: 3px; }
