/*
==========================================================
ÉxitoSincero PWA Framework
Banner CSS
Versión: 1.0.0
==========================================================
*/

:root{

    --es-primary:#1B5E20;
    --es-primary-hover:#145218;

    --es-secondary:#F4F8F5;

    --es-white:#FFFFFF;

    --es-text:#222222;

    --es-muted:#666666;

    --es-border:#E5E5E5;

    --es-shadow:
        0 20px 50px rgba(0,0,0,.15);

    --es-radius:22px;

}

/* =======================================
FONDO
======================================= */

.es-pwa-banner{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.55);

    display:flex;

    justify-content:center;

    align-items:flex-end;

    z-index:999999;

    opacity:0;

    visibility:hidden;

    transition:.35s;

    padding:18px;

}

.es-pwa-banner.show{

    opacity:1;

    visibility:visible;

}

/* =======================================
CARD
======================================= */

.es-pwa-card{

    position:relative;

    width:100%;

    max-width:430px;

    background:var(--es-white);

    border-radius:var(--es-radius);

    box-shadow:var(--es-shadow);

    padding:28px;

    transform:translateY(80px);

    transition:.35s;

    animation:esFadeUp .35s ease;

}

.es-pwa-banner.show .es-pwa-card{

    transform:translateY(0);

}

/* =======================================
BOTÓN CERRAR
======================================= */

.es-pwa-close{

    position:absolute;

    right:14px;

    top:14px;

    border:none;

    background:none;

    cursor:pointer;

    font-size:28px;

    color:#999;

    transition:.25s;

}

.es-pwa-close:hover{

    color:#000;

}

/* =======================================
LOGO
======================================= */

.es-pwa-logo{

    display:flex;

    justify-content:center;

    margin-bottom:18px;

}

.es-pwa-logo img{

    width:88px;

    height:88px;

    border-radius:18px;

    object-fit:cover;

    box-shadow:0 8px 18px rgba(0,0,0,.12);

}

/* =======================================
CONTENIDO
======================================= */

.es-pwa-content{

    text-align:center;

}

.es-pwa-badge{

    display:inline-block;

    background:#EAF7EC;

    color:var(--es-primary);

    padding:6px 14px;

    border-radius:100px;

    font-size:12px;

    font-weight:700;

    letter-spacing:.8px;

    margin-bottom:16px;

    text-transform:uppercase;

}

#es-pwa-title{

    font-size:26px;

    font-weight:700;

    color:var(--es-text);

    margin-bottom:14px;

    line-height:1.25;

}

#es-pwa-description{

    font-size:16px;

    color:var(--es-muted);

    line-height:1.7;

    margin-bottom:24px;

}

/* =======================================
IOS
======================================= */

.es-pwa-ios{

    background:#F8F8F8;

    border-radius:16px;

    padding:18px;

    margin-bottom:25px;

}

.es-step{

    display:flex;

    align-items:center;

    gap:14px;

    margin-bottom:16px;

}

.es-step:last-child{

    margin-bottom:0;

}

.es-step-number{

    width:34px;

    height:34px;

    border-radius:50%;

    background:var(--es-primary);

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    font-weight:700;

    flex-shrink:0;

}

/* =======================================
BOTONES
======================================= */

.es-pwa-actions{

    display:flex;

    flex-direction:column;

    gap:12px;

}

.es-pwa-install{

    width:100%;

    background:var(--es-primary);

    color:#fff;

    border:none;

    border-radius:14px;

    padding:16px;

    font-size:17px;

    font-weight:700;

    cursor:pointer;

    transition:.25s;

}

.es-pwa-install:hover{

    background:var(--es-primary-hover);

}

#es-pwa-dismiss{

    display:block;

    width:100%;

    background:#ffffff;

    color:#222222;

    border:2px solid #e5e5e5;

    border-radius:14px;

    padding:15px;

    font-size:16px;

    font-weight:600;

    line-height:1.2;

    text-align:center;

    appearance:none;

    -webkit-appearance:none;

    opacity:1;

    visibility:visible;

}

#es-pwa-dismiss:hover{

    background:#F8F8F8;

}

/* =======================================
FOOTER
======================================= */

.es-pwa-footer{

    text-align:center;

    margin-top:18px;

}

.es-pwa-footer small{

    color:#888;

    font-size:13px;

    line-height:1.6;

}

/* =======================================
ANIMACIONES
======================================= */

@keyframes esFadeUp{

    from{

        opacity:0;

        transform:translateY(90px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* =======================================
RESPONSIVE
======================================= */

@media(max-width:480px){

    .es-pwa-card{

        padding:24px;

        border-radius:22px 22px 0 0;

    }

    #es-pwa-title{

        font-size:23px;

    }

    #es-pwa-description{

        font-size:15px;

    }

    .es-pwa-logo img{

        width:72px;

        height:72px;

    }

}

/* =======================================
MODO OSCURO
======================================= */

@media(prefers-color-scheme:dark){

    .es-pwa-card{

        background:#1B1B1B;

    }

    #es-pwa-title{

        color:#FFFFFF;

    }

    #es-pwa-description{

        color:#CCCCCC;

    }

    .es-pwa-ios{

        background:#2A2A2A;

    }

    .es-pwa-dismiss{

        background:#2A2A2A;

        color:#FFFFFF;

        border-color:#444;

    }

    .es-pwa-footer small{

        color:#BBBBBB;

    }

}