/* ScrollOff download menu
   One "Download" button that opens a choice of iOS (App Store) or Android (Google Play).
   Shared by every page. Uses the page's own CSS variables: --dark-card, --white, --gray-text, --teal. */

.download-menu {
    position: relative;
    display: inline-flex;
}

.download-toggle {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.download-toggle:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

.download-toggle .download-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-left: -2px;
    transition: transform 0.2s ease;
}

.download-menu.open .download-chevron {
    transform: rotate(180deg);
}

/* The options panel */
.download-options {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 100%;
    width: max-content;
    padding: 8px;
    background: var(--dark-card);
    border: 1px solid rgba(29, 192, 191, 0.25);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 24px rgba(29, 192, 191, 0.12);
    text-align: left;
    z-index: 50;
}

.download-menu.open .download-options {
    display: block;
    animation: downloadMenuIn 0.2s ease-out;
}

/* Open upward when there is no room below (set by script, or forced with the class in markup) */
.download-menu.drop-up .download-options {
    top: auto;
    bottom: calc(100% + 10px);
}

/* Nav variant: sits at the right edge, so align the panel to the right */
.download-menu-nav .download-options {
    left: auto;
    right: 0;
}

.download-menu-nav .download-toggle {
    font-size: 0.9rem;
}

/* Block variant: fills its container (pricing cards) */
.download-menu-block {
    display: flex;
    width: 100%;
}

.download-menu-block .download-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Options. Extra specificity so page rules like ".nav-links a" cannot restyle or hide them. */
.download-menu .download-options .download-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.download-menu .download-options .download-option:hover,
.download-menu .download-options .download-option:focus-visible {
    background: rgba(29, 192, 191, 0.12);
    color: var(--white);
    outline: none;
}

.download-menu .download-options .download-option svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: var(--white);
}

.download-option-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.download-option-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
}

.download-option-sub {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--gray-text);
}

/* Mobile menu: two plain links, one per platform */
.mobile-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.mobile-menu .mobile-download .nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.mobile-download svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
}

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