/* ==========================================
   eWazo PWA Modal
   Contrôle uniquement du nouveau système
   ========================================== */

/* Modal fermé */
.ewazo-pwa-modal {
    visibility: hidden;
}

/* Modal ouvert */
.ewazo-pwa-modal.show {
    visibility: visible;
}

/* Backdrop fermé */
.ewazo-pwa-backdrop {
    visibility: hidden;
    opacity: 0;
}

/* Backdrop ouvert */
.ewazo-pwa-backdrop.show {
    visibility: visible;
    opacity: 1;
}

/* Empêcher les transitions bizarres */
.ewazo-pwa-modal,
.ewazo-pwa-backdrop {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


/* ==========================================
   Icône officielle (favicon-white.png)
   ========================================== */

.ewazo-pwa-icon {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(19, 25, 33, 0.15);
}

.ewazo-pwa-modal .title {
    text-align: center;
    margin-bottom: 10px;
}

.ewazo-pwa-text {
    text-align: center;
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}


/* ==========================================
   Bascule Mode natif (Android / Desktop)
   vs Mode iOS (instructions manuelles)
   Par défaut : mode natif visible, mode iOS caché.
   La classe "is-ios" (ajoutée en JS selon la
   plateforme détectée) inverse cet affichage.
   ========================================== */

.ewazo-pwa-ios {
    display: none;
}

.ewazo-pwa-native {
    display: block;
}

.ewazo-pwa-modal.is-ios .ewazo-pwa-native {
    display: none;
}

.ewazo-pwa-modal.is-ios .ewazo-pwa-ios {
    display: block;
}


/* ==========================================
   Étapes d'installation iOS
   ========================================== */

.ewazo-pwa-ios-steps {
    list-style: none;
    padding-left: 0;
    margin: 0 0 14px;
}

.ewazo-pwa-ios-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-body, #131921);
    padding: 8px 0;
    border-bottom: 1px solid rgba(19, 25, 33, 0.06);
}

.ewazo-pwa-ios-steps li:last-child {
    border-bottom: none;
}

.ewazo-pwa-ios-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(23, 145, 56, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}


/* ==========================================
   Bouton discret "Installer" dans le haut du
   site (voir welcome.php, à proximité du lien
   de connexion). Caché par défaut : affiché
   uniquement en JS (installation.js) quand une
   installation est réellement possible, jamais
   sinon — pas de faux bouton inactif.
   ========================================== */

.ewazo-pwa-topbtn {
    display: none;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.ewazo-pwa-topbtn.show {
    display: inline-flex;
}

.ewazo-pwa-topbtn i {
    font-size: 13px;
}

@media (max-width: 380px) {
    .ewazo-pwa-topbtn {
        padding: 5px 8px;
        font-size: 11px;
    }
}
