/* =========================================================
   FAYADH WEBSITE — COMING SOON POPUP
   Shown by js/components/coming-soon.js when a store button
   is clicked for a store that has no link yet (the links come
   from the API, see js/core/app-links.js).
   A centred card on wide screens; a bottom sheet on phones.
========================================================= */


/* =========================================================
   1. DIALOG & BACKDROP
========================================================= */

/* No page scrolling behind the open popup. */

html.has-dialog {
    overflow: hidden;
}

.soon-dialog {
    width: min(440px, calc(100% - 32px));
    max-height: calc(100% - 32px);

    margin: auto;
    padding: 0;

    overflow: visible;

    background: transparent;

    border: 0;
}

.soon-dialog::backdrop {
    background: rgba(12, 30, 24, 0.55);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    animation: soon-fade 0.25s ease;
}

.soon-dialog[open] .soon-card {
    animation: soon-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}


/* =========================================================
   2. CARD
========================================================= */

.soon-card {
    position: relative;

    padding: 40px 32px 28px;

    display: flex;
    flex-direction: column;
    align-items: center;

    overflow: hidden;

    background:
        radial-gradient(circle at 50% 0%, var(--primary-light), transparent 60%),
        var(--white);

    border-radius: 26px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);

    text-align: center;
}


/* Close button (inline-end corner, so it mirrors in Arabic) */

.soon-close {
    position: absolute;

    top: 14px;
    inset-inline-end: 14px;

    width: 36px;
    height: 36px;

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

    background: var(--white);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 50%;

    transition: var(--transition);
}

.soon-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.soon-close svg {
    width: 16px;
    height: 16px;
}


/* =========================================================
   3. ANIMATED LOGO
   The Fayadh logo with two rings pulsing out from it.
========================================================= */

.soon-visual {
    position: relative;

    width: 96px;
    height: 96px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.soon-logo {
    position: relative;
    z-index: 1;

    width: 84px;
    height: 84px;

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

    background: var(--white);

    border-radius: 24px;

    box-shadow: var(--shadow-md);

    animation: soon-float 3s ease-in-out infinite;
}

.soon-logo img {
    width: auto;
    height: 46px;
}

.soon-ring {
    position: absolute;
    inset: 6px;

    border: 2px solid var(--secondary);
    border-radius: 28px;

    opacity: 0;

    animation: soon-pulse 2.4s ease-out infinite;
}

.soon-ring-delay {
    animation-delay: 1.2s;
}


/* =========================================================
   4. TEXT
========================================================= */

.soon-badge {
    margin-top: 22px;
}

.soon-title {
    margin-top: 12px;

    color: var(--heading);

    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
}

.soon-text {
    margin-top: 10px;

    color: var(--text);

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   5. STORES
   Both stores: tagged "Soon", or "Available" (and a link)
   when that store already has the app. The clicked one is
   highlighted (.is-selected).
========================================================= */

.soon-stores {
    width: 100%;

    margin-top: 22px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.soon-store {
    padding: 12px 10px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 6px;

    background: var(--background);
    color: var(--heading);

    border: 1.5px solid var(--border);
    border-radius: 14px;

    transition: var(--transition);
}

.soon-store.is-selected {
    background: var(--white);

    border-color: var(--primary);

    box-shadow: 0 0 0 4px var(--primary-light);
}

/* A store that already has the app: a direct link. */

a.soon-store.is-available:hover {
    background: var(--white);

    border-color: var(--primary);
}

.soon-store.is-available .soon-store-tag {
    background: var(--primary);
    color: var(--white);
}

.soon-store .store-icon {
    width: 24px;
    height: 24px;
}

.soon-store-name {
    font-family: var(--font-en);
    font-size: 14px;
    font-weight: 700;
}

.soon-store-tag {
    padding: 2px 10px;

    background: var(--primary-light);
    color: var(--primary);

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   6. ACTIONS
========================================================= */

.soon-actions {
    width: 100%;

    margin-top: 24px;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 14px;
}

.soon-ok {
    width: 100%;
}

.soon-contact {
    color: var(--primary);

    font-size: 14px;
    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}


/* =========================================================
   7. ANIMATIONS
   Shortened by the reduced-motion rule in base.css; the
   looping ones are switched off completely below.
========================================================= */

@keyframes soon-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes soon-pop {
    from { opacity: 0; transform: translateY(16px) scale(0.94); }
    to   { opacity: 1; transform: none; }
}

@keyframes soon-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

@keyframes soon-pulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.45); }
}

@keyframes soon-sheet {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

/* Less motion requested: no pulsing rings or floating logo. */

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

    .soon-ring {
        display: none;
    }

    .soon-logo {
        animation: none;
    }

}


/* =========================================================
   8. RESPONSIVE
   Phones: a bottom sheet that slides up.
========================================================= */

@media (max-width: 520px) {

    .soon-dialog {
        width: 100%;
        max-width: 100%;

        margin: auto 0 0;
    }

    .soon-card {
        padding: 36px 22px 24px;

        border-radius: 26px 26px 0 0;
    }

    .soon-dialog[open] .soon-card {
        animation: soon-sheet 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    .soon-title {
        font-size: 21px;
    }

}


/* =========================================================
   9. DOWNLOAD SECTION BADGE (before launch)
   The "Coming soon" badge above the green panel's title.
========================================================= */

.download-badge {
    margin-bottom: 14px;

    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.download-badge[hidden] {
    display: none;
}
