/* ============================================================
   WORLDWIDEGANGSTER – mobilpolish (laddas sist, påverkar bara < 960px)
   Desktop (≥ 960px) ska se exakt ut som förut.
   ============================================================ */

/* ── Hjälpklasser: visa bara på mobil/surfplatta resp. desktop ── */
@media (min-width: 960px) { .gw-only-mobile { display: none !important; } }
@media (max-width: 959.98px) { .gw-only-desktop { display: none !important; } }

/* ── Toppbar: kompakta chips < 960px (de breda desktop-chipsen döljs) ── */
.appbar-stats-mobile { display: none; }
.gw-lang-toggle { display: none; }
@media (max-width: 959.98px) {
    .appbar-stats-desktop { display: none !important; }
    .appbar-stats-mobile {
        display: flex; align-items: center; gap: 4px;
        margin-left: auto; margin-right: 6px; min-width: 0; flex: 0 1 auto; overflow: hidden;
    }
    .gw-mchip {
        display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 8px;
        border-radius: 999px; border: 1px solid #30363d; background: linear-gradient(180deg, #161b22, #0d1117);
        font-size: 12px; line-height: 1; white-space: nowrap; text-decoration: none; color: #e6edf3; flex: 0 0 auto;
    }
    .gw-mchip b { font-weight: 800; font-size: 12.5px; }
    .gw-mchip--dia { border-color: #1a6fa8; background: linear-gradient(180deg, #0f2436, #0d1b2a); }
}
@media (max-width: 599.98px) {
    .gw-lang-full { display: none !important; }
    .gw-lang-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 36px; height: 36px; margin-right: 4px; border-radius: 10px;
        border: 1px solid #30363d; background: #21262d; font-size: 18px; cursor: pointer; flex: 0 0 auto;
    }
    /* Mindre logga + hamburgare så toppbaren får plats även på 360px */
    .gw-logo-img { max-height: 46px !important; width: auto !important; }
    .gw-hamburger { margin-right: 2px !important; }
    .mud-appbar .mud-toolbar { padding-left: 6px !important; padding-right: 6px !important; }
}
@media (max-width: 374.98px) {
    .gw-mchip { padding: 0 6px; font-size: 11px; }
    .gw-mchip b { font-size: 11.5px; }
    .gw-mchip--dia { display: none; }
}

/* ── Formulär: minst 16px så iOS inte zoomar vid fokus ── */
@media (max-width: 959.98px) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
    textarea, select, .mud-input-slot, .mud-input > input {
        font-size: 16px !important;
    }
}

/* ── Plats för bottennavigeringen (≤ 760px) + flytande element ovanför den ── */
@media (max-width: 760px) {
    html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    .gw-main-content { padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
    .gt-toast-stack { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; }
    .fr-toast-stack { bottom: calc(76px + env(safe-area-inset-bottom)); }
    .mud-snackbar-location-bottom-center, .mud-snackbar-location-bottom-left, .mud-snackbar-location-bottom-right {
        bottom: calc(68px + env(safe-area-inset-bottom)) !important;
    }
    .mud-drawer.mud-drawer-temporary { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── Temporära höger-lådor (t.ex. shoppens varukorg) får inte skapa sidledsbredd på mobil ── */
@media (max-width: 959.98px) {
    .mud-drawer.mud-drawer-temporary.mud-drawer-pos-right { max-width: 100vw; }
    .mud-drawer.mud-drawer-temporary.mud-drawer-pos-right.mud-drawer--closed { display: none; }
}

/* ── Tryckytor ≥ 40–44px på mobil (desktop orörd) ── */
@media (max-width: 760px) {
    .gw-mchip { height: 34px; }
    .fr-btn, .fr-btn.sm, .fr-btn.icon { min-height: 40px; min-width: 40px; }
    .fr-home-req { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; }
    .gt-toggle, .gt-btn-ghost { min-height: 40px; }
    .gt-target-name { display: inline-block; padding: 6px 0; }
    body .fc { min-height: 36px; display: inline-flex; align-items: center; }
    body .qc__goto { min-height: 36px; display: inline-flex; align-items: center; }
    body .cz-btn.sm { min-height: 38px; }
    .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
}

/* ── Konto/Hantera (Identity-sidor utan eget tema) – läsbart på mobil ── */
@media (max-width: 959.98px) {
    .gw-manage { padding: 12px; color: #e6edf3; }
    .gw-manage h1 { font-size: 22px; font-weight: 900; margin: 0 0 6px; border: 0 !important; }
    .gw-manage h2 { font-size: 15px; color: #8b949e; font-weight: 600; margin: 0 0 12px; }
    .gw-manage h3 { font-size: 18px; font-weight: 800; margin: 16px 0 10px; }
    .gw-manage hr { border: 0; border-top: 1px solid #30363d; margin: 8px 0 12px; }
    .gw-manage .nav { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
    .gw-manage .nav-link {
        display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
        border: 1px solid #30363d; background: #161b22; color: #c9d1d9; text-decoration: none; font-size: 14px;
    }
    .gw-manage .nav-link.active { border-color: #f0883e; color: #f0883e; background: rgba(240,136,62,.12); }
    .gw-manage .form-floating { display: flex; flex-direction: column-reverse; gap: 4px; margin-bottom: 12px; }
    .gw-manage .form-label { font-size: 13px; color: #8b949e; }
    .gw-manage .form-control {
        width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 8px; border: 1px solid #30363d;
        background: #0d1117; color: #e6edf3; box-sizing: border-box;
    }
    .gw-manage .form-control:disabled { opacity: .7; }
    .gw-manage .btn {
        display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
        border-radius: 10px; border: 1px solid #30363d; background: #21262d; color: #e6edf3; font-weight: 700; cursor: pointer;
    }
    .gw-manage .w-100 { width: 100%; }
    .gw-manage .btn-primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
    .gw-manage .btn-danger { background: #da3633; border-color: #da3633; color: #fff; }
    .gw-manage .text-danger { color: #ff7b72; }
}

/* ── Inloggning: större "kom ihåg mig" och länkar ── */
@media (max-width: 760px) {
    body .gw-remember input[type=checkbox] { width: 22px; height: 22px; }
    body .gw-remember { min-height: 44px; display: flex; align-items: center; }
    .gw-register-link { display: inline-block; padding: 8px 0; }
}

/* ── Toppbar: profilknapp och notisklocka lättare att träffa ── */
@media (max-width: 760px) {
    .gw-profile-btn { min-height: 36px; min-width: 44px; justify-content: center; }
    .gw-bell { min-width: 32px; min-height: 36px; justify-content: center; }
}

/* ── Shop: två kort per rad på telefon (app.css tvingar annars alla grid-items till 100%) ── */
@media (max-width: 599.98px) {
    .mud-grid.gw-shop-grid { margin: -5px !important; width: calc(100% + 10px) !important; }
    .mud-grid.gw-shop-grid > .mud-grid-item.gw-half-xs {
        flex-basis: 50% !important; max-width: 50% !important; padding: 5px !important;
    }
}
