/* =========================================================
   JAMAL PLATFORM
   PWA INSTALL BANNER
   install-banner.css
   ========================================================= */

#jamal-install-banner {
    --jamal-gold: #d8a62a;
    --jamal-gold-light: #f0c85a;
    --jamal-gold-dark: #9f7414;

    --jamal-bg: rgba(14, 17, 22, 0.97);
    --jamal-bg-light: rgba(27, 31, 39, 0.96);

    --jamal-text: #ffffff;
    --jamal-muted: #b9bec7;

    --jamal-border: rgba(216, 166, 42, 0.32);

    position: fixed;

    left: 20px;
    right: 20px;
    bottom: 20px;

    width: auto;
    max-width: 760px;

    margin: 0 auto;

    direction: rtl;

    display: block;

    z-index: 2147483000;

    color: var(--jamal-text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(35px)
        scale(.97);

    filter: blur(4px);

    transition:
        opacity .45s ease,
        transform .45s cubic-bezier(.22, 1, .36, 1),
        filter .45s ease,
        visibility .45s ease;
}


/* =========================================================
   ACTIVE
   ========================================================= */

#jamal-install-banner.jamal-install-visible {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0)
        scale(1);

    filter: blur(0);
}


/* =========================================================
   INNER CARD
   ========================================================= */

#jamal-install-banner .jamal-install-inner {

    position: relative;

    display: flex;

    align-items: center;

    gap: 20px;

    padding: 18px 22px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            rgba(27, 31, 39, .98),
            rgba(12, 15, 20, .98)
        );

    border: 1px solid var(--jamal-border);

    border-radius: 20px;

    box-shadow:
        0 18px 55px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 255, 255, .02) inset,
        0 0 35px rgba(216, 166, 42, .07);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* =========================================================
   GOLD TOP LINE
   ========================================================= */

#jamal-install-banner .jamal-install-inner::before {

    content: "";

    position: absolute;

    top: 0;
    right: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--jamal-gold),
            var(--jamal-gold-light),
            var(--jamal-gold),
            transparent
        );

    opacity: .85;
}


/* =========================================================
   PROGRESS
   ========================================================= */

#jamal-install-progress {

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    overflow: hidden;

    z-index: 10;

    pointer-events: none;
}


#jamal-install-progress span {

    display: block;

    width: 100%;
    height: 100%;

    transform-origin: right center;

    background:
        linear-gradient(
            90deg,
            var(--jamal-gold-dark),
            var(--jamal-gold-light),
            var(--jamal-gold)
        );

    box-shadow:
        0 0 8px rgba(216, 166, 42, .75);

    transition:
        transform .1s linear,
        background 1s ease;
}


/* =========================================================
   LAST 5 SECONDS
   ========================================================= */

#jamal-install-banner.jamal-install-ending
.jamal-install-progress span {

    background:
        linear-gradient(
            90deg,
            #a85d20,
            #d98b32,
            #b96b20
        );

    box-shadow:
        0 0 10px rgba(217, 139, 50, .55);
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

#jamal-install-close {

    position: absolute;

    top: 10px;
    left: 10px;

    width: 30px;
    height: 30px;

    padding: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .06);

    color: rgba(255, 255, 255, .78);

    font-size: 21px;
    line-height: 1;

    cursor: pointer;

    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease,
        border-color .2s ease;

    z-index: 20;
}


#jamal-install-close:hover {

    transform: rotate(90deg);

    color: #ffffff;

    background:
        rgba(180, 45, 45, .8);

    border-color:
        rgba(255, 100, 100, .35);
}


#jamal-install-close:active {

    transform:
        rotate(90deg)
        scale(.92);
}


/* =========================================================
   LOGO
   ========================================================= */

#jamal-install-banner .jamal-install-logo {

    flex: 0 0 auto;

    width: 66px;
    height: 66px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        radial-gradient(
            circle at center,
            rgba(216, 166, 42, .18),
            rgba(216, 166, 42, .04) 65%,
            transparent 70%
        );

    border: 1px solid rgba(216, 166, 42, .25);

    box-shadow:
        0 0 25px rgba(216, 166, 42, .08);

    overflow: hidden;
}


#jamal-install-banner .jamal-install-logo img {

    width: 82%;
    height: 82%;

    object-fit: contain;

    display: block;

    filter:
        drop-shadow(
            0 5px 12px rgba(0, 0, 0, .4)
        );
}


/* =========================================================
   CONTENT
   ========================================================= */

#jamal-install-banner .jamal-install-content {

    flex: 1;

    min-width: 0;

    padding-left: 18px;
}


/* =========================================================
   TITLE
   ========================================================= */

#jamal-install-banner .jamal-install-title {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 5px;
}


