.rocket-bottom-tab {
    --rocket-bottom-tab-height: 46px;
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 99999;
    width: min(600px, calc(100vw - 32px));
    transform: translate(-50%, calc(100% - var(--rocket-bottom-tab-height)));
    transition: transform 320ms ease;
    font: inherit;
}

.rocket-bottom-tab.is-open {
    transform: translate(-50%, 0);
}

.rocket-bottom-tab__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    min-width: 220px;
    height: var(--rocket-bottom-tab-height);
    margin: 0 auto;
    padding: 0 22px;
    border: 1px solid #d8d8d8;
    border-radius: 5px 5px 0 0;
    background: var(--rocket-tab-bg, #111111);
    color: var(--rocket-tab-text, #ffffff);
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.rocket-bottom-tab__toggle:hover {
    filter: brightness(1.12);
}

.rocket-bottom-tab__toggle:focus-visible,
.rocket-bottom-tab__panel a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: -4px;
}

.rocket-bottom-tab__icon {
    position: relative;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}

.rocket-bottom-tab__icon::before,
.rocket-bottom-tab__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.rocket-bottom-tab__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform 200ms ease;
}

.rocket-bottom-tab.is-open .rocket-bottom-tab__icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.rocket-bottom-tab__panel {
    max-height: 65vh;
    overflow-y: auto;
    background: var(--rocket-panel-bg, #111111);
    color: var(--rocket-panel-text, #ffffff);
    border: 1px solid #d8d8d8;
    border-bottom: 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.14);
}

.rocket-bottom-tab__content {
    padding: 24px 28px 28px;
    font-size: 15px;
}

.rocket-bottom-tab__content > :first-child {
    margin-top: 0;
}

.rocket-bottom-tab__content > :last-child {
    margin-bottom: 0;
}

.rocket-bottom-tab__content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

@media (max-width: 640px) {
    .rocket-bottom-tab {
        left: 0;
        width: 100%;
        transform: translateY(calc(100% - var(--rocket-bottom-tab-height)));
    }

    .rocket-bottom-tab.is-open {
        transform: translateY(0);
    }

    .rocket-bottom-tab__toggle {
        width: 100%;
        min-width: 0;
        padding-left: 18px;
        padding-right: 18px;
        border-radius: 0;
    }

    .rocket-bottom-tab__content {
        padding: 22px 20px 26px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rocket-bottom-tab,
    .rocket-bottom-tab__icon::after {
        transition: none;
    }
}
