/* Оформление заказа витрины: шторка снизу на телефоне (большой палец достаёт до кнопки), окно по центру с 720px. */
.co { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.co[hidden] { display: none; }
.co__fog { position: absolute; inset: 0; background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: co-fade .18s ease both; }
.co__card {
    position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
    padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0;
    background: var(--v2-surface, #111); border: 1px solid var(--v2-line-strong, rgba(255,255,255,.12)); border-bottom: 0;
    box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .9); color: var(--v2-text, #F5F5F5);
    animation: co-up .26s var(--v2-ease, cubic-bezier(.22,.8,.26,1)) both;
}
.co__card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: #333; margin: 0 auto 10px; }
body.co-lock { overflow: hidden !important; }

.co__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.co__title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.co__close { width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 50%; background: none; color: var(--v2-muted, #9A9A9A); cursor: pointer; display: grid; place-items: center; }
.co__close:hover { color: var(--v2-text, #F5F5F5); background: var(--v2-surface-2, #161616); }

.co__item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--v2-surface-2, #161616); border: 1px solid var(--v2-line, rgba(255,255,255,.06)); margin-bottom: 14px; }
.co__thumb { width: 52px; height: 52px; flex: none; border-radius: 12px; overflow: hidden; background: #1d1d1d center/60% no-repeat; }
.co__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* звёзды, Premium, TON - те же иконки и тот же красный на красной подложке, что у плиток главной */
.co__thumb--stars, .co__thumb--premium, .co__thumb--ton { background-color: rgba(229, 9, 20, .10); background-size: 26px 26px; }
.co__thumb--stars { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E50914'%3E%3Cpath d='M12 2.5l2.9 6.3 6.9.6-5.2 4.6 1.6 6.8L12 17l-6.2 3.8 1.6-6.8L2.2 9.4l6.9-.6L12 2.5z'/%3E%3C/svg%3E"); }
.co__thumb--premium { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E50914' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 4 8l8 13.5L20 8l-8-5.5z'/%3E%3Cpath d='M4 8h16'/%3E%3C/svg%3E"); }
.co__thumb--ton { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E50914'%3E%3Cpath d='M12 2C6.5 2 2 6.1 2 11.1c0 1 .2 2 .5 2.9L11 21.6c.3.3.5.4.9.4s.7-.1.9-.4l8.6-7.6c.4-.9.6-1.9.6-2.9C22 6.1 17.5 2 12 2zm-1 15.9L6.4 13l3.7-6.4c.2-.3.5-.5.9-.5s.7.2.9.5L15.6 13 11 17.9z'/%3E%3C/svg%3E"); }
.co__item-text { flex: 1; min-width: 0; }
.co__item-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co__item-sub { font-size: 12.5px; color: var(--v2-muted, #9A9A9A); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co__item-price { font-size: 17px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

.co__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.co__field[hidden] { display: none; }
.co__label { font-size: 13px; color: var(--v2-muted, #9A9A9A); }
.co__label--row { margin-bottom: 8px; }
.co__input {
    min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--v2-line-strong, rgba(255,255,255,.12));
    background: var(--v2-bg, #0A0A0A); color: var(--v2-text, #F5F5F5); font-weight: 500; font-size: 16px; line-height: 1; font-family: inherit;   /* 16px: iPhone не зумит */
}
.co__input:focus { outline: none; border-color: rgba(229, 9, 20, .6); box-shadow: 0 0 0 3px rgba(229, 9, 20, .15); }
.co__hint { font-size: 12px; color: var(--v2-dim, #6B6B6B); }
.co__static { font: 600 14px/1.45 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; word-break: break-all; padding: 10px 12px; border-radius: 12px; background: var(--v2-surface-2, #161616); }

.co__methods { display: flex; flex-direction: column; gap: 8px; }
.co-method {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 14px 10px 44px; position: relative;
    border-radius: 12px; border: 1px solid var(--v2-line-strong, rgba(255,255,255,.12)); background: var(--v2-surface-2, #161616);
    color: inherit; text-align: left; cursor: pointer; font-family: inherit;
}
.co-method[hidden] { display: none; }
.co-method::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid #555; box-sizing: border-box; }
.co-method[aria-checked="true"] { border-color: var(--v2-red, #E50914); background: var(--v2-red-soft, rgba(229,9,20,.1)); }
.co-method[aria-checked="true"]::before { border: 5px solid var(--v2-red, #E50914); }
.co-method__title { font-size: 15px; font-weight: 700; }
.co-method__desc { font-size: 12.5px; color: var(--v2-muted, #9A9A9A); }
.co-method__desc.is-short { color: #FF4A53; }   /* красный сайта, светлее для мелкого текста */

.co__coins { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin-top: 8px; }
.co__coins[hidden] { display: none; }
.co-coin { display: flex; flex-direction: column; align-items: flex-start; min-height: 46px; padding: 7px 9px; min-width: 0; border-radius: 12px; border: 1px solid var(--v2-line-strong, rgba(255,255,255,.12)); background: var(--v2-bg, #0A0A0A); color: inherit; cursor: pointer; font-family: inherit; text-align: left; }
.co-coin b { font-size: 14px; }
.co-coin span { font-size: 11.5px; color: var(--v2-muted, #9A9A9A); }
.co-coin[aria-checked="true"] { border-color: var(--v2-red, #E50914); }

.co__topup { width: 100%; min-height: 46px; margin-top: 8px; border-radius: 12px; border: 1px solid var(--v2-line-strong, rgba(255,255,255,.12));
    background: var(--v2-surface-2, #161616); color: var(--v2-text, #F5F5F5); font-weight: 600; font-size: 14px; line-height: 1; font-family: inherit; cursor: pointer; }
.co__topup:hover { background: var(--v2-surface-3, #1D1D1D); }
.co__topup[hidden] { display: none; }
.co__pay {
    width: 100%; min-height: 54px; margin-top: 16px; border: 0; border-radius: 14px; background: var(--v2-red, #E50914); color: #fff;
    box-shadow: 0 10px 28px -14px rgba(229, 9, 20, .8);
    font-weight: 800; font-size: 16px; line-height: 1; font-family: inherit; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .18s, opacity .18s;
}
.co__pay:hover { background: var(--v2-red-hover, #F2121E); }
.co__pay:disabled { opacity: .45; cursor: not-allowed; }
.co__note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--v2-muted, #9A9A9A); text-align: center; }
.co__err { margin: 8px 0 0; font-size: 13.5px; line-height: 1.4; color: #FF4A53; text-align: center; min-height: 0; }
.co__err:empty { display: none; }

@keyframes co-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes co-fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 720px) {
    .co { align-items: center; }
    .co__card { border-radius: 20px; border-bottom: 1px solid var(--v2-line-strong, rgba(255,255,255,.12)); padding: 18px 22px 22px; }
    .co__card::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .co__card, .co__fog { animation: none; } }

.co__alt { display: block; margin: 6px auto 0; min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--v2-muted, #9A9A9A);
    font-weight: 500; font-size: 13px; line-height: 1.3; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.co__alt:hover { color: var(--v2-text, #F5F5F5); }

/* 21.10: «Подставить @мой_username» под полями, где нужен username (static/js/checkout.js, meSync) */
.me-chip { display: inline-flex; align-items: center; min-height: 32px; margin-top: 6px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--v2-line-strong, rgba(255,255,255,.12)); background: var(--v2-surface-2, #161616); color: var(--v2-text, #F5F5F5);
    font-weight: 600; font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer; align-self: flex-start; transition: border-color .15s, background .15s; }
.me-chip:hover { border-color: rgba(229, 9, 20, .6); background: var(--v2-surface-3, #1D1D1D); }
.me-chip:focus-visible { outline: 2px solid var(--v2-red, #E50914); outline-offset: 2px; }
.me-chip[hidden] { display: none; }

/* 21.10: СБП - подтверждение прямо здесь (почта для чека, сумма, комиссия), магазин сразу открывает банк */
.co__sbp { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.co__sbp[hidden] { display: none; }
.co__check { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 10px 14px; border-radius: 12px;
    background: var(--v2-surface-2, #161616); border: 1px solid var(--v2-line, rgba(255,255,255,.08)); }
.co__check > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co__check dt { color: var(--v2-muted, #9A9A9A); }
.co__check dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.co__check-total { margin-top: 2px; padding-top: 8px; border-top: 1px dashed var(--v2-line-strong, rgba(255,255,255,.12)); }
.co__check-total dt { color: var(--v2-text, #F5F5F5); font-weight: 600; }
.co__safe { margin: 0; font-size: 12.5px; color: var(--v2-muted, #9A9A9A); }
/* автозаполнение браузера не красит поля в светло-голубой */
.co__input { color-scheme: dark; }
.co__input:-webkit-autofill, .co__input:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--v2-text, #F5F5F5); caret-color: var(--v2-text, #F5F5F5);
    -webkit-box-shadow: 0 0 0 1000px var(--v2-bg, #0A0A0A) inset; box-shadow: 0 0 0 1000px var(--v2-bg, #0A0A0A) inset;
    transition: background-color 600000s 0s, color 600000s 0s; }
.co__input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--v2-text, #F5F5F5);
    -webkit-box-shadow: 0 0 0 1000px var(--v2-bg, #0A0A0A) inset, 0 0 0 3px rgba(229, 9, 20, .15);
    box-shadow: 0 0 0 1000px var(--v2-bg, #0A0A0A) inset, 0 0 0 3px rgba(229, 9, 20, .15); }
