/*
 * A mentor's sessions on their profile
 * (mentorship/partials/session-menu.blade.php) + the profile's page tabs.
 * Numbered tracks, one card per session: cover | what it is | price column
 * (price, package offer, one action). Prefix .msm-.
 *
 * Type: 13 meta · 15 body · 19 session title · 24 price / section title.
 */
.msm, .msm-tabs {
    --msm-brand: #4242d6;
    --msm-brand-strong: #3634b8;
    --msm-wash: #f5f4ff;
    --msm-ink: #1c1c6e;
    --msm-body: #403d59;
    --msm-muted: #6e6a85;
    --msm-line: #e7e5f2;
    --msm-ok: #2c7a51;
    --msm-star: #e8a317;
    --msm-chip: #ecebff;
    --msm-shadow: 0 1px 2px rgba(28, 28, 110, .06), 0 6px 18px -8px rgba(28, 28, 110, .14);
    --msm-shadow-hover: 0 2px 4px rgba(28, 28, 110, .06), 0 14px 32px -12px rgba(28, 28, 110, .26);
}

/* Page tabs: Sessions · Tips · Reviews, as underlined text. */
.msm-tabs.nav { display: flex; flex-wrap: nowrap; gap: 28px; margin: 0 0 24px; padding: 0; border-bottom: 1px solid var(--msm-line); overflow-x: auto; scrollbar-width: none; }
.msm-tabs.nav::-webkit-scrollbar { display: none; }
.msm-tabs .nav-item { flex: none; }
.msm-tabs .msm-tab {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 -1px; padding: 12px 0;
    border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none;
    font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--msm-muted); white-space: nowrap;
}
.msm-tabs .msm-tab:hover { color: var(--msm-ink); }
.msm-tabs .msm-tab.active, .msm-tabs .msm-tab.active:hover { background: none; color: var(--msm-ink); border-bottom-color: var(--msm-brand); }
.msm-tabs .msm-tab:focus-visible { outline: 2px solid var(--msm-brand); outline-offset: 2px; }
.msm-tab__count { font-size: 13px; font-weight: 600; color: var(--msm-muted); font-variant-numeric: tabular-nums; }

/* The menu: tracks of session cards. */
.msm { display: flex; flex-direction: column; gap: 8px; }

/* Track index: sticky, underlined like the tabs, numbered like the tracks. */
.msm-index {
    position: sticky; top: 72px; z-index: 4;
    display: flex; gap: 24px; padding: 0 20px;
    border: 1px solid var(--msm-line); border-radius: 14px; background: #fff;
    overflow-x: auto; scrollbar-width: none;
}
.msm-index::-webkit-scrollbar { display: none; }
.msm-index__link {
    display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 14px 0;
    border-bottom: 2px solid transparent; font-size: 15px; font-weight: 600; line-height: 1.3;
    color: var(--msm-muted); text-decoration: none; white-space: nowrap;
}
.msm-index__link:hover { color: var(--msm-ink); }
.msm-index__link.is-active { color: var(--msm-ink); border-bottom-color: var(--msm-brand); }
.msm-index__link:focus-visible { outline: 2px solid var(--msm-brand); outline-offset: 2px; }
.msm-index__num { font-size: 13px; font-weight: 600; color: var(--msm-brand); font-variant-numeric: tabular-nums; }

/* Track header: "Track 01", name + intro, count on the far side. */
.msm-section { scroll-margin-top: 140px; }
.msm-section + .msm-section { margin-top: 20px; }
.msm-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 0 14px; }
.msm-section__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.msm-section__num { font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: .02em; color: var(--msm-brand); font-variant-numeric: tabular-nums; }
.msm-section__title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.3; color: var(--msm-ink); text-align: start; text-wrap: balance; }
.msm-section__intro { margin: 0; font-size: 15px; line-height: 1.5; color: var(--msm-muted); text-align: start; text-wrap: pretty; }
.msm-section__count { flex: none; font-size: 14px; font-weight: 500; color: var(--msm-muted); white-space: nowrap; }

/* Cards */
.msm-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.msm-item {
    position: relative; display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 232px; align-items: stretch; gap: 24px;
    padding: 16px; border: 1px solid var(--msm-line); border-radius: 16px; background: #fff; box-shadow: var(--msm-shadow);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.msm-item:hover { border-color: #d9d6f5; box-shadow: var(--msm-shadow-hover); }

/* Cover: the session's picture (or its generated cover), zooming on hover. */
.msm-item__cover {
    position: relative; align-self: start; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: #1b1746;
}
.msm-item__cover > img, .msm-item__cover .msc { position: absolute; inset: 0; width: 100%; height: 100%; }
.msm-item__cover > img { object-fit: cover; }
/* The card already names the session; at this size the cover is the picture only. */
.msm-item__cover .msc .msc__content, .msm-item__cover .msc .msc__scrim { display: none; }
.msm-item__cover > img, .msm-item__cover .msc__art { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.msm-item:hover .msm-item__cover > img, .msm-item:hover .msm-item__cover .msc__art { transform: scale(1.05); }
.msm-item__share {
    position: absolute; z-index: 3; top: 8px; inset-inline-end: 8px; display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--msm-ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: pointer; opacity: 0; transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease, color .15s ease;
}
.msm-item__share i { font-size: 15px; line-height: 1; }
.msm-item:hover .msm-item__share, .msm-item__share:focus-visible { opacity: 1; transform: none; }
.msm-item__share:hover { color: var(--msm-brand); }
.msm-item__share:focus-visible { outline: 2px solid var(--msm-brand); outline-offset: 2px; }
@media (hover: none) { .msm-item__share { opacity: 1; transform: none; } }

/* What it is */
.msm-item__main { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-block: 2px; }
.msm-item__eyebrow {
    align-self: flex-start; max-width: 100%; padding: 3px 10px; border-radius: 999px; background: var(--msm-chip);
    font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--msm-brand);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msm-item__title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.4; text-align: start; text-wrap: pretty; overflow-wrap: anywhere; }
.msm-item__link { color: var(--msm-ink); text-decoration: none; }
/* The whole card opens the session; the price column's own links sit above this. */
.msm-item__link::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.msm-item__link:focus-visible { outline: none; }
.msm-item__link:focus-visible::after { outline: 2px solid var(--msm-brand); outline-offset: -2px; }
.msm-item:hover .msm-item__link { color: var(--msm-brand); }
.msm-item__teaser {
    margin: 0; font-size: 14px; line-height: 1.7; color: var(--msm-muted); text-align: start; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Facts: icon + value in one quiet line. */
.msm-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: auto 0 0; padding-top: 6px; }
.msm-fact { display: flex; align-items: center; }
.msm-fact__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.msm-fact__value { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--msm-body); white-space: nowrap; }
.msm-fact__icon { font-size: 16px; line-height: 1; color: var(--msm-muted); }
.msm-fact--star .msm-fact__icon { font-size: 15px; color: var(--msm-star); }
.msm-fact--star bdi { font-weight: 700; color: var(--msm-ink); }
.msm-fact__extra { color: var(--msm-muted); }

