/* Профиль v2: карточка игрока + история промокодов */
.pc2 {
    --pc-card: #1b1f2c;
    --pc-input: #10131c;
    --pc-chip: #252b3d;
    --pc-line: rgba(255, 255, 255, .07);
    --pc-text: #ffffff;
    --pc-muted: #8a93ab;
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    padding: 20px !important;
    border-radius: 20px !important;
    color: var(--pc-text);
}

body.bw-light .pc2,
body.bw-light .ph-list {
    --pc-card: #ffffff;
    --pc-input: #f3f6fb;
    --pc-chip: #e4eaf5;
    --pc-line: rgba(20, 35, 70, .09);
    --pc-text: #1b2233;
    --pc-muted: #75809a;
}

.pc2 *,
.pc2 *::before,
.pc2 *::after {
    box-sizing: border-box;
}

.pc2-top {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.pc2 .pc2-ava {
    position: relative;
    flex: none;
    width: 88px !important;
    height: 88px !important;
    margin: 0 !important;
    padding: 3px;
    border-radius: 24px;
    background: var(--pc-chip);
    cursor: pointer;
    overflow: visible !important;
}

.pc2 .pc2-ava.vipr-ava--ring {
    background: linear-gradient(140deg, var(--c1), var(--c2));
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.pc2 .pc2-ava img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 21px !important;
    background: #0d1018;
    object-fit: cover;
}

.pc2-ava__edit {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 3px solid var(--pc-card);
    border-radius: 50%;
    background: #367cff;
    color: #fff;
    font-size: 12px;
}

.pc2-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.pc2-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc2-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pc2-meta span {
    padding: 3px 9px;
    border-radius: 8px;
    background: var(--pc-chip);
    color: var(--pc-muted);
    font-size: 12px;
    font-weight: 800;
}

.pc2-rank {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px 0 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--c1), var(--c2));
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.pc2-rank img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.pc2-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    border: 1px solid var(--pc-line);
    border-radius: 13px;
    background: var(--pc-chip);
    color: var(--pc-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.pc2-btn:hover {
    background: rgba(54, 124, 255, .2);
}

.pc2-btn.is-ready {
    border-color: transparent;
    background: linear-gradient(180deg, #4d8dff 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(54, 124, 255, .35);
}

.pc2-btn:disabled {
    opacity: .7;
}

.pc2 .pc2-wager {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: auto !important;
    min-height: 64px;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 1px solid rgba(255, 77, 109, .3) !important;
    border-radius: 14px !important;
    background: linear-gradient(90deg, rgba(255, 77, 109, .14), rgba(255, 77, 109, .04)) !important;
    color: var(--pc-text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.pc2-wager__ico {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 77, 109, .18);
    color: #ff5a7a;
    font-size: 15px;
}

.pc2-wager__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.pc2-wager__main span {
    color: var(--pc-muted);
    font-size: 12px;
    font-weight: 800;
}

.pc2-wager__main b {
    color: #ff5a7a;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

.pc2-wager__go {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255, 77, 109, .18);
    color: #ff8aa0;
    font-size: 12px;
    font-weight: 900;
}

.pc2-wager__go i {
    font-size: 10px;
}

/* История промокодов */
.ph-list {
    --pc-card: #1b1f2c;
    --pc-input: #10131c;
    --pc-line: rgba(255, 255, 255, .07);
    --pc-text: #ffffff;
    --pc-muted: #8a93ab;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 420px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.ph-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--pc-line);
    border-radius: 13px;
    background: var(--pc-input);
}

.ph-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(54, 124, 255, .15);
    color: #66a4ff;
    font-size: 14px;
}

.ph-main {
    min-width: 0;
}

.ph-main b {
    display: block;
    overflow: hidden;
    color: var(--pc-text);
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-main span {
    display: block;
    margin-top: 1px;
    color: var(--pc-muted);
    font-size: 12px;
    font-weight: 700;
}

.ph-sum {
    color: #22c55e;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.ph-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px;
    border: 1px dashed var(--pc-line);
    border-radius: 13px;
    color: var(--pc-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.ph-empty i {
    font-size: 20px;
}

@media (max-width: 560px) {
    .pc2 {
        padding: 16px !important;
        gap: 12px;
    }

    .pc2-top {
        gap: 14px;
    }

    .pc2 .pc2-ava {
        width: 76px !important;
        height: 76px !important;
        border-radius: 21px;
    }

    .pc2 .pc2-ava img {
        border-radius: 18px !important;
    }

    .pc2-name {
        font-size: 19px;
    }

    .pc2-wager__main b {
        font-size: 18px;
    }

    .ph-item {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px 10px;
    }

    .ph-ico {
        width: 34px;
        height: 34px;
    }
}

/* ---------- Окно «Сбросить вейджер» ---------- */
.ux-modal {
    z-index: 10400 !important;
}

body.ux-modal-open {
    overflow: hidden;
}

body.ux-modal-open .bw-bottom-dock,
body.ux-modal-open div[class^="_widget_"],
body.ux-modal-open div[class*=" _widget_"] {
    display: none !important;
}

.ux-modal__dialog {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

.ux-modal__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.ux-cond {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.ux-cond__state {
    flex: none;
    margin-left: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.ux-cond.is-ok .ux-cond__dot { background: #22c55e !important; box-shadow: 0 0 0 4px rgba(34, 197, 94, .15) !important; }
.ux-cond.is-ok .ux-cond__state { color: #22c55e; }
.ux-cond.is-bad { border-color: rgba(239, 68, 68, .45) !important; }
.ux-cond.is-bad .ux-cond__dot { background: #ef4444 !important; box-shadow: 0 0 0 4px rgba(239, 68, 68, .15) !important; }
.ux-cond.is-bad .ux-cond__state { color: #ff6b6b; }

.ux-block {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, .4);
    border-radius: 14px;
    background: rgba(245, 158, 11, .1);
    color: #fbbf24;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.ux-check.is-disabled {
    opacity: .5;
    pointer-events: none;
}

@media (max-width: 640px) {
    .ux-modal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .ux-modal__dialog {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 88vh;
        border-width: 1px 0 0 !important;
        border-radius: 22px 22px 0 0 !important;
        transform: translateY(100%) !important;
        transition: transform .28s cubic-bezier(.22, 1, .36, 1) !important;
    }

    .ux-modal.is-open .ux-modal__dialog {
        transform: translateY(0) !important;
    }

    .ux-modal__body {
        padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important;
    }
}