/* ==================================================
   SIMSAR APP DOWNLOAD BANNER
   ================================================== */

:root {
    --simsar-banner-height: 0px;
}

body.simsar-banner-visible {
    padding-bottom:
        calc(
            var(--simsar-banner-height) +
            env(safe-area-inset-bottom, 0px)
        ) !important;
}

#simsar-app-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999999;
    width: 100%;
    padding:
        13px
        max(18px, env(safe-area-inset-right))
        calc(13px + env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
    color: #fcfcfc;
    background:
        linear-gradient(
            105deg,
            #171717 0%,
            #212121 54%,
            #2c2925 100%
        );
    border-top: 1px solid rgba(149, 122, 86, 0.55);
    box-shadow:
        0 -14px 45px rgba(0, 0, 0, 0.22);
    font-family:
        "Tajawal",
        "IBM Plex Sans Arabic",
        Arial,
        sans-serif;
    transform: translateY(110%);
    transition:
        transform 360ms cubic-bezier(.2,.7,.2,1),
        opacity 280ms ease;
    opacity: 0;
}

#simsar-app-banner.simsar-banner-active {
    transform: translateY(0);
    opacity: 1;
}

#simsar-app-banner *,
#simsar-app-banner *::before,
#simsar-app-banner *::after {
    box-sizing: border-box;
}

.simsar-banner-inner {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        38px;
    align-items: center;
    gap: 22px;
    width: min(1380px, 100%);
    margin: 0 auto;
}

.simsar-banner-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.simsar-banner-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    color: #212121;
    background:
        linear-gradient(
            135deg,
            #b89b75,
            #957a56
        );
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 16px;
    box-shadow:
        0 9px 25px rgba(0, 0, 0, 0.24);
    font-size: 25px;
    font-weight: 900;
}

.simsar-banner-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.simsar-banner-copy {
    min-width: 0;
    text-align: right;
}

.simsar-banner-label {
    display: block;
    margin-bottom: 2px;
    color: #b89b75;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
}

.simsar-banner-title {
    margin: 0;
    color: #fcfcfc;
    font-size: clamp(16px, 1.35vw, 21px);
    font-weight: 900;
    line-height: 1.35;
}

.simsar-banner-text {
    margin: 3px 0 0;
    overflow: hidden;
    color: rgba(252, 252, 252, 0.67);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simsar-banner-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.simsar-download-button {
    display: inline-flex;
    min-width: 158px;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 15px;
    color: #212121 !important;
    background: #fcfcfc;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 13px;
    text-decoration: none !important;
    transition:
        transform 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.simsar-download-button:hover {
    color: #212121 !important;
    background: #ffffff;
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

.simsar-download-button.is-disabled {
    cursor: default;
    opacity: 0.48;
    pointer-events: none;
}

.simsar-store-icon {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
}

.simsar-store-icon svg {
    display: block;
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.simsar-store-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.08;
    text-align: left;
}

.simsar-store-small {
    font-size: 9px;
    font-weight: 600;
}

.simsar-store-name {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 900;
}

.simsar-banner-close {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    color: rgba(252, 252, 252, 0.75);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
    transition:
        color 180ms ease,
        background 180ms ease;
}

.simsar-banner-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 850px) {
    #simsar-app-banner {
        padding-top: 11px;
        padding-bottom:
            calc(11px + env(safe-area-inset-bottom));
    }

    .simsar-banner-inner {
        grid-template-columns:
            minmax(0, 1fr)
            34px;
        gap: 11px;
    }

    .simsar-banner-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .simsar-download-button {
        flex: 1 1 50%;
        min-width: 0;
    }

    .simsar-banner-close {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 520px) {
    .simsar-banner-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 22px;
    }

    .simsar-banner-title {
        font-size: 15px;
    }

    .simsar-banner-text {
        font-size: 11.5px;
    }

    .simsar-download-button {
        min-height: 45px;
        padding: 7px 10px;
        border-radius: 11px;
    }

    .simsar-store-icon {
        flex-basis: 23px;
        width: 23px;
        height: 23px;
    }

    .simsar-store-icon svg {
        width: 22px;
        height: 22px;
    }

    .simsar-store-name {
        font-size: 12px;
    }

    .simsar-store-small {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #simsar-app-banner,
    .simsar-download-button {
        transition: none;
    }
}

@media print {
    #simsar-app-banner {
        display: none !important;
    }

    body.simsar-banner-visible {
        padding-bottom: 0 !important;
    }
}

/* SIMSAR_APP_COLORS_START */
#simsar-download-banner,
#simsar-app-banner {
    color: #111827 !important;
    background:
        linear-gradient(
            100deg,
            #fff7f5 0%,
            #ffffff 50%,
            #fde9e6 100%
        ) !important;
    border-top: 2px solid #e73525 !important;
    box-shadow: 0 -12px 35px rgba(231, 53, 37, 0.16) !important;
}

.simsar-banner-logo,
.simsar-banner-icon {
    color: #ffffff !important;
    background: linear-gradient(135deg, #ef402f, #d8291d) !important;
    box-shadow: 0 10px 25px rgba(231, 53, 37, 0.28) !important;
}

.simsar-banner-label {
    color: #e73525 !important;
}

.simsar-banner-title {
    color: #111827 !important;
}

.simsar-banner-description,
.simsar-banner-text {
    color: #667085 !important;
}

.simsar-store-button,
.simsar-download-button {
    color: #111827 !important;
    background: #ffffff !important;
    border-color: rgba(231, 53, 37, 0.28) !important;
}

.simsar-store-button.is-primary,
.simsar-store-button:hover,
.simsar-download-button:hover {
    color: #ffffff !important;
    background: #e73525 !important;
    border-color: #e73525 !important;
}

.simsar-banner-close:hover {
    color: #ffffff !important;
    background: #e73525 !important;
}
/* SIMSAR_APP_COLORS_END */

/* SIMSAR_CLOSE_BUTTON_FIX */
#simsar-download-banner .simsar-banner-close,
#simsar-app-banner .simsar-banner-close {
    display: grid !important;
    position: relative !important;
    z-index: 20 !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    place-items: center !important;

    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid rgba(231, 53, 37, 0.30) !important;
    border-radius: 50% !important;

    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;

    font-family: Arial, sans-serif !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    box-shadow: 0 5px 16px rgba(17, 24, 39, 0.12) !important;
}

#simsar-download-banner .simsar-banner-close:hover,
#simsar-app-banner .simsar-banner-close:hover {
    color: #ffffff !important;
    background: #e73525 !important;
    border-color: #e73525 !important;
}

@media (max-width: 900px) {
    #simsar-download-banner .simsar-banner-close,
    #simsar-app-banner .simsar-banner-close {
        position: absolute !important;
        top: 9px !important;
        left: 9px !important;
        width: 34px !important;
        height: 34px !important;
        font-size: 21px !important;
    }
}
