.ts-checkout {
    --ink: #232641;
    --purple: #51449b;
    --line: #d9dce8;
    width: min(616px, calc(100% - 24px));
    max-height: min(92vh, 850px);
    max-height: min(92dvh, 850px);
    margin: auto;
    padding: 0;
    border: 1px solid #d3d4e3;
    border-radius: 22px;
    background: #fff;
    color: var(--ink);
    font: 400 15px/1.45 system-ui, sans-serif;
    box-shadow: 0 22px 80px #17132d45;
}
.ts-checkout[open] { display: flex; flex-direction: column; overflow: hidden; }
.ts-checkout::backdrop { background: rgb(28 25 51 / 52%); }
.ts-checkout *, .ts-checkout { box-sizing: border-box; }
.ts-checkout [hidden] { display: none !important; }
.ts-checkout button { font: inherit; cursor: pointer; }
.ts-checkout button:disabled { opacity: .65; cursor: wait; }
.ts-checkout > header {
    display: flex; flex: none; align-items: center; justify-content: space-between;
    padding: 17px 24px; color: #fff;
    background: radial-gradient(ellipse at 100% 110%, #6862a5, transparent 65%), #36345f;
}
.ts-checkout h2 { margin: 0; color: inherit; font-size: 23px; font-weight: 700; letter-spacing: -.025em; }
.ts-checkout [data-checkout-close] { width: 34px; height: 34px; border: 1px solid #ffffff60; border-radius: 50%; background: #ffffff13; color: #fff; font-size: 22px; line-height: 1; }
.ts-checkout [data-checkout-content], .ts-checkout form { min-height: 0; display: flex; flex-direction: column; margin: 0; }
.ts-checkout .ts-step-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; padding: 0 24px; gap: 14px; border-bottom: 1px solid #e9e8ef; }
.ts-step-tabs [role=tab] { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 2px; border: 0; border-bottom: 3px solid transparent; background: none; color: #66667b; font-size: 14px; font-weight: 600; }
.ts-step-tabs [role=tab] span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #f0f1f5; font-size: 12px; }
.ts-step-tabs [aria-selected=true] { border-color: #6c59bb; color: var(--purple); }
.ts-step-tabs [aria-selected=true] span { color: white; background: var(--purple); }
.ts-checkout .ts-checkout-body { overflow: auto; overscroll-behavior: contain; min-height: 0; padding: 18px 24px 20px; }
.ts-checkout .ts-recipient { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; }
.ts-checkout .ts-recipient span, .ts-checkout .ts-recipient strong { display: block; }
.ts-checkout .ts-recipient span { margin-bottom: 1px; color: #60637a; font-size: 12px; }
.ts-checkout .ts-recipient strong { font-size: 17px; overflow-wrap: anywhere; }
.ts-checkout .ts-fee-quote { text-align: right; flex-shrink: 0; }
.ts-checkout .ts-fee-quote strong { color: #315e50; font-size: 15px; }
.ts-checkout .ts-fee-quote small { font-size: 12px; font-weight: 500; }
.ts-checkout .ts-info { margin: 0 0 16px; padding: 10px 12px; display: flex; align-items: flex-start; gap: 9px; background: #f1effb; border: 1px solid #e4dff5; color: #463b74; border-radius: 10px; font-size: 13px; }
.ts-checkout .ts-info b { flex: none; width: 17px; height: 17px; margin-top: 1px; border: 1px solid currentColor; border-radius: 50%; text-align: center; line-height: 15px; font-size: 11px; }
.ts-checkout .ts-account-info { background: #eef7f3; border-color: #d3e9df; color: #285a4d; }
.ts-checkout .ts-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 16px; }
.ts-checkout .ts-field { min-width: 0; position: relative; }
.ts-checkout .ts-wide { grid-column: 1 / -1; }
.ts-checkout .ts-field label { display: block; margin: 0 0 5px; color: var(--ink); font-size: 14px; font-weight: 550; }
.ts-checkout select, .ts-checkout textarea, .ts-checkout input:not([type=checkbox]), .ts-checkout .select2-selection--single {
    width: 100%; height: 41px; border: 1px solid #bfc3d5; border-radius: 9px; background: #fff; color: var(--ink); font: inherit;
}
.ts-checkout input:not([type=checkbox]):not([type=tel]), .ts-checkout textarea, .ts-checkout select { padding: 8px 11px; }
.ts-checkout textarea { display: block; height: auto; min-height: 72px; resize: vertical; }
.ts-checkout input[type=tel] { padding-block: 8px; padding-right: 8px; }
.ts-checkout :is(input,textarea,button,a,[role=combobox]):focus-visible { outline: 2px solid #7866be; outline-offset: 2px; }
.ts-checkout .ts-field:has(.ts-error) :is(input,textarea,.select2-selection) { border-color: #b84253; }
.ts-checkout .ts-error { color: #a32740; font-size: 13px; margin: 4px 0 0; }
.ts-checkout .ts-agreement { margin-top: 18px; }
.ts-checkout .ts-agreement label { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; font-weight: 400; }
.ts-checkout .ts-agreement input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--purple); }
.ts-checkout .ts-residence label { display: inline-flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; }
.ts-checkout .ts-residence input { width: 16px; height: 16px; margin: 0; accent-color: var(--purple); }
.ts-checkout a { color: var(--purple); }
.ts-checkout footer { flex: none; display: flex; align-items: center; gap: 10px; border-top: 1px solid #e5e4ec; padding: 13px 24px; background: #fbfbfe; }
.ts-checkout [data-step-count] { margin-right: auto; font-size: 13px; color: #62647b; }
.ts-checkout footer button { min-height: 42px; padding: 8px 18px; border-radius: 9px; font-weight: 650; }
.ts-checkout .ts-confirm { background: var(--purple); color: #fff; border: 1px solid var(--purple); }
.ts-checkout .ts-confirm:hover { background: #423682; }
.ts-checkout [data-step-back] { border: 1px solid #cfcddd; color: #484563; background: #fff; }
.ts-checkout [data-checkout-status], .ts-checkout .ts-receipt { flex: none; padding: 14px 24px; margin: 0; background: #f2f3fd; color: #37375e; }
.ts-checkout [data-checkout-status][data-kind=error] { background: #fff1f2; color: #85263a; }
.ts-checkout .ts-receipt { background: #eef7f3; color: #244e42; }
.ts-checkout .ts-receipt p { margin: 0 0 6px; font-weight: 600; }
.ts-checkout .ts-next-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ts-checkout .ts-next-actions > * { padding: 9px 14px; border-radius: 9px; border: 1px solid var(--purple); background: #fff; color: var(--purple); font: inherit; font-weight: 600; }
.ts-checkout .ts-next-actions .ts-login { color: #fff; background: var(--purple); text-decoration: none; }
.ts-checkout .select2-container { font: inherit; }
.ts-checkout .select2-container .select2-selection--single .select2-selection__rendered { line-height: 39px; padding-left: 11px; padding-right: 30px; color: var(--ink); }
.ts-checkout .select2-container .select2-selection--single .select2-selection__arrow { height: 39px; right: 7px; }
.ts-checkout > .select2-container { z-index: 5; }
.ts-checkout .select2-dropdown { border-color: #aaa4c5; color: var(--ink); }
.ts-checkout .select2-search input.select2-search__field { height: 37px; }
.ts-checkout .select2-results__options { max-height: min(190px,28dvh); }
.ts-checkout .select2-results__option--highlighted[aria-selected], .ts-checkout .select2-results__option--highlighted.select2-results__option--selectable { background: var(--purple); color: white; }
.ts-checkout .iti { width: 100%; }
.ts-checkout .iti__selected-flag { border-radius: 8px 0 0 8px; }
.ts-checkout .ts-field > .iti--container { position: absolute; top: 100% !important; left: 0 !important; z-index: 6; }
.ts-checkout .iti__country-list { max-width: min(310px, 80vw); max-height: 180px; white-space: normal; }
.iti-mobile .ts-checkout .ts-field > .iti--container { position: fixed; inset: 12vh 20px !important; width: auto; }
.iti-mobile .ts-checkout .iti__country-list { max-width: none; max-height: 100%; }
@media (max-width: 520px) {
    .ts-checkout { width: calc(100% - 16px); max-height: 95dvh; border-radius: 16px; }
    .ts-checkout > header, .ts-checkout footer { padding: 12px 16px; }
    .ts-checkout h2 { font-size: 21px; }
    .ts-checkout .ts-checkout-body { padding: 13px 16px 16px; }
    .ts-checkout .ts-step-tabs { padding: 0 12px; gap: 8px; }
    .ts-checkout .ts-fields { gap: 11px 10px; }
    .ts-checkout .ts-contact-field { grid-column: 1 / -1; }
    .ts-checkout :is(input:not([type=checkbox]),textarea,select,.select2-selection--single) { font-size: 16px; }
}
