/* "Book seat" on the home and live-sessions cards (partials/join_seat, js/parts/join-seat.js). */

/* The form wraps the card's own button: the button stays the grid/flex item of the card's actions. */
.join-seat-form {
    display: contents;
}

.join-seat-form button {
    width: 100%;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.join-seat-form.is-sending button {
    opacity: .7;
    cursor: progress;
}

.join-seat-form.is-sending button svg {
    animation: join-seat-pulse 1s ease-in-out infinite;
}

/* "Request sent" (the card's own button classes stay, so these selectors are a step stronger) */
#home-v2 .hv2-ses-card__btn.join-seat-sent,
.scard-cta.join-seat-sent,
.join-seat-sent {
    background: #E9F8F0;
    border: 1px solid #B7E4CB;
    box-shadow: none;
    color: #0E7A45;
    text-decoration: none;
}

#home-v2 .hv2-ses-card__btn.join-seat-sent:hover,
.scard-cta.join-seat-sent:hover {
    background: #DDF3E7;
    box-shadow: none;
    color: #0B6B3C;
}

.join-seat-sent__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55em;
    height: 1.55em;
    flex-shrink: 0;
    border-radius: 50%;
    background: #16A35A;
    color: #fff;
}

#home-v2 .hv2-ses-card__btn.join-seat-sent .join-seat-sent__icon svg,
.scard-cta.join-seat-sent .join-seat-sent__icon svg,
.join-seat-sent .join-seat-sent__icon svg {
    width: 64%;
    height: 64%;
    transform: none;
}

.join-seat-sent.is-new {
    animation: join-seat-in .45s cubic-bezier(.2, .8, .2, 1.2);
}

.join-seat-sent.is-new .join-seat-sent__icon {
    animation: join-seat-pop .5s .1s cubic-bezier(.2, .8, .2, 1.4) both;
}

/* Study mode chooser */
.join-seat-chooser {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(12, 28, 48, .45);
    animation: join-seat-fade .2s ease;
}

.join-seat-chooser__box {
    width: 100%;
    max-width: 380px;
    padding: 22px 20px 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px -20px rgba(12, 28, 48, .45);
    text-align: center;
    animation: join-seat-in .28s cubic-bezier(.2, .8, .2, 1.1);
}

/* The page font is set on the chooser by join-seat.js; the site's "p { font-family: Tajawal !important }" (no Latin
   letters, so course names fell back to a serif font) would override it. */
.join-seat-chooser__box h3,
.join-seat-chooser__box p,
.join-seat-chooser__box strong,
.join-seat-chooser__box small {
    font-family: inherit !important;
}

.join-seat-chooser__title {
    margin: 0;
    color: #11243A;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
}

.join-seat-chooser__course {
    margin: 4px 0 0;
    color: #1C5EB2;
    font-size: 14px;
    font-weight: 700;
}

.join-seat-chooser__course:empty {
    display: none;
}

.join-seat-chooser__hint {
    margin: 6px 0 14px;
    color: #6A7889;
    font-size: 13px;
    line-height: 1.6;
}

.join-seat-chooser__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.join-seat-chooser__option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #E3E9F0;
    border-radius: 14px;
    background: #fff;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.join-seat-chooser__option:hover,
.join-seat-chooser__option:focus-visible {
    border-color: #2270C8;
    background: #F3F8FE;
    outline: none;
    transform: translateY(-1px);
}

.join-seat-chooser__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #E8F1FC;
    color: #1C5EB2;
}

.join-seat-chooser__icon--onsite {
    background: #FFF3E3;
    color: #C26A06;
}

.join-seat-chooser__icon svg {
    width: 20px;
    height: 20px;
}

.join-seat-chooser__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.join-seat-chooser__text strong {
    color: #11243A;
    font-size: 15px;
    font-weight: 700;
}

.join-seat-chooser__text small {
    color: #6A7889;
    font-size: 12.5px;
}

.join-seat-chooser__text small:empty {
    display: none;
}

.join-seat-chooser__cancel {
    margin-top: 12px;
    padding: 6px 14px;
    border: 0;
    background: none;
    color: #6A7889;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.join-seat-chooser__cancel:hover {
    color: #11243A;
}

/* Small message at the bottom after sending */
.join-seat-toast {
    position: fixed;
    inset-inline: 16px;
    bottom: 20px;
    z-index: 2001;
    max-width: 420px;
    margin: 0 auto;
    padding: 12px 16px;
    border-radius: 14px;
    background: #0E7A45;
    box-shadow: 0 16px 36px -14px rgba(12, 28, 48, .5);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease;
}

.join-seat-toast.is-error {
    background: #C2410C;
}

.join-seat-toast.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes join-seat-in {
    from { opacity: 0; transform: scale(.94); }
    to { opacity: 1; transform: none; }
}

@keyframes join-seat-pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes join-seat-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes join-seat-pulse {
    50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
    .join-seat-sent.is-new,
    .join-seat-sent.is-new .join-seat-sent__icon,
    .join-seat-chooser,
    .join-seat-chooser__box,
    .join-seat-form.is-sending button svg {
        animation: none;
    }
}
