/* Buy-points sheet — site-wide (nav account menu + booking pages) */

.book-credits-sheet.fb-sheet {
    --fb-sheet-primary: #4361ee;
    --fb-sheet-border: #e0e3e7;
    position: fixed;
    inset: 0;
    z-index: 100060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.book-credits-sheet.fb-sheet[hidden] {
    display: none !important;
}

.book-credits-sheet .fb-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.22s ease;
    border: none;
    padding: 0;
    cursor: pointer;
}

.book-credits-sheet.is-open .fb-sheet__backdrop {
    opacity: 1;
}

.book-credits-sheet.is-closing .fb-sheet__backdrop {
    opacity: 0;
}

.book-credits-sheet .book-credits-sheet__panel,
.book-credits-sheet .fb-sheet__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    height: min(86vh, 720px);
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 28px 28px 0 0;
    border: 1px solid #e8eaed;
    box-shadow: none;
    overflow: hidden;
    font-family: 'GM', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 100%;
    box-sizing: border-box;
    transform: translateY(110%);
    opacity: 0.96;
    transition:
        transform 0.34s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.28s ease;
    will-change: transform;
    padding-bottom: 0;
}

.book-credits-sheet.is-open .fb-sheet__panel {
    transform: translateY(0);
    opacity: 1;
}

.book-credits-sheet.is-closing .fb-sheet__panel {
    transform: translateY(110%);
    opacity: 0.96;
}

.book-credits-sheet .fb-sheet__handle {
    display: block;
    width: 40px;
    height: 5px;
    margin: 0.65rem auto 0.35rem;
    border: none;
    border-radius: 99px;
    background: #d1d5db;
    cursor: pointer;
    padding: 0;
}

.book-credits-sheet .fb-sheet__head {
    flex-shrink: 0;
    padding: 0 1rem 0.75rem;
    border-bottom: 1px solid var(--fb-sheet-border);
    background: #fff;
}

.book-credits-sheet .fb-sheet__head-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.book-credits-sheet .fb-sheet__head-row h2 {
    flex: 1;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    min-width: 0;
}

.book-credits-sheet .fb-sheet__icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
}

.book-credits-sheet__sub {
    margin: 0.15rem 0 0;
    padding: 0 0.15rem;
    color: #6b7280;
    font-size: 0.86rem;
    line-height: 1.4;
    text-align: start;
}

.book-credits-sheet__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.5rem 1rem 1rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.book-credits-sheet__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 10rem;
    color: #6b7280;
    text-align: center;
}

.book-credits-sheet__loading[hidden],
.book-credits-packages[hidden],
.book-credits-sheet__error[hidden] {
    display: none !important;
}

.book-credits-sheet__spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(28, 68, 148, 0.15);
    border-top-color: #1c4494;
    animation: book-credits-spin 0.75s linear infinite;
}

@keyframes book-credits-spin {
    to { transform: rotate(360deg); }
}

.book-credits-sheet__error {
    margin: 0.65rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b42318;
    font-size: 0.85rem;
    text-align: start;
}

.book-credits-packages {
    display: grid;
    gap: 0.65rem;
}

.book-credits-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.85rem 0.9rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    text-align: start;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: none;
}

.book-credits-card:hover {
    border-color: #c7d2fe;
    background: #f8faff;
}

.book-credits-card.is-selected {
    border-color: #1c4494;
    background: #f3f6ff;
}

.book-credits-card__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    color: #c9891a;
    flex-shrink: 0;
}

.book-credits-card__main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.book-credits-card__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.book-credits-card__title {
    font-size: 0.95rem;
    font-weight: 750;
    color: #111827;
}

.book-credits-card__badge {
    display: inline-flex;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.68rem;
    font-weight: 700;
}

.book-credits-card__price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1c4494;
}

.book-credits-card__price-was {
    display: inline-block;
    margin-inline-end: 0.35rem;
    font-size: 0.9em;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}

.book-credits-card__price-now {
    display: inline-block;
    color: #1c4494;
}

.book-credits-card__hint {
    font-size: 0.78rem;
    color: #6b7280;
}

.book-credits-card__check {
    color: #9ca3af;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.book-credits-card.is-selected .book-credits-card__check {
    color: #1c4494;
}

.book-credits-sheet__foot {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    padding: 0.75rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eef1f6;
    background: #fff;
    box-shadow: none;
}

.book-credits-pay {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    background: #1c4494;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: none;
}

.book-credits-pay:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.book-credits-pay.is-loading {
    opacity: 0.8;
    cursor: wait;
}

html[dir="rtl"] .book-credits-sheet__sub,
html[dir="rtl"] .book-credits-card,
html[dir="rtl"] .book-credits-sheet__error {
    font-family: 'GM', 'Segoe UI', Tahoma, sans-serif;
}

@media (max-width: 719px) {
    .book-credits-sheet.fb-sheet {
        align-items: stretch;
    }

    .book-credits-sheet .book-credits-sheet__panel,
    .book-credits-sheet .fb-sheet__panel {
        width: 100%;
        max-width: none;
        height: 100%;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        border: none;
        box-shadow: none;
        padding-top: env(safe-area-inset-top, 0px);
    }

    .book-credits-sheet .fb-sheet__handle {
        display: none;
    }

    .book-credits-sheet .fb-sheet__head {
        padding-top: 0.55rem;
        padding-inline: 0.9rem;
    }

    .book-credits-sheet__body {
        padding: 0.55rem 0.9rem 0.75rem;
    }

    .book-credits-packages {
        gap: 0.55rem;
        padding-bottom: 0.35rem;
    }

    .book-credits-card {
        padding: 0.75rem 0.8rem;
        gap: 0.6rem;
    }

    .book-credits-card__title {
        font-size: 0.9rem;
    }

    .book-credits-card__badge {
        font-size: 0.64rem;
        padding: 0.1rem 0.4rem;
    }

    .book-credits-sheet__foot {
        padding: 0.7rem 0.9rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (min-width: 720px) {
    .book-credits-sheet.fb-sheet {
        align-items: center;
        padding: 1.5rem;
    }

    .book-credits-sheet .fb-sheet__panel {
        border-radius: 28px;
    }
}

body.fb-sheet-open .mobile-tab-bar,
body.fb-sheet-open .smart-app-banner {
    display: none !important;
}

body.fb-sheet-open {
    overflow: hidden !important;
}
