﻿/* Awas Forum mobile overrides */
@media (max-width: 920px), (pointer: coarse), (hover: none) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand-logo,
  .top-avatar {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    border-radius: 10px;
  }

  .brand-logo.small {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }

  .brand-logo img,
  .top-avatar img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    filter: none !important;
    transform: none !important;
  }

  .brand-name {
    font-size: 23px;
    line-height: 1;
    white-space: nowrap;
  }

  .searchbar {
    width: 100%;
    height: 42px;
  }

  .top-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px !important;
    gap: 8px;
    align-items: center;
    justify-content: stretch;
  }

  .top-actions .ghost-btn,
  .top-actions .primary-btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 8px;
    font-size: 14px;
    white-space: nowrap;
  }

  .top-actions .top-avatar {
    justify-self: end;
  }

  .page-shell,
  .footer {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    width: 100%;
    padding: 10px;
  }

  .side-active,
  .side-list a {
    min-height: 50px;
    gap: 12px;
    padding: 0 10px;
  }

  .side-list .mini-icon.game-avatar,
  .side-list .mini-icon.image-icon,
  .side-list .mini-icon {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
  }

  .game-avatar,
  .image-icon,
  .card-icon,
  .topic-game {
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    overflow: hidden;
  }

  .game-avatar img,
  .image-icon img,
  .card-icon img,
  .topic-game img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    filter: none !important;
    transform: none !important;
  }

  .game-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .game-card {
    min-height: 230px;
  }

  .game-card .card-icon.game-avatar,
  .game-card .card-icon.image-icon,
  .game-card .card-icon {
    width: 48px !important;
    height: 48px !important;
    left: 14px;
    top: 14px;
  }

  .topic-row {
    grid-template-columns: 42px minmax(0, 1fr) 70px !important;
    gap: 10px;
  }

  .topic-row .topic-game {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding: 24px 24px 0;
  }

  .hero h1 {
    font-size: 42px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
    margin: 24px;
  }
}

@media (max-width: 520px), (pointer: coarse) and (max-width: 920px) {
  .top-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px !important;
  }

  .top-actions .ghost-btn,
  .top-actions .primary-btn {
    font-size: 13px;
  }

  .brand-name {
    font-size: 22px;
  }
}

