﻿/* responsive.css - Tablet & Mobile Responsive Overrides */

/* =======================================================================
   31. RESPONSIVE (Tablet & Mobile)
   ======================================================================= */
@media (max-width: 768px) {
  h1 {
    font-size: 1.375rem;
  }

  h2 {
    font-size: 1.125rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-detail-icon {
    width: 5rem;
    height: 5rem;
  }

  /* Featured banner â€” tighter on mobile */
  .featured-banner {
    padding: 1rem;
    gap: 0.875rem;
    border-radius: 1rem;
  }

  .featured-banner .app-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    font-size: 1.5rem;
  }

  .featured-banner .info h2,
  #featured-name {
    font-size: 1rem !important;
  }

  .featured-banner .info p,
  #featured-desc {
    font-size: 0.8125rem !important;
  }

  /* Play-store style carousel cards */
  .play-card {
    width: 110px !important;
  }

  .play-card-icon {
    width: 110px !important;
    height: 110px !important;
  }

  /* Skeleton cards on mobile */
  #home-loading .skeleton[style*="width:130px"],
  #home-loading div[style*="width:130px"] {
    width: 110px !important;
  }

  /* Top Charts grid â€” keep 2 cols on mobile */
  .app-card-chart {
    padding: 0.5rem 0.5rem;
    gap: 0.5rem;
    min-width: 0;
  }

  .app-card-chart-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
  }

  .app-card-chart-title {
    font-size: 0.75rem;
  }

  /* Hide install button in Top Charts on mobile â€” saves space */
  .app-card-chart-btn {
    display: none;
  }

  .app-card-chart-rank {
    font-size: 0.875rem;
    min-width: 1rem;
  }

  /* Grid items must not overflow their cell */
  .grid-cols-2>* {
    min-width: 0;
  }

  .navbar-nav {
    gap: 0;
  }

  .navbar-nav a {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }

  .hide-mobile {
    display: none !important;
  }

  /* Toast â€” full-width on mobile */
  .toast-container {
    bottom: 1rem;
    right: 0.75rem;
    left: 0.75rem;
  }

  .toast {
    min-width: unset;
    width: 100%;
  }

  /* Section header */
  .section-header h2 {
    font-size: 1rem;
  }

  /* Home search bar */
  #home-search {
    font-size: 0.875rem !important;
    height: 2.75rem !important;
  }
}

/* Small phones */
@media (max-width: 390px) {

  /* Top charts: keep 2 cols but even more compact */
  .app-card-chart {
    padding: 0.375rem 0.5rem;
    gap: 0.5rem;
  }

  .app-card-chart-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .app-card-chart-btn {
    display: none;
    /* hide install btn on very small screens in chart cards */
  }

  .play-card {
    width: 96px !important;
  }

  .play-card-icon {
    width: 96px !important;
    height: 96px !important;
  }

  .featured-banner .app-icon {
    width: 3.5rem;
    height: 3.5rem;
  }
}

@media (max-width: 480px) {

  /* Top Charts stays 2 cols â€” override the 1-col rule for grid-cols-2 in context of top charts */
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

