/* ===== P2P / Кассы — solution2 palette ===== */

/* --- Выбор кассы --- */
.cashier-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.cashier-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    border: 1px solid #373744;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    border-radius: 14px;
    color: #8288a1;
    transition: border-color .2s, box-shadow .2s, transform .15s, color .15s;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.cashier-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.cashier-card span {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #c8cde0;
}

.cashier-card small {
    font-size: 12px;
    color: #8288a1;
    line-height: 1.35;
}

.cashier-card:hover {
    border-color: rgba(93, 186, 141, 0.4);
    box-shadow: 0 4px 18px rgba(0,0,0,.4);
    transform: translateY(-2px);
    color: #c8cde0;
}

.cashier-card.active {
    border-color: rgba(93, 186, 141, 0.6);
    box-shadow: 0 0 0 1px rgba(93, 186, 141, 0.18) inset, 0 4px 18px rgba(0,0,0,.4);
    background: linear-gradient(1deg, rgba(93,186,141,.07) 0%, rgba(41,41,50,0) 100%), linear-gradient(1deg, #25252e 30%, #292932 100%);
    color: #5dba8d;
}

.cashier-card.active span { color: #5dba8d; }

.cashier-pane { display: none; }
.cashier-pane.active { display: block; }

/* --- Основной контейнер --- */
.p2p-solution-card {
    padding: 20px !important;
}

/* --- Заглушка нет касс --- */
.p2p-disabled-box {
    padding: 20px;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px dashed #373744;
    color: #8288a1;
    font-size: 13px;
    text-align: center;
}

/* ===== Шаги P2P ===== */
.p2p-step {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    position: relative;
}

.p2p-step:last-child { margin-bottom: 0; }

.p2p-step::after {
    content: '';
    position: absolute;
    left: 17px;
    top: 44px;
    bottom: -20px;
    width: 2px;
    background: #373744;
}

.p2p-step:last-child::after { display: none; }

.p2p-step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex: 0 0 36px;
    background: #2a2a34;
    border: 2px solid #373744;
    color: #8288a1;
    transition: background .2s, border-color .2s, color .2s;
}

.p2p-step.active .p2p-step-icon {
    background: linear-gradient(135deg, #5dba8d, #38644f);
    border-color: rgba(93,186,141,.5);
    color: #fff;
    box-shadow: 0 0 12px rgba(93,186,141,.3);
}

.p2p-step.completed .p2p-step-icon {
    background: linear-gradient(135deg, #5dba8d, #38644f);
    border-color: rgba(93,186,141,.4);
    color: #fff;
}

.p2p-step.disabled .p2p-step-icon { opacity: .4; }

.p2p-step-content { flex: 1; }

.p2p-step-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #c8cde0;
}

/* --- Поле суммы --- */
.p2p-amount {
    height: 46px;
    border-radius: 12px !important;
    background: #1e1e26 !important;
    color: #fff !important;
    border: 1px solid #373744 !important;
    font-size: 15px;
    transition: border-color .2s;
}

.p2p-amount:focus {
    border-color: rgba(93,186,141,.55) !important;
    box-shadow: 0 0 0 3px rgba(93,186,141,.08) !important;
    outline: none;
}

/* --- Сетка методов оплаты --- */
.p2p-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.p2p-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 116px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #373744;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    color: #c8cde0;
    transition: border-color .2s, transform .15s, box-shadow .2s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.p2p-method-btn.disabled {
    opacity: .4;
    pointer-events: none;
}

.p2p-method-btn:hover {
    border-color: rgba(93,186,141,.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

.p2p-method-btn.active {
    border-color: rgba(93,186,141,.65);
    background: linear-gradient(1deg, rgba(93,186,141,.08) 0%, rgba(41,41,50,0) 100%), linear-gradient(1deg, #25252e 30%, #292932 100%);
    box-shadow: 0 0 0 1px rgba(93,186,141,.15) inset, 0 6px 18px rgba(0,0,0,.4);
}

.p2p-method-image {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.p2p-method-name {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: #c8cde0;
}

.p2p-method-currency {
    font-size: 11px;
    color: #8288a1;
}

/* --- Блок подтверждения --- */
.p2p-details {
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    border: 1px solid #373744;
}

.p2p-method-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #373744;
}

.p2p-method-preview {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #fff;
    padding: 5px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.p2p-method-head-label {
    font-size: 11px;
    color: #8288a1;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.p2p-method-head-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* Поле реквизитов */
#p2p-requisites {
    height: 50px;
    border-radius: 12px 0 0 12px !important;
    background: #1e1e26 !important;
    color: #fff !important;
    border: 1px solid #373744 !important;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Кнопка копировать */
.p2p-copy {
    border-radius: 0 12px 12px 0 !important;
    background: linear-gradient(180deg, #5dba8d, #38644f) !important;
    border: none !important;
    color: #fff !important;
    width: 50px;
    transition: opacity .15s;
}

.p2p-copy:hover { opacity: .85; }

.p2p-copy--small {
    width: 38px;
    height: 38px;
    border-radius: 10px !important;
    margin-left: auto;
}

/* Инфо-блок (получатель / комментарий) */
.p2p-info-box {
    margin-top: 12px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(248,113,113,.2);
    display: grid;
    gap: 10px;
}

.p2p-info-line {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 10px;
    align-items: center;
}

.p2p-info-line span {
    font-size: 11px;
    color: #8288a1;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.p2p-info-line strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    word-break: break-word;
}

.p2p-info-line--text { grid-template-columns: 160px 1fr; }
.p2p-info-line--text strong { font-weight: 600; }

/* QR блок */
.p2p-qr-wrap {
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    border: 1px solid #373744;
    text-align: center;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.p2p-qr-placeholder {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-radius: 12px;
    background: rgba(255,255,255,.02);
    border: 1px dashed #373744;
    color: #8288a1;
}

.p2p-qr-placeholder i { font-size: 40px; color: #373744; }
.p2p-qr-placeholder span { font-size: 13px; }
.p2p-qr-title { font-size: 13px; font-weight: 700; color: #8288a1; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .4px; }

.p2p-qr-image {
    width: 200px;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    cursor: zoom-in;
}

.p2p-qr-wrap.has-qr .p2p-qr-placeholder { display: none !important; }
.p2p-qr-wrap.has-qr .p2p-qr-image { display: block !important; }
.p2p-qr-wrap.no-qr .p2p-qr-placeholder { display: flex !important; }
.p2p-qr-wrap.no-qr .p2p-qr-image { display: none !important; }

/* Блок суммы перевода */
.p2p-amount-box {
    margin: 16px 0;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(93,186,141,.3);
    background: rgba(93,186,141,.06);
    text-align: center;
}

/* Предупреждение */
.p2p-description-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 13px;
}

.p2p-description-box.danger {
    background: rgba(239,68,68,.12);
    border: 1px solid rgba(248,113,113,.2);
    color: #fca5a5;
}

.p2p-description-box.center { text-align: center; }

/* Кнопка "Я оплатил" */
.p2p-paid-btn {
    height: 46px;
    border-radius: 12px !important;
    background: radial-gradient(100% 100% at 50% 0, #4fea9f 0, #38644f 100%) !important;
    border: none !important;
    color: #0a1a10 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    margin-top: 14px;
    transition: opacity .15s, transform .15s;
}

.p2p-paid-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* ===== Статус ожидающей заявки ===== */
.p2p-status-card {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    border: 1px solid #373744;
}

.p2p-status-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.p2p-status-subtitle {
    font-size: 13px;
    color: #8288a1;
    margin-top: 4px;
}

.p2p-warning-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(251,191,36,.15);
    border: 1px solid rgba(251,191,36,.3);
    color: #fbbf24;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.p2p-pending-extra {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 8px;
}

.p2p-pending-code {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    word-break: break-word;
}

.p2p-pending-note {
    color: #8288a1;
    font-size: 12px;
    max-width: 420px;
    text-align: right;
}

.p2p-mini-label {
    font-size: 11px;
    color: #8288a1;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}

.p2p-mini-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.p2p-mini-value--compact {
    font-size: 18px;
    line-height: 1.2;
    word-break: break-word;
    color: #fff;
}

/* ===== История транзакций ===== */
.p2p-history-solution { padding-top: 8px !important; }

.p2p-history-table td,
.p2p-history-table th { vertical-align: middle !important; }

/* ===== Внешние кассы (cshost / payme / click / ya) ===== */
.gateway-pay-card {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(1deg, #25252e 30%, #292932 100%);
    border: 1px solid #373744;
}

.gateway-pay-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.gateway-pay-btn {
    height: 46px;
    border-radius: 12px !important;
    background: radial-gradient(100% 100% at 50% 0, #4fea9f 0, #38644f 100%) !important;
    border: none !important;
    color: #0a1a10 !important;
    font-weight: 700 !important;
    min-width: 200px;
    transition: opacity .15s, transform .15s;
}

.gateway-pay-btn:hover { opacity: .9; transform: translateY(-1px); }

.payment-info-line {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid #373744;
    color: #8288a1;
    font-size: 13px;
}

/* ===== QR Modal ===== */
.p2p-qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(10,10,18,.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.p2p-qr-modal.active { display: flex; }

.p2p-qr-modal-inner {
    position: relative;
    max-width: min(92vw, 720px);
    max-height: 92vh;
    background: #25252e;
    border: 1px solid #373744;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

.p2p-qr-modal-inner img {
    display: block;
    max-width: min(86vw, 640px);
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    margin: 0 auto;
    background: #fff;
    padding: 8px;
}

.p2p-qr-modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid #373744;
    border-radius: 50%;
    background: #1e1e26;
    color: #8288a1;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.p2p-qr-modal-close:hover { color: #fff; border-color: rgba(93,186,141,.4); }

/* ===== Подсказка «сначала выберите кассу» ===== */
.p2p-select-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,.02);
    border: 1px dashed #373744;
    color: #8288a1;
}

.p2p-select-hint i { font-size: 22px; color: #5dba8d; }
.p2p-select-hint span { font-weight: 600; font-size: 13px; }

/* ===== Адаптив ===== */
@media (max-width: 991px) {
    .p2p-step { gap: 12px; }
    .p2p-step-label { font-size: 14px; }
    .p2p-status-title, .p2p-mini-value { font-size: 18px; }
    .p2p-qr-image { width: 140px; }
    .p2p-info-line, .p2p-info-line--text { grid-template-columns: 1fr; }
    .p2p-pending-note { text-align: left; max-width: none; }
    .gateway-pay-grid { grid-template-columns: 1fr; }
    .gateway-pay-btn { width: 100%; }
}