/* Price column: price, package offer, one action. */
.msm-item__side {
    display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
    padding-inline-start: 24px; border-inline-start: 1px solid var(--msm-line);
}
.msm-item__price { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.msm-item__amount { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; color: var(--msm-ink); font-variant-numeric: tabular-nums; }
.msm-item__amount.is-free { color: var(--msm-ok); }
.msm-item__was { font-size: 13px; color: var(--msm-muted); text-decoration: line-through; }
.msm-item__unit { font-size: 13px; line-height: 1.4; color: var(--msm-muted); }

.msm-offer {
    position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px;
    border-radius: 12px; background: var(--msm-wash); box-shadow: inset 0 0 0 1px #dedcfb; color: var(--msm-brand); text-decoration: none;
}
a.msm-offer { transition: box-shadow .15s ease, background-color .15s ease; }
a.msm-offer:hover { background: #eeedff; box-shadow: inset 0 0 0 1px var(--msm-brand); color: var(--msm-brand); }
a.msm-offer:focus-visible { outline: 2px solid var(--msm-brand); outline-offset: 2px; }
.msm-offer__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.msm-offer__title { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--msm-brand-strong); }
.msm-offer__title i { flex: none; font-size: 15px; line-height: 1; }
.msm-offer__save { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--msm-brand); font-size: 12px; font-weight: 700; line-height: 1.5; color: #fff; }
.msm-offer__price { font-size: 12px; font-weight: 500; line-height: 1.4; color: var(--msm-body); }

.msm-item__actions { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.msm-item__alt { align-self: center; font-size: 13px; font-weight: 600; color: var(--msm-brand); text-decoration: none; }
.msm-item__alt:hover { text-decoration: underline; }
.msm-item__open-now { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--msm-ok); }
.msm-item__open-now i { line-height: 1; }
.msm-item__actions .waitlist-cta { margin: 0; text-align: start; }

.msm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
    border: 1px solid var(--msm-brand); border-radius: 12px; background: var(--msm-brand); color: #fff;
    font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
    box-shadow: 0 8px 20px -12px rgba(66, 66, 214, .7);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.msm-btn:hover { background: var(--msm-brand-strong); border-color: var(--msm-brand-strong); color: #fff; }
.msm-btn:focus-visible { outline: 2px solid var(--msm-brand); outline-offset: 2px; }
.msm-btn i { font-size: 16px; line-height: 1; }
.msm-btn__arrow { transition: transform .2s ease; }
.msm-btn:hover .msm-btn__arrow { transform: translateX(3px); }
[dir="rtl"] .msm-btn:hover .msm-btn__arrow { transform: translateX(-3px); }
.msm-btn--quiet { background: #fff; color: var(--msm-ink); border-color: var(--msm-line); box-shadow: none; }
.msm-btn--quiet:hover { background: #fff; color: var(--msm-brand); border-color: var(--msm-brand); }

/* Tablet (and the profile's narrower main column): cover + text, the price column under the text. */
@media (max-width: 1199.98px) and (min-width: 640px) {
    .msm-item { grid-template-columns: 200px minmax(0, 1fr); gap: 16px 20px; }
    .msm-item__side {
        grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px;
        padding: 14px 0 0; border-inline-start: 0; border-top: 1px solid var(--msm-line);
    }
    .msm-item__actions { margin-inline-start: auto; min-width: 200px; }
}

/* Phones: one column; cover on top, price beside the action, offer full width. */
@media (max-width: 639.98px) {
    .msm-index { padding: 0 16px; gap: 20px; top: 64px; }
    .msm-section__head { flex-wrap: wrap; align-items: flex-start; }
    .msm-section__title { font-size: 20px; }
    .msm-item { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 12px 12px 16px; }
    .msm-item__title { font-size: 17px; }
    .msm-item__side {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px;
        padding: 14px 0 0; border-inline-start: 0; border-top: 1px solid var(--msm-line);
    }
    .msm-offer { grid-column: 1 / -1; grid-row: 2; }
    .msm-item__actions:has(.waitlist-cta) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .msm-item, .msm-btn, .msm-item__share, .msm-btn__arrow, .msm-item__cover > img, .msm-item__cover .msc__art, a.msm-offer { transition: none; }
    .msm-item:hover .msm-item__cover > img, .msm-item:hover .msm-item__cover .msc__art { transform: none; }
}
