/* App download popup — single posts */
.al-app-popup {
    --brand-green: #10B981;
    --brand-blue: #3B82F6;
    --bg-dark: #0B1220;
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.al-app-popup.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.al-app-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}

.al-app-popup__dialog {
    position: relative;
    z-index: 2;
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1E1B4B 55%, #0F172A 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    padding: 40px 44px;
    transform: translateY(18px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.al-app-popup.is-open .al-app-popup__dialog {
    transform: translateY(0) scale(1);
}

.al-app-popup__dialog::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.al-app-popup__close {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.al-app-popup__close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.al-app-popup__grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    position: relative;
    z-index: 1;
}

.al-app-popup__text {
    flex: 1;
    max-width: 460px;
    text-align: right;
}

.al-app-popup__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6EE7B7;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.al-app-popup__text h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 12px;
}

.al-app-popup__text h2 span {
    color: var(--brand-green);
}

.al-app-popup__lead {
    font-size: 1.02rem;
    color: #94A3B8;
    line-height: 1.75;
    margin: 0 0 14px;
}

.al-app-popup__features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0 0 24px;
    padding: 0;
}

.al-app-popup__features li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #CBD5E1;
    font-size: 0.9rem;
    font-weight: 600;
}

.al-app-popup__features li i {
    color: var(--brand-green);
    font-size: 0.85rem;
}

.al-app-popup__stores {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.al-app-popup__store {
    display: none;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.al-app-popup.is-ios .al-app-popup__store--apple,
.al-app-popup.is-android .al-app-popup__store--google {
    display: inline-flex;
}

.al-app-popup__store:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    color: #fff;
}

.al-app-popup__store--apple {
    background: linear-gradient(145deg, #1a1a1a 0%, #000 100%);
}

.al-app-popup__store--google {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}

.al-app-popup__store i {
    font-size: 1.75rem;
    color: #fff;
    flex-shrink: 0;
}

.al-app-popup__store-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    color: #fff;
}

.al-app-popup__store-label small {
    font-size: 0.68rem;
    opacity: 0.75;
    font-weight: 500;
}

.al-app-popup__store-label strong {
    font-size: 1.02rem;
    font-weight: 700;
}

.al-app-popup__visual {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
}

.al-app-popup__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, transparent 68%);
    border-radius: 50%;
    animation: al-app-popup-pulse 3s ease-in-out infinite;
}

@keyframes al-app-popup-pulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
}

.al-app-popup__icon {
    position: relative;
    z-index: 2;
    width: 120px;
    height: 120px;
    border-radius: 26px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.06);
}

body.al-app-popup-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .al-app-popup__dialog {
        padding: 34px 22px 28px;
        border-radius: 18px;
    }

    .al-app-popup__grid {
        flex-direction: column-reverse;
        text-align: center;
        gap: 18px;
    }

    .al-app-popup__text {
        max-width: none;
        text-align: center;
    }

    .al-app-popup__text h2 {
        font-size: 1.45rem;
    }

    .al-app-popup__lead {
        font-size: 0.95rem;
    }

    .al-app-popup__features {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .al-app-popup__stores {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .al-app-popup__store {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .al-app-popup__visual {
        width: 140px;
        height: 140px;
    }

    .al-app-popup__icon {
        width: 96px;
        height: 96px;
        border-radius: 22px;
    }

    .al-app-popup__glow {
        animation: none;
    }

    .al-app-popup__close {
        top: 10px;
        left: 10px;
    }
}
