/**
 * GAH QR Card — page styles
 *
 * Design: Clean, focused, mobile-first.
 * The QR code is the star. Everything else supports it.
 *
 * When used as a shortcode inside a WordPress page, the theme
 * provides the header/footer. In PWA standalone mode (home screen),
 * JS adds .gah-qr-standalone to body to hide site chrome.
 */

/* ── The card: QR code + name ── */

.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 1rem;
    min-height: 65vh;
}

.qr-card__code img {
    width: 280px;
    height: 280px;
    display: block;
    border-radius: 8px;
}

.qr-card__name {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
}

.qr-card__site {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2C5F8D;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ── Install prompt section ── */

.qr-card__install {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
    text-align: center;
}

.qr-card__install h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a2e;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.qr-card__install > p {
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
    margin-bottom: 1.5rem;
}

/* ── Platform-specific install prompts ── */

.qr-card__install-android,
.qr-card__install-ios,
.qr-card__install-desktop {
    margin-bottom: 1.5rem;
}

.qr-card__ios-prompt {
    background: #f0f4f8;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #333;
}

.qr-card__ios-prompt p {
    margin: 0;
}

.qr-card__share-icon {
    display: inline-block;
    font-size: 1.2em;
    vertical-align: middle;
    color: #007AFF;
}

.qr-card__desktop-note {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    font-style: italic;
}

/* ── Platform instructions (legacy/fallback) ── */

.qr-card__instructions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.qr-card__instruction h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2C5F8D;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.qr-card__instruction ol {
    padding-left: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

.qr-card__instruction ol strong {
    color: #1a1a2e;
}

.qr-card__hint {
    font-size: 0.9rem;
    color: #2C5F8D;
    font-weight: 600;
    font-style: italic;
}

/* ── Android native install button ── */

.qr-card__install-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.75rem 2rem;
    background: #2C5F8D;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.qr-card__install-btn:hover {
    background: #1a4a6e;
}

/* ── Footer link ── */

.qr-card__footer {
    padding: 1.5rem;
    text-align: center;
    margin-top: auto;
}

.qr-card__footer a {
    color: #2C5F8D;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.qr-card__footer a:hover {
    text-decoration: underline;
}

/* ── Standalone mode (opened from home screen) ── */
/* Two-layer detection: CSS media query + JS .gah-qr-standalone class */

@media (display-mode: standalone) {
    .qr-card__install {
        display: none !important;
    }

    .qr-card__footer {
        display: none !important;
    }

    .qr-card {
        min-height: 90vh;
        padding-top: env(safe-area-inset-top, 3rem);
    }

    .qr-card__code img {
        width: 300px;
        height: 300px;
    }
}

/* JS fallback: also hide via class for iOS standalone (no media query support) */

body.gah-qr-standalone header,
body.gah-qr-standalone footer,
body.gah-qr-standalone .site-header,
body.gah-qr-standalone .site-footer,
body.gah-qr-standalone .elementor-location-header,
body.gah-qr-standalone .elementor-location-footer,
body.gah-qr-standalone .ts-bottom-nav,
body.gah-qr-standalone .qr-card__install,
body.gah-qr-standalone .qr-card__footer {
    display: none !important;
}

body.gah-qr-standalone .qr-card {
    min-height: 90vh;
    padding-top: env(safe-area-inset-top, 3rem);
}

body.gah-qr-standalone .qr-card__code img {
    width: 300px;
    height: 300px;
}

/* ── Larger screens ── */

@media (min-width: 600px) {
    .qr-card__code img {
        width: 320px;
        height: 320px;
    }

    .qr-card__name {
        font-size: 1.75rem;
    }
}
