/* ---------------------------------------------------------------------------
 * SRF Better ("סשן מודרך") sheet (mobile) / dialog (desktop) -- better.jsx.
 * Loaded by the sessions page, and on any page opened with ?srf-better
 * (views/layouts/_srf_better_link.php). The strip, chip and card tag stay in
 * sessions-react.css.
 * Site palette only (#243D44 / #545F64 / #D3D8DA / #ECECEC / #F7F7F7).
 * ------------------------------------------------------------------------- */

/* Sheet / dialog shell. Hidden until opened; z-index above the booking popup
   (#who_come, 1000) and the loyalty overlay (2000). */
.srb {
    position: fixed;
    inset: 0;
    z-index: 2100;
    visibility: hidden;
    pointer-events: none;
    color: #243D44;
    font-family: 'Almoni Medium', sans-serif;
}
.srb.is-open {
    visibility: visible;
    pointer-events: auto;
}
.srb__dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity .25s;
}
.srb.is-open .srb__dim {
    opacity: 1;
}
.srb__panel {
    position: absolute;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
.srb__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile: bottom sheet. Compact first (headline + lines, as tall as its content),
   then full height (intro, coaches, how to add). */
.srb--sheet .srb__panel {
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92%;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.srb--sheet.is-open .srb__panel {
    transform: translateY(0);
}
.srb--sheet.is-open.is-full .srb__panel {
    height: 92%;
}
.srb--sheet .srb__body {
    padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0px));
}
.srb__grab {
    flex: none;
    width: 100%;
    padding: 8px 0 6px;
    background: none;
    border: 0;
    cursor: grab;
    touch-action: none;
}
.srb__grab i {
    display: block;
    width: 36px;
    height: 5px;
    margin: 0 auto;
    border-radius: 3px;
    background: #D3D8DA;
}

/* Desktop: centered dialog, the full content at once. */
.srb--dialog .srb__panel {
    top: 50%;
    left: 50%;
    width: 620px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 80px);
    border-radius: 10px;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -46%);
    opacity: 0;
    transition: transform .25s, opacity .25s;
}
.srb--dialog.is-open .srb__panel {
    transform: translate(-50%, -50%);
    opacity: 1;
}
.srb--dialog .srb__body {
    padding: 26px 30px 26px;
}

/* Content */
.srb__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.srb__title {
    flex: 1;
    min-width: 0;
    font-family: 'Almoni Bold', sans-serif;
    font-size: 16px;
    line-height: 20px;
}
/* margin reset: a site-wide button rule otherwise centres it in the free space. */
.srb__close {
    flex: none;
    margin: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #545F64;
    font-size: 13px;
    line-height: 28px;
    text-align: center;
    background: #ECECEC;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.srb__headline {
    margin-bottom: 10px;
    font-family: 'Almoni Bold', sans-serif;
    font-size: 20px;
    line-height: 24px;
}
.srb__intro {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 24px;
}
.srb__lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 22px;
}
.srb__lines li {
    position: relative;
    padding-inline-start: 14px;
}
.srb__lines li::before {
    content: "";
    position: absolute;
    top: 9px;
    inset-inline-start: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #243D44;
}
.srb__lines b {
    font-family: 'Almoni Bold', sans-serif;
    font-weight: normal;
}
.srb__more {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 14px 0 0;
    color: #243D44;
    font-family: 'Almoni Bold', sans-serif;
    font-size: 16px;
    background: none;
    border: 0;
    border-top: 1px solid #D3D8DA;
    cursor: pointer;
}
.srb__boxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.srb__box {
    padding: 14px 16px;
    text-align: center;
    border: 1px solid #D3D8DA;
    border-radius: 10px;
}
.srb__box p {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 21px;
}
.srb__box-title {
    font-family: 'Almoni Bold', sans-serif;
    font-size: 16px;
    line-height: 20px;
}
.srb__box--howto {
    background: #F7F7F7;
}
.srb__avatars {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.srb__avatars img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 2px solid #fff;
    border-radius: 50%;
    margin-inline-start: -8px;
}
.srb__avatars img:first-child {
    margin-inline-start: 0;
}
.srb__link {
    display: inline-block;
    margin-top: 8px;
    color: #243D44;
    font-family: 'Almoni Bold', sans-serif;
    font-size: 15px;
    text-decoration: none;
}
.srb__cta.btn_blue {
    width: 100%;
    margin: 12px 0 0;
}

/* Desktop: coaches and how-to side by side, the button beside its text. */
@media (min-width: 768px) {
    .srb--dialog .srb__headline,
    .srb--dialog .srb__title,
    .srb--dialog .srb__intro {
        text-align: center;
    }
    .srb--dialog .srb__top {
        justify-content: center;
        position: relative;
    }
    .srb--dialog .srb__title {
        flex: none;
    }
    .srb--dialog .srb__close {
        position: absolute;
        inset-inline-end: -12px;
        top: -12px;
    }
}

/* The session's coach in the SRF Better sheet / dialog -- a .srb__box like the
   general "המאמנים" one, with the photo on top. */
.srb__coach-photo {
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    object-fit: cover;
    border-radius: 50%;
}
.srb__coach-role {
    margin-top: 2px;
    color: #545F64;
    font-size: 14px;
    line-height: 18px;
}

