/* TransferHub · Instalación PWA compartida */
[data-pwa-install-button][hidden] {
    display: none !important;
}

[data-pwa-install-button]:disabled {
    opacity: .65;
    cursor: progress;
    transform: none !important;
}

#th-pwa-install-float {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px));
    z-index: 2147483000;
}

#th-pwa-install-float[hidden],
.th-pwa-modal[hidden],
.th-pwa-toast[hidden] {
    display: none !important;
}

.th-pwa-float-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,.15);
    background:
        radial-gradient(circle at 85% 10%, rgba(34,211,238,.24), transparent 36%),
        linear-gradient(135deg, #07111f, #0f172a 58%, #172554);
    color: #fff;
    border-radius: 18px;
    min-height: 52px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(2,6,23,.30);
    font: 800 13px/1.1 Inter, ui-sans-serif, system-ui, sans-serif;
}

.th-pwa-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: grid;
    place-items: center;
    padding:
        max(18px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
    background: rgba(2,6,23,.70);
    backdrop-filter: blur(8px);
}

.th-pwa-dialog {
    width: min(100%, 470px);
    max-height: 86vh;
    overflow: auto;
    border-radius: 26px;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 30px 90px rgba(2,6,23,.42);
    border: 1px solid #e2e8f0;
}

.th-pwa-dialog-head {
    padding: 22px 22px 15px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
}

.th-pwa-dialog-logo {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    background: #0f172a;
    color: #fff;
    font-size: 24px;
}

.th-pwa-dialog-title {
    margin: 1px 0 0;
    font-size: 18px;
    font-weight: 900;
}

.th-pwa-dialog-text {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.th-pwa-dialog-body {
    padding: 18px 22px 4px;
}

.th-pwa-step {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 11px;
    align-items: start;
    margin-bottom: 15px;
}

.th-pwa-step-n {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 900;
}

.th-pwa-step strong {
    display: block;
    font-size: 13px;
    margin: 1px 0 2px;
}

.th-pwa-step span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.th-pwa-dialog-actions {
    padding: 14px 22px 22px;
    display: flex;
    justify-content: flex-end;
}

.th-pwa-close {
    border: 0;
    border-radius: 13px;
    background: #0f172a;
    color: #fff;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.th-pwa-toast {
    position: fixed;
    left: 50%;
    bottom: max(82px, calc(env(safe-area-inset-bottom) + 82px));
    transform: translateX(-50%);
    z-index: 2147483002;
    width: min(calc(100vw - 28px), 460px);
    border-radius: 15px;
    background: #0f172a;
    color: #fff;
    padding: 11px 14px;
    box-shadow: 0 14px 40px rgba(2,6,23,.32);
    font: 700 12px/1.35 Inter, ui-sans-serif, system-ui, sans-serif;
    text-align: center;
}

@media print {
    [data-pwa-install-button],
    #th-pwa-install-float,
    .th-pwa-modal,
    .th-pwa-toast {
        display: none !important;
    }
}
