/* ==========================================
   STORE BADGES & DOWNLOAD POPUP
   Apple-inspired design system
   ========================================== */

/* Store Badges Container */
.store-badges-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .store-badges-container {
        gap: 20px;
    }
}

/* Individual Store Badge */
.store-badge {
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.store-badge img {
    display: block;
    width: 180px;
    height: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effect for active badges */
.store-badge:not(.coming-soon):hover {
    transform: scale(1.05);
}

.store-badge:not(.coming-soon):hover img {
    transform: scale(1.02);
}

.store-badge:not(.coming-soon):active {
    transform: scale(0.98);
}

/* Coming Soon Badge */
.store-badge.coming-soon {
    cursor: not-allowed;
    opacity: 0.6;
    position: relative;
}

.coming-soon-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 149, 0, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

:root.light-theme .coming-soon-label {
    background: rgba(255, 149, 0, 0.95);
}

/* ==========================================
   POPUP MODAL
   ========================================== */

.store-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.store-popup-content {
    background: rgba(29, 29, 31, 0.95);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.store-popup-overlay.active .store-popup-content {
    transform: scale(1) translateY(0);
}

:root.light-theme .store-popup-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.store-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.store-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.1);
}

.store-popup-close:active {
    transform: scale(0.95);
}

:root.light-theme .store-popup-close {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
}

:root.light-theme .store-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* Title */
.store-popup-title {
    font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 32px 0;
    letter-spacing: -0.5px;
}

:root.light-theme .store-popup-title {
    color: #1d1d1f;
}

/* QR Code Container */
.store-popup-qr {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    width: fit-content;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.qr-code-image {
    display: block;
    width: 220px;
    height: 220px;
    border-radius: 8px;
}

/* Subtitle */
.store-popup-subtitle {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

:root.light-theme .store-popup-subtitle {
    color: rgba(0, 0, 0, 0.6);
}

/* Divider */
.store-popup-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    position: relative;
}

.store-popup-divider::before,
.store-popup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.store-popup-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
    font-weight: 500;
}

:root.light-theme .store-popup-divider::before,
:root.light-theme .store-popup-divider::after {
    background: rgba(0, 0, 0, 0.15);
}

:root.light-theme .store-popup-divider span {
    color: rgba(0, 0, 0, 0.5);
}

/* CTA Button */
.store-popup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.store-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.store-popup-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.store-popup-button svg {
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .store-popup-content {
        padding: 32px 24px;
    }

    .store-popup-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .qr-code-image {
        width: 180px;
        height: 180px;
    }

    .store-popup-qr {
        padding: 16px;
    }

    .store-badge img {
        width: 145px;
    }

    .store-badges-container {
        gap: 10px;
        margin-bottom: 16px;
    }
}

/* Very small screens - ultra compact */
@media (max-width: 380px) {
    .store-badge img {
        width: 130px;
    }

    .store-badges-container {
        gap: 8px;
        margin-bottom: 14px;
    }
}

/* Accessibility */
.store-popup-overlay[aria-hidden="true"] {
    pointer-events: none;
}

.store-popup-overlay[aria-hidden="false"] {
    pointer-events: auto;
}

/* Animation for badges on scroll */
.store-badge {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.apple-store-badge {
    animation-delay: 0.1s;
}

.google-play-badge {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}