#jamal-install-banner
.jamal-install-title strong {

    display: block;

    font-size: 18px;

    font-weight: 800;

    line-height: 1.5;

    color: #ffffff;
}


#jamal-install-banner
.jamal-install-title small {

    display: block;

    margin-top: 2px;

    font-size: 12px;

    font-weight: 400;

    line-height: 1.5;

    color: var(--jamal-muted);
}


#jamal-install-banner .jamal-install-icon {

    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        rgba(216, 166, 42, .10);

    border:
        1px solid rgba(216, 166, 42, .22);

    font-size: 19px;
}


/* =========================================================
   IOS INSTRUCTIONS
   ========================================================= */

#jamal-install-banner
.jamal-ios-instructions {

    margin-top: 12px;

    padding: 12px;

    border-radius: 13px;

    background:
        rgba(255, 255, 255, .035);

    border:
        1px solid rgba(255, 255, 255, .055);

    animation:
        jamalIOSFade .35s ease both;
}


#jamal-install-banner
.jamal-ios-title {

    margin-bottom: 8px;

    color: var(--jamal-gold-light);

    font-size: 13px;

    font-weight: 800;
}


#jamal-install-banner
.jamal-ios-steps {

    display: flex;

    flex-wrap: wrap;

    gap: 8px 15px;
}


#jamal-install-banner
.jamal-ios-step {

    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 11px;

    line-height: 1.6;

    color: var(--jamal-muted);
}


#jamal-install-banner
.jamal-ios-step strong {

    color: #ffffff;

    font-weight: 700;
}


#jamal-install-banner
.jamal-step-number {

    width: 22px;
    height: 22px;

    flex: 0 0 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(216, 166, 42, .12);

    border:
        1px solid rgba(216, 166, 42, .25);

    color:
        var(--jamal-gold-light);

    font-size: 10px;

    font-weight: 800;
}


#jamal-install-banner
.jamal-share-icon {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 19px;
    height: 19px;

    margin-right: 3px;

    border-radius: 5px;

    color:
        var(--jamal-gold-light);

    background:
        rgba(216, 166, 42, .1);

    font-weight: 800;
}


/* =========================================================
   INSTALL BUTTON
   ========================================================= */

#jamal-install-button {

    position: relative;

    min-width: 185px;

    height: 46px;

    margin-top: 12px;

    padding: 0 20px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    overflow: hidden;

    border: 1px solid rgba(255, 215, 100, .42);

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #d8a62a,
            #b98316
        );

    color: #15110a;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 7px 22px rgba(216, 166, 42, .18),
        0 1px 0 rgba(255, 255, 255, .25) inset;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}


#jamal-install-button:hover {

    transform:
        translateY(-2px);

    filter:
        brightness(1.08);

    box-shadow:
        0 10px 30px rgba(216, 166, 42, .28),
        0 1px 0 rgba(255, 255, 255, .3) inset;
}


#jamal-install-button:active {

    transform:
        translateY(0)
        scale(.97);
}


#jamal-install-button:focus-visible {

    outline: 2px solid var(--jamal-gold-light);

    outline-offset: 3px;
}


/* =========================================================
   BUTTON ICON
   ========================================================= */

#jamal-install-banner
.jamal-button-icon {

    font-size: 17px;

    transition:
        transform .25s ease;
}


#jamal-install-button:hover
.jamal-button-icon {

    transform:
        translateY(-2px);
}


/* =========================================================
   GOLD SHINE
   ========================================================= */

#jamal-install-banner
.jamal-button-shine {

    position: absolute;

    top: -50%;

    right: -100%;

    width: 45%;

    height: 200%;

    transform:
        rotate(20deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, .78),
            rgba(255, 240, 180, .95),
            transparent
        );

    filter:
        blur(2px);

    opacity: 0;

    pointer-events: none;
}


/*
   هذه الكلاس سيضيفها JavaScript بعد ثانيتين
   من ظهور الشريط.
*/

#jamal-install-banner
.jamal-button-shine.jamal-shine-active {

    animation:
        jamalGoldSweep 1.15s
        cubic-bezier(.4, 0, .2, 1)
        forwards;
}


/* =========================================================
   OPTIONAL ATTENTION
   ========================================================= */

#jamal-install-banner
.jamal-button-attention {

    animation:
        jamalButtonAttention .55s ease;
}


/* =========================================================
   IOS BUTTON MODE
   ========================================================= */

#jamal-install-banner.jamal-ios-mode
#jamal-install-button {

    background:
        linear-gradient(
            135deg,
            #d8a62a,
            #b98316
        );
}


/* =========================================================
   INSTALLED / HIDDEN
   ========================================================= */

