/* assets/style/pay.css */
.payRow{
    margin-top: 10px;
}

.payBtn{
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(11,15,25,.10);
    background: rgba(11,15,25,.03);
    padding: 12px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    cursor:pointer;
}
.payBtn:active{ transform: translateY(1px); }

.payLeft{
    display:flex;
    flex-direction:column;
    gap:4px;
    text-align:left;
    min-width:0;
}

.payPill{
    display:inline-flex;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 1000;
    background: rgba(29,78,216,.10);
    border: 1px solid rgba(29,78,216,.18);
    color: rgba(29,78,216,.95);
}

.payTxt{
    font-size: 12px;
    opacity: .75;
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.payChev{
    font-size: 22px;
    opacity: .55;
    flex: 0 0 auto;
}

/* overlay via body::before (sem elemento extra) */
body.pay-open::after{
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(11,15,25,.38);
    backdrop-filter: blur(4px);
    z-index: 2340;
}

/* sheet claro (igual drawer) */
.paySheet{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2350;

    color: var(--text-strong);
    background: var(--sheet);

    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    border: 1px solid var(--border-soft);
    border-bottom: 0;

    box-shadow: var(--shadowUp);
    transform: translateY(110%);
    transition: transform .22s ease;

    height: min(72vh, 620px);
    display: flex;
    flex-direction: column;

    padding-bottom: env(safe-area-inset-bottom);
    will-change: transform;
    overflow: hidden;
}
.paySheet.open{ transform: translateY(0); }
.paySheet.dragging{ transition: none; }

/* topo com handle (arrastar) */
.payTop{
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--border-soft);
}
.payTop::before{
    content:"";
    position:absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(2,6,23,.18);
}

/* botão fechar estilo claro */
#payClose.chatClose{
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,.75);
    color: var(--text-strong);
    cursor: pointer;
}

.payBody{
    position: relative;
    padding: 12px 14px 16px;
    overflow:auto;
}

.payCard{
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,.75);
    border-radius: 18px;
    padding: 14px;
}

.payCardTitle{
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 900;
}

.payCardValue{
    margin-top: 6px;
    font-size: 22px;
    font-weight: 1000;
    color: var(--text-strong);
}

