/* app/static/css/paxor_wallet_actions.css */
.pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 100500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.66);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    box-sizing: border-box;
}
.pwa-modal[hidden] { display: none !important; }
.pwa-card {
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 22px;
    border: 1px solid rgba(6,217,255,.42);
    border-radius: 20px;
    background:
        linear-gradient(180deg,rgba(6,171,212,.14),rgba(0,0,0,.05)),
        rgba(10,15,20,.98);
    color: #fff;
    box-shadow: 0 0 30px rgba(6,217,255,.2),0 24px 70px rgba(0,0,0,.62);
    box-sizing: border-box;
}
.pwa-header,.pwa-account-row,.pwa-summary {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.pwa-header { margin-bottom:16px; }
.pwa-header small { color:rgba(232,251,255,.58);font-size:11px;font-weight:800;letter-spacing:.08em; }
.pwa-header h2 { margin:4px 0 0;font-size:24px; }
.pwa-close {
    width:38px;height:38px;border:1px solid rgba(255,255,255,.15);border-radius:11px;
    background:rgba(255,255,255,.05);color:#fff;cursor:pointer;
}
.pwa-account-row {
    padding:13px;border:1px solid rgba(6,171,212,.28);border-radius:14px;background:rgba(6,171,212,.08);
}
.pwa-network-icon img { width:34px;height:34px;object-fit:contain; }
.pwa-account-row > div:nth-child(2) { min-width:0;flex:1; }
.pwa-account-row strong,.pwa-account-row span { display:block; }
.pwa-account-row span { margin-top:3px;color:rgba(232,251,255,.62);font-size:12px; }
.pwa-chip { padding:6px 9px;border-radius:999px;background:rgba(0,204,255,.12);color:#9eefff!important;font-weight:800; }
.pwa-view { margin-top:18px; }
.pwa-view label { display:block;margin-bottom:15px;color:#eafcff;font-size:13px;font-weight:700; }
.pwa-view input,.pwa-view select {
    width:100%;min-height:48px;margin-top:7px;padding:11px 13px;border:1px solid rgba(6,171,212,.34);
    border-radius:12px;background:rgba(5,9,13,.92);color:#fff;font-size:16px;outline:none;box-sizing:border-box;
}
.pwa-view input:focus,.pwa-view select:focus { border-color:rgba(6,217,255,.75);box-shadow:0 0 0 3px rgba(6,217,255,.08); }
.pwa-amount-row { display:flex;gap:8px; }
.pwa-amount-row button { margin-top:7px;padding:0 14px;border:1px solid rgba(6,217,255,.4);border-radius:12px;background:rgba(6,171,212,.14);color:#9eefff;font-weight:800;cursor:pointer; }
.pwa-summary { padding:10px 2px;border-bottom:1px solid rgba(255,255,255,.08);font-size:13px; }
.pwa-primary {
    width:100%;min-height:50px;margin-top:18px;border:1px solid rgba(6,217,255,.55);border-radius:13px;
    background:linear-gradient(180deg,#0a9bc2,#037d9c);color:#fff;font-size:15px;font-weight:800;cursor:pointer;
}
.pwa-primary:disabled { opacity:.6;cursor:not-allowed; }
.pwa-message { display:none;margin-top:14px;padding:11px 12px;border-radius:11px;font-size:13px; }
.pwa-message.show { display:block; }
.pwa-message.info { background:rgba(6,171,212,.12);color:#bfefff; }
.pwa-message.success { background:rgba(53,208,127,.13);color:#8fffc1; }
.pwa-message.error { background:rgba(255,105,105,.13);color:#ffb0b0; }
.pwa-swap-box { padding:15px;border:1px solid rgba(6,171,212,.28);border-radius:14px;background:rgba(6,171,212,.08); }
.pwa-swap-box div { display:flex;align-items:center;gap:10px; }
.pwa-swap-box input { margin-top:8px; }


/* PAXOR QR / WALLET ACTIONS — COMPACT MODE */
.pwa-modal{padding:10px}
.pwa-card{width:min(100%,430px);max-height:calc(100vh - 20px);padding:15px;border-radius:16px}
.pwa-header{margin-bottom:10px}
.pwa-header h2{margin-top:2px;font-size:20px;line-height:1.15}
.pwa-header small{font-size:9px}
.pwa-close{width:32px;height:32px;border-radius:9px}
.pwa-account-row{padding:9px 10px;border-radius:11px}
.pwa-network-icon img{width:28px;height:28px}
.pwa-account-row strong{font-size:13px}
.pwa-account-row span{margin-top:1px;font-size:10px}
.pwa-chip{padding:4px 7px;font-size:10px!important}
.pwa-view{margin-top:11px}
.pwa-view label{margin-bottom:9px;font-size:11px}
.pwa-view input,.pwa-view select{min-height:38px;margin-top:4px;padding:7px 10px;border-radius:9px;font-size:14px}
.pwa-amount-row{gap:6px}
.pwa-amount-row button{margin-top:4px;padding:0 11px;border-radius:9px;font-size:11px}
.pwa-summary{padding:7px 2px;font-size:11px}
.pwa-primary{min-height:41px;margin-top:11px;border-radius:10px;font-size:13px}
.pwa-message{margin-top:8px;padding:8px 9px;border-radius:9px;font-size:11px}
.pwa-swap-box{padding:10px;border-radius:11px}
.pwa-swap-box input{margin-top:5px}
.pwa-hint,.pwa-receive-hint{margin-top:7px;font-size:10px;line-height:1.35}
.pwa-receive-result{margin-top:10px;padding:10px;border-radius:11px}
.pwa-receive-qr-frame{width:min(100%,185px);margin-bottom:9px;padding:8px;border-radius:13px}
.pwa-receive-link{font-size:10px;line-height:1.3}
.pwa-receive-actions{gap:7px;margin-top:9px}
.pwa-secondary{min-height:36px;border-radius:9px;font-size:11px}
@media (max-height:760px){
.pwa-card{width:min(100%,410px);padding:12px}
.pwa-header{margin-bottom:8px}
.pwa-account-row{padding:7px 9px}
.pwa-view{margin-top:8px}
.pwa-view label{margin-bottom:7px}
.pwa-view input,.pwa-view select{min-height:35px}
.pwa-primary{min-height:38px;margin-top:8px}
.pwa-receive-qr-frame{width:min(100%,160px)}
}

/* Centered QR and polished copy button */
.pwa-receive-result{display:flex;flex-direction:column;align-items:center}
.pwa-receive-result[hidden]{display:none!important}
.pwa-receive-qr-frame{margin-left:auto;margin-right:auto}
.pwa-receive-actions{width:100%;justify-content:center}
.pwa-copy-link-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:190px;padding:0 16px;background:linear-gradient(180deg,rgba(10,155,194,.24),rgba(3,125,156,.14));border-color:rgba(143,234,255,.52);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 8px 20px rgba(3,125,156,.12);transition:transform .16s ease,filter .16s ease,border-color .16s ease}
.pwa-copy-link-btn:hover{transform:translateY(-1px);filter:brightness(1.12);border-color:rgba(143,234,255,.82)}
.pwa-copy-link-btn.copied{color:#8fffc1;border-color:rgba(53,208,127,.62);background:rgba(53,208,127,.12)}
.pwa-copy-link-btn i{width:16px;text-align:center}

/* Inline Paxor QR link with compact copy icon */
.pwa-receive-link-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 2px;
}

.pwa-receive-link-row .pwa-receive-link {
    min-width: 0;
    max-width: calc(100% - 38px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #8feaff !important;
    text-decoration: none;
}

.pwa-receive-link-row .pwa-receive-link:visited,
.pwa-receive-link-row .pwa-receive-link:hover,
.pwa-receive-link-row .pwa-receive-link:active {
    color: #8feaff !important;
}

.pwa-copy-link-icon {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(143, 234, 255, .46);
    border-radius: 9px;
    background: rgba(3, 125, 156, .15);
    color: #bff5ff;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.pwa-copy-link-icon:hover {
    transform: translateY(-1px);
    background: rgba(3, 125, 156, .28);
    border-color: rgba(143, 234, 255, .78);
}

.pwa-copy-link-icon.copied {
    color: #8fffc1;
    background: rgba(53, 208, 127, .13);
    border-color: rgba(53, 208, 127, .62);
}

.pwa-copy-link-icon i {
    font-size: 13px;
}

/* Final spacing and icon cleanup */
.pwa-create-qr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pwa-create-qr-btn i {
    flex: 0 0 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1;
}

.pwa-create-qr-btn span {
    display: inline-block;
    line-height: 1.2;
}

.pwa-copy-link-icon {
    width: 28px;
    height: 28px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #bff5ff;
}

.pwa-copy-link-icon:hover {
    transform: scale(1.08);
    background: transparent !important;
    border: 0 !important;
}

.pwa-copy-link-icon.copied {
    color: #8fffc1;
    background: transparent !important;
    border: 0 !important;
}

.pwa-copy-link-icon i {
    font-size: 17px;
}

/* Hard spacing fix for Create Paxor QR button */
#pwa-create-receive-qr {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#pwa-create-receive-qr > i {
    display: inline-block !important;
    flex: 0 0 auto !important;
    margin: 0 12px 0 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

#pwa-create-receive-qr > span {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* Send transaction progress states */
#pwa-send-submit,
.pwa-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        filter .18s ease,
        background .18s ease;
}

#pwa-send-submit > i,
.pwa-primary > i {
    flex: 0 0 auto;
}

#pwa-send-submit.is-loading {
    border-color: rgba(143, 234, 255, .82);
    background:
        linear-gradient(90deg, rgba(6, 171, 212, .92), rgba(0, 204, 255, .78)),
        #037d9c;
    box-shadow: 0 0 22px rgba(6, 217, 255, .28);
}

#pwa-send-submit.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 18%, rgba(255, 255, 255, .24) 46%, transparent 74%);
    transform: translateX(-120%);
    animation: pwaButtonSweep 1.3s ease-in-out infinite;
    pointer-events: none;
}

#pwa-send-submit.is-loading > i {
    animation: pwaSpin .9s linear infinite;
}

#pwa-send-submit.is-waiting {
    background:
        linear-gradient(90deg, rgba(91, 157, 255, .86), rgba(6, 171, 212, .78)),
        #075f86;
}

#pwa-send-submit.is-confirmed {
    border-color: rgba(53, 208, 127, .74);
    background: linear-gradient(180deg, rgba(53, 208, 127, .72), rgba(23, 139, 82, .78));
    box-shadow: 0 0 20px rgba(53, 208, 127, .22);
}

#pwa-send-submit.is-error {
    border-color: rgba(255, 195, 74, .62);
    background: linear-gradient(180deg, rgba(255, 195, 74, .22), rgba(132, 92, 24, .36));
    color: #ffe0a3;
}

#pwa-send-gas.pwa-gas-loading {
    color: #9eefff;
}

#pwa-send-gas.pwa-gas-loading::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 6px;
    display: inline-block;
    border: 2px solid rgba(158, 239, 255, .28);
    border-top-color: #9eefff;
    border-radius: 50%;
    vertical-align: -1px;
    animation: pwaSpin .8s linear infinite;
}

#pwa-send-gas.pwa-gas-ready {
    color: #8fffc1;
}

#pwa-send-gas.pwa-gas-warning {
    color: #ffd56a;
}

#pwa-send-gas.pwa-gas-muted {
    color: rgba(232, 251, 255, .52);
}

@keyframes pwaSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pwaButtonSweep {
    0% {
        transform: translateX(-120%);
    }

    60%,
    100% {
        transform: translateX(120%);
    }
}
