/* Word Funnel - PixelPicked / HTML5 embed layout.
   Builds on the web game's game.css (copied into ./assets at build time);
   this file only adapts the page to a full-viewport iframe without the site navbar. */

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

body.body-game {
    display: flex;
    flex-direction: column;
    background: #fff;
    touch-action: manipulation;
}

/* ===== Header (replaces the site navbar) ===== */
.embed-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}

.embed-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
    text-decoration: none;
}

.embed-logo {
    height: 28px;
    width: auto;
}

.embed-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.get-app-pill {
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.8rem;
}

.help-btn-embed {
    width: 28px;
    height: 28px;
    padding: 0;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== Game area fills the iframe ===== */
.game-container {
    flex: 1;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    padding-top: 0.4rem;
}

.game-header {
    padding-right: 0;
    flex-shrink: 0;
}

.game-header .badge {
    font-size: 0.85rem !important;
}

.game-content-area {
    flex: 1;
    min-height: 0;
}

/* No keyboard on finished / error screens, so no keyboard padding either. */
.game-content-area.no-keyboard {
    padding-bottom: 1.5rem;
}

.flash-message {
    flex-shrink: 0;
}

/* ===== Loading / error ===== */
.state-card {
    max-width: 420px;
    margin: 2rem auto 0;
    text-align: center;
}

/* ===== Store links ===== */
.store-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    max-width: 320px;
    margin: 0 auto;
}

.store-links .btn {
    font-weight: 600;
}

.get-app-section {
    border-top: 1px solid #dee2e6;
    margin-top: 1rem;
    padding-top: 1rem;
}

/* ===== Definition popup for funnel words ===== */
.definition-bar {
    margin: 0.5rem auto 0;
    max-width: 400px;
    font-size: 0.875rem;
}

.share-fallback {
    width: 100%;
    font-size: 0.8rem;
    resize: none;
}

/* ===== Simple modal handling (no Bootstrap JS) ===== */
.modal.show {
    display: block;
}

.modal {
    overflow-y: auto;
}

/* Short landscape screens: smaller keys so the word stays visible */
@media (max-height: 520px) {
    .keyboard-key {
        height: 40px !important;
    }

    .game-content-area {
        padding-bottom: 160px;
    }

    .hint-hut-btn {
        bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
