/* PWA: modo standalone (sin barra del navegador) */
.smx-pwa-install__inner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #f8fafc;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.875rem;
    max-width: 520px;
    margin: 0 auto;
}

.smx-pwa-install__inner--ios {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}

.smx-pwa-install__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.smx-pwa-install__text span {
    opacity: 0.9;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.smx-pwa-install__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.smx-pwa-install__btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.875rem;
    background: #22c55e;
    color: #052e16;
    white-space: nowrap;
}

.smx-pwa-install__btn:active {
    transform: scale(0.98);
}

.smx-pwa-install__close {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
}

.smx-pwa-install__btn--secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.smx-pwa-install__inner--installed {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
}

/* Modal guía de instalación manual */
.smx-pwa-guide-modal {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.smx-pwa-guide-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.smx-pwa-guide-steps li:last-child {
    border-bottom: none;
}

.smx-pwa-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.smx-pwa-step-text {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.45;
    padding-top: 2px;
}

.smx-pwa-menu-icon {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 700;
    vertical-align: middle;
    line-height: 1;
}

/* Overlay pantalla completa tras vincular token (login POS) */
.smx-pwa-install-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    animation: smxOverlayIn 0.35s ease-out;
}

@keyframes smxOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.smx-pwa-install-overlay__panel {
    width: 100%;
    max-width: 420px;
    background: #fff;
    color: #0f172a;
    border-radius: 20px 20px 16px 16px;
    padding: 1.5rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
}

.smx-pwa-install-overlay__badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

@media (display-mode: standalone) {
    body {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .smx-browser-only-hint {
        display: none !important;
    }

    .navbar,
    nav.navbar {
        padding-top: env(safe-area-inset-top, 0px);
    }

    .login-container {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

@media not (display-mode: standalone) {
    .smx-standalone-only-hint {
        display: none !important;
    }
}