#jamal-install-banner[hidden] {

    display: none !important;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes jamalGoldSweep {

    0% {

        right: -100%;

        opacity: 0;

    }

    15% {

        opacity: 1;

    }

    80% {

        opacity: 1;

    }

    100% {

        right: 150%;

        opacity: 0;

    }
}


@keyframes jamalButtonAttention {

    0% {

        transform:
            scale(1);

    }

    35% {

        transform:
            scale(1.035);

    }

    70% {

        transform:
            scale(.985);

    }

    100% {

        transform:
            scale(1);

    }
}


@keyframes jamalIOSFade {

    from {

        opacity: 0;

        transform:
            translateY(7px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    #jamal-install-banner {

        left: 10px;
        right: 10px;

        bottom: 10px;

        max-width: none;
    }


    #jamal-install-banner
    .jamal-install-inner {

        gap: 12px;

        padding: 16px 14px 15px;

        border-radius: 18px;
    }


    #jamal-install-banner
    .jamal-install-logo {

        width: 52px;
        height: 52px;

        border-radius: 14px;
    }


    #jamal-install-banner
    .jamal-install-content {

        padding-left: 7px;
    }


    #jamal-install-banner
    .jamal-install-title {

        gap: 7px;
    }


    #jamal-install-banner
    .jamal-install-icon {

        width: 32px;
        height: 32px;

        flex-basis: 32px;

        border-radius: 9px;

        font-size: 16px;
    }


    #jamal-install-banner
    .jamal-install-title strong {

        font-size: 15px;
    }


    #jamal-install-banner
    .jamal-install-title small {

        font-size: 10px;
    }


    #jamal-install-button {

        width: 100%;

        min-width: 0;

        height: 43px;

        font-size: 13px;

        margin-top: 10px;
    }


    #jamal-install-close {

        top: 7px;
        left: 7px;

        width: 27px;
        height: 27px;

        font-size: 19px;
    }


    #jamal-install-banner
    .jamal-ios-steps {

        display: block;
    }


    #jamal-install-banner
    .jamal-ios-step {

        margin-bottom: 7px;

        font-size: 10px;
    }


    #jamal-install-banner
    .jamal-ios-step:last-child {

        margin-bottom: 0;
    }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 390px) {

    #jamal-install-banner {

        left: 7px;
        right: 7px;

        bottom: 7px;
    }


    #jamal-install-banner
    .jamal-install-inner {

        padding: 14px 11px;
    }


    #jamal-install-banner
    .jamal-install-logo {

        width: 45px;
        height: 45px;

        border-radius: 12px;
    }


    #jamal-install-banner
    .jamal-install-title strong {

        font-size: 14px;
    }


    #jamal-install-banner
    .jamal-install-title small {

        font-size: 9px;
    }


    #jamal-install-button {

        height: 41px;

        font-size: 12px;
    }

}


/* =========================================================
   LANDSCAPE MOBILE
   ========================================================= */

@media (
    max-width: 900px
) and (
    orientation: landscape
) {

    #jamal-install-banner {

        bottom: 7px;

        left: 15px;
        right: 15px;
    }


    #jamal-install-banner
    .jamal-install-inner {

        padding: 11px 18px;

        gap: 15px;
    }


    #jamal-install-banner
    .jamal-install-logo {

        width: 45px;
        height: 45px;
    }


    #jamal-install-button {

        margin-top: 6px;

        height: 39px;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (
    min-width: 701px
) and (
    max-width: 1100px
) {

    #jamal-install-banner {

        max-width: 680px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    #jamal-install-banner,
    #jamal-install-banner *,
    #jamal-install-banner::before,
    #jamal-install-banner::after {

        animation-duration: .01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: .01ms !important;

        scroll-behavior: auto !important;
    }

}


/* =========================================================
   SAFE AREA - iPHONE / iPAD
   ========================================================= */

@supports (
    padding-bottom: env(safe-area-inset-bottom)
) {

    #jamal-install-banner {

        bottom:
            calc(
                10px +
                env(safe-area-inset-bottom)
            );
    }

}


/* =========================================================
   DARK MODE
   ========================================================= */

@media (prefers-color-scheme: dark) {

    #jamal-install-banner
    .jamal-install-inner {

        background:
            linear-gradient(
                135deg,
                rgba(24, 28, 36, .98),
                rgba(9, 12, 17, .99)
            );
    }

}


/* =========================================================
   HIGH CONTRAST
   ========================================================= */

@media (prefers-contrast: more) {

    #jamal-install-banner
    .jamal-install-inner {

        border-color:
            rgba(216, 166, 42, .65);
    }


    #jamal-install-banner
    .jamal-install-title strong {

        color: #ffffff;
    }


    #jamal-install-banner
    .jamal-install-title small {

        color: #d4d7dc;
    }

}