.tnx-bet-slip {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 920;
    width: min(430px, calc(100vw - 40px));
    display: flex;
    flex-direction: column-reverse;
    filter: drop-shadow(0 18px 34px rgba(18, 23, 28, .22));
}

.tnx-bet-slip[hidden],
.tnx-slip-panel[hidden] {
    display: none;
}

.tnx-slip-bar {
    width: 100%;
    min-height: 66px;
    padding: 11px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    gap: 15px;
    align-items: center;
    border: 1px solid #26292d;
    border-radius: 15px;
    background: #17191c;
    color: #fff;
    text-align: left;
}

.tnx-slip-bar > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tnx-slip-bar > span:nth-child(2) {
    text-align: right;
}

.tnx-slip-bar strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tnx-slip-bar small {
    margin: 2px 0 0;
    color: #b9bec5;
    font-size: 10px;
}

.tnx-slip-chevron {
    font-size: 18px;
    transition: transform .18s ease;
}

.tnx-bet-slip.is-expanded .tnx-slip-chevron {
    transform: rotate(180deg);
}

.tnx-slip-panel {
    max-height: min(70vh, 650px);
    margin-bottom: 8px;
    overflow: auto;
    border: 1px solid #dfe3e7;
    border-radius: 18px;
    background: #fff;
}

.tnx-slip-panel-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 17px 18px 13px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border-bottom: 1px solid #eceef1;
    background: rgba(255, 255, 255, .97);
}

.tnx-slip-panel-head h2 {
    margin: 2px 0 0;
    font-size: 21px;
}

.tnx-slip-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tnx-slip-close {
    width: 32px;
    height: 32px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eceef0;
    color: #555b62;
    font-size: 21px;
    line-height: 1;
}

.tnx-slip-clear {
    padding: 6px 8px;
    background: transparent;
    color: #737a83;
    font-size: 11px;
}

.tnx-slip-selections {
    padding: 2px 18px;
}

.tnx-slip-selection {
    padding: 13px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    border-bottom: 1px solid #eceef1;
}

.tnx-slip-selection > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tnx-slip-selection > div:last-child {
    align-items: flex-end;
    flex-direction: row;
    gap: 8px;
}

.tnx-slip-selection span {
    overflow: hidden;
    color: #6f7680;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tnx-slip-selection button {
    width: 27px;
    height: 27px;
    padding: 0;
    border-radius: 50%;
    background: #f0f2f4;
    color: #626971;
    font-size: 18px;
    line-height: 1;
}

.tnx-slip-submit-grid {
    padding: 16px 18px 18px;
    display: grid;
    gap: 13px;
}

.tnx-slip-submit-grid > label {
    margin: 0;
    font-size: 12px;
}

.tnx-slip-stake-input {
    margin-top: 6px;
    display: flex;
    align-items: center;
    border: 1px solid #cbd2d9;
    border-radius: 10px;
    background: #fff;
}

.tnx-slip-stake-input input {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    border: 0;
    box-shadow: none;
}

.tnx-slip-stake-input span {
    flex: 0 0 auto;
    padding-right: 12px;
    color: #747b84;
    font-size: 11px;
    white-space: nowrap;
}

.tnx-slip-submit-grid dl {
    margin: 0;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-radius: 10px;
    background: #f5f6f7;
}

.tnx-slip-submit-grid dl div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tnx-slip-submit-grid dt {
    color: #747b84;
    font-size: 10px;
}

.tnx-slip-submit-grid dd {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.tnx-slip-submit {
    width: 100%;
    min-height: 47px;
}

.tnx-slip-note {
    margin: -3px 2px 0;
    color: #747b84;
    font-size: 10px;
    line-height: 1.45;
}

.tnx-slip-error {
    margin: 12px 18px 0;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 12px;
}

.tnx-slip-option {
    width: 100%;
    border: 1px solid var(--tnx-line, #dfe3e7);
    background: #fff;
    color: inherit;
    text-align: left;
}

.tnx-slip-option.is-selected {
    border-color: #17191c;
    background: #f2f4f5;
    box-shadow: inset 0 0 0 1px #17191c;
}

.tnx-history-section {
    margin-top: 34px;
}

.tnx-combo-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.tnx-combo-history-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.tnx-combo-history-head > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tnx-combo-history-head span,
.tnx-combo-history-card > time {
    color: #747b84;
    font-size: 11px;
}

.tnx-combo-history-legs {
    margin: 15px 0;
    border-block: 1px solid #eceef1;
}

.tnx-combo-history-legs a {
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: inherit;
    font-size: 12px;
    text-decoration: none;
}

.tnx-combo-history-legs a + a {
    border-top: 1px solid #eceef1;
}

.tnx-combo-history-legs a span:last-child {
    flex: 0 0 auto;
    color: #747b84;
}

.tnx-combo-history-summary {
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tnx-combo-history-summary dt {
    color: #747b84;
    font-size: 9px;
}

.tnx-combo-history-summary dd {
    margin: 3px 0 0;
    font-size: 12px;
    font-weight: 800;
}

@media (min-width: 761px) {
    .tnx-has-bet-slip .legal-footer {
        padding-bottom: 105px;
    }
}

@media (max-width: 760px) {
    .tnx-bet-slip {
        right: 8px;
        bottom: calc(72px + env(safe-area-inset-bottom));
        width: calc(100vw - 16px);
    }

    .tnx-slip-panel {
        max-height: min(62vh, 560px);
    }

    .tnx-has-bet-slip main.tnx-page {
        padding-bottom: 184px;
    }

    .tnx-combo-history-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .tnx-slip-bar {
        grid-template-columns: minmax(0, 1fr) auto 18px;
        gap: 9px;
    }

    .tnx-combo-history-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tnx-slip-chevron {
        transition: none;
    }
}
