/* ============================================================
   CodeQuest — landscape_lock.css
   Force-landscape overlay + responsive landscape mobile rules
   Include this on every page that needs landscape lock.
   ============================================================ */

/* ── Rotate Device Overlay ── */
#rotate-device-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--cq-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.rotate-icon {
    font-size: 56px;
    margin-bottom: 20px;
    animation: rotate-hint 1.6s ease-in-out infinite;
}

@keyframes rotate-hint {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.rotate-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--cq-white);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.rotate-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    max-width: 280px;
    line-height: 1.5;
}

/* Show the overlay ONLY on small screens in portrait orientation */
@media (max-width: 932px) and (orientation: portrait) {
    #rotate-device-overlay {
        display: flex;
    }
    /* Hide the actual app content while rotated wrong */
    body > *:not(#rotate-device-overlay) {
        display: none !important;
    }
}

/* ════════════════════════════════════════════════
   LANDSCAPE MOBILE RESPONSIVE BASE RULES
   Applies when in landscape AND screen is mobile-sized
   ════════════════════════════════════════════════ */
@media (max-width: 932px) and (orientation: landscape) {
    html, body {
        overflow-x: hidden;
        font-size: 14px;
    }

    /* Tighter paddings on mobile landscape */
    .container, .content-wrapper, .main-content {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Reduce heading sizes proportionally */
    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.2rem !important; }
    h3 { font-size: 1.05rem !important; }

    /* Navbar becomes more compact */
    .navbar, .main-header, .app-navbar {
        min-height: 48px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    /* Reduce card/grid gaps */
    .sm-summary, .sm-grid, .row {
        gap: 8px !important;
    }
}

/* Extra-short landscape (phones in landscape have very limited height) */
@media (max-height: 430px) and (orientation: landscape) {
    body { font-size: 13px; }
    .sm-header, .page-header { padding-top: 8px !important; padding-bottom: 8px !important; }
}