.payHint{
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.payList{
    margin-top: 12px;
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.payItem{
    width: 100%;
    text-align:left;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,.75);
    padding: 12px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    cursor:pointer;
    color: var(--text-strong);
}
.payItem:active{ transform: translateY(1px); }

.payItem.on{
    border-color: rgba(249,213,21,.55);
    background: rgba(249,213,21,.14);
}

.payItemLeft{
    display:flex;
    align-items:center;
    gap: 10px;
    min-width:0;
}

.payIco{
    width: 36px;
    height: 36px;
    border-radius: 16px;
    display:grid;
    place-items:center;
    background: rgba(2,6,23,.06);
    border: 1px solid rgba(2,6,23,.08);
    flex: 0 0 auto;
}

.payItemTxt{
    display:flex;
    flex-direction:column;
    gap: 2px;
    min-width:0;
}

.payItemTitle{
    font-weight: 1000;
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.payItemSub{
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.payRadio{
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(2,6,23,.25);
    background: transparent;
    flex: 0 0 auto;
}
:is(.payItem.on, .paySavedCard.on) .payRadio{
    border-color: rgba(249,213,21,.95);
    background: rgba(249,213,21,.95);
}

/* botão adicionar método */
.payAddBtn{
    margin-top: 10px;
    width: 100%;
    border-radius: 18px;
    border: 1px dashed rgba(2,6,23,.22);
    background: rgba(255,255,255,.65);
    padding: 12px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    cursor:pointer;
    color: var(--text-strong);
    font-weight: 900;
}
.payAddBtn:active{ transform: translateY(1px); }
.payAddLeft{
    display:flex;
    align-items:center;
    gap: 10px;
    min-width:0;
}
.payAddIco{
    width: 36px;
    height: 36px;
    border-radius: 16px;
    display:grid;
    place-items:center;
    background: rgba(249,213,21,.16);
    border: 1px solid rgba(249,213,21,.30);
    flex: 0 0 auto;
}
.payAddTxt{
    display:flex;
    flex-direction:column;
    gap: 2px;
    min-width:0;
}
.payAddTitle{
    font-weight: 1000;
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
    text-align: left;
}
.payAddSub{
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}
.payAddChev{
    font-size: 22px;
    opacity: .45;
    flex: 0 0 auto;
}

.payCardHead{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 12px;
}

.payCardSub{
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.payMiniBadge{
    border-radius: 999px;
    background: rgba(249,213,21,.18);
    border: 1px solid rgba(249,213,21,.28);
    color: var(--text-strong);
    font-size: 11px;
    font-weight: 900;
    padding: 6px 10px;
    white-space: nowrap;
}

.payCardFoot{
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.paySection{
    margin-top: 14px;
}

.paySectionTitle{
    font-size: 13px;
    font-weight: 1000;
    color: var(--text-strong);
}

.paySectionRow{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.payTextBtn{
    border: 0;
    background: transparent;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
}

.paySavedCards{
    display:flex;
    flex-direction:column;
    gap: 10px;
}

.paySavedCard{
    border: 1px solid rgba(2,6,23,.08);
    background: rgba(255,255,255,.72);
    border-radius: 18px;
    overflow: hidden;
}

.paySavedCard.on{
    border-color: rgba(249,213,21,.42);
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

.paySavedMain{
    width:100%;
    border:0;
    background: transparent;
    padding: 14px 14px 10px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    cursor:pointer;
}

.paySavedInfo{
    display:flex;
    flex-direction:column;
    gap: 4px;
    min-width:0;
    text-align:left;
}

.paySavedTitle{
    font-weight: 1000;
    color: var(--text-strong);
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
}

.paySavedSub{
    font-size: 12px;
    color: var(--text-muted);
}

.paySavedActions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap: 8px;
    padding: 0 14px 14px;
}

.payActionBtn{
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(2,6,23,.10);
    background: #fff;
    color: var(--text-strong);
    font-weight: 900;
    padding: 0 14px;
    cursor:pointer;
}

.payActionBtn.danger{
    color: #b42318;
    border-color: rgba(180,35,24,.18);
    background: rgba(180,35,24,.05);
}

.payActionBtn:disabled{
    opacity: .45;
    cursor: default;
}

.payEmpty{
    border: 1px dashed rgba(2,6,23,.14);
    border-radius: 16px;
    padding: 14px;
    color: var(--text-muted);
    font-size: 13px;
    background: rgba(255,255,255,.5);
}

.payAddPanel{
    margin-top: 12px;
    border-radius: 18px;
    border: 1px solid rgba(2,6,23,.08);
    background: rgba(255,255,255,.72);
    padding: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.payField{
    display:flex;
    flex-direction:column;
    gap: 8px;
}

.payField + .payField{
    margin-top: 12px;
}

.payFieldLabel{
    font-size: 12px;
    font-weight: 900;
    color: var(--text-strong);
}

.payFieldInput{
    width:100%;
    background: #fff;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    color: var(--text-strong);
    padding: 12px 12px;
    outline: none;
}

.payCheckbox{
    display:flex;
    align-items:center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-strong);
    margin-bottom: 10px;
}

.payCardElement{
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(2,6,23,.10);
    background: #fff;
    padding: 14px 12px;
    box-shadow: 0 8px 18px rgba(15,23,42,.05);
    position: relative;
    overflow: hidden;
}

.payCardElement .StripeElement{
    width:100%;
}

.payCardElement.is-loading::before{
    content:"";
    position:absolute;
    inset: 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(226,232,240,.95) 0%, rgba(248,250,252,.98) 48%, rgba(226,232,240,.95) 100%);
    background-size: 220% 100%;
    animation: paySkeleton 1.1s linear infinite;
}

.payCardElement.StripeElement--focus,
.payCardElement .StripeElement--focus{
    border-color: rgba(249,213,21,.68);
}

.payCardElement.StripeElement--invalid,
.payCardElement .StripeElement--invalid{
    color: #b42318;
}

@keyframes paySkeleton{
    0%{ background-position: 200% 0; }
    100%{ background-position: -20% 0; }
}

.paySmall{
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.payMessage{
    margin-top: 12px;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(15,23,42,.06);
    color: var(--text-strong);
}

.payMessage.error{
    background: rgba(180,35,24,.08);
    color: #b42318;
}

.payMessage.success{
    background: rgba(16,185,129,.10);
    color: #027a48;
}

.payItem.is-disabled{
    opacity: .55;
    cursor: not-allowed;
}

.paySheet:not(.payPixSheet) .payBody > .payPixPanel{
    display: none !important;
}

.payPixOverlay{
    display: none !important;
}

.payPixSheet{
    z-index: 2365;
    height: min(74vh, 640px);
}

.payPixSheetBody{
    padding: 14px;
    overflow: auto;
    background:
        radial-gradient(circle at top, rgba(249,213,21,.14), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,249,232,.98));
}

.payPixPanel{
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.92);
}

.payPixPanelModal,
.payPixModal .payPixPanel{
    margin-top: 0;
    box-shadow: 0 20px 44px rgba(11,15,25,.10);
}

.payPixMessage{
    margin-top: 12px;
}

.payPixSub{
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.payPixQrWrap{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-top: 12px;
    min-height: 188px;
    border-radius: 18px;
    background: #fff;
    border: 1px dashed rgba(15,23,42,.14);
}

.payPixQr{
    width: 188px;
    max-width: 100%;
    height: auto;
    display: block;
}

.payPixQrFallback{
    color: var(--text-muted);
    font-size: 14px;
}

.payPixCode{
    width: 100%;
    min-height: 96px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.12);
    background: #fff;
    color: var(--text-strong);
    font: 500 13px/1.45 "Inter", system-ui, sans-serif;
    resize: none;
}

.payPixActions{
    display:flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.payPixActions .payActionBtn{
    flex: 1 1 0;
    min-width: 124px;
}

.payPixSuccess{
    min-height: 100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap: 14px;
    padding: 30px 20px 40px;
    text-align:center;
}

.payPixSuccessIconWrap{
    width: 112px;
    height: 112px;
    border-radius: 999px;
    display:grid;
    place-items:center;
    background:
        radial-gradient(circle at top, rgba(255,255,255,.45), transparent 46%),
        linear-gradient(180deg, #3fc47a, #1f9d57);
    box-shadow:
        0 20px 42px rgba(31,157,87,.30),
        inset 0 1px 0 rgba(255,255,255,.34);
    animation: payPixApprovedPop .38s ease;
}

.payPixSuccessIcon{
    color: #fff;
    font-size: 54px;
    font-weight: 1000;
    line-height: 1;
}

.payPixSuccessTitle{
    font-size: 24px;
    font-weight: 1000;
    color: #0b5b31;
}

.payPixSuccessSub{
    max-width: 260px;
    font-size: 14px;
    line-height: 1.5;
    color: #2f5e43;
}

@keyframes payPixApprovedPop{
    0%{
        transform: scale(.78);
        opacity: 0;
    }
    75%{
        transform: scale(1.06);
        opacity: 1;
    }
    100%{
        transform: scale(1);
        opacity: 1;
    }
}

@media (min-width: 1024px){
    .paySheet{
        left: 50%;
        transform: translate(-50%, 110%);
        width: min(560px, calc(100% - 24px));
        border-radius: 22px;
        bottom: 12px;
        border-bottom: 1px solid var(--border-soft);
    }
    .paySheet.open{
        transform: translate(-50%, 0);
    }
}
