/* ==========================================================================
   YEGOH SPACE CYBER — RESPONSIVE STYLESHEET
   css/responsive.css
   Compact One-Page Digital Services Dashboard
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Breakpoint: max-width 1200px (Laptops & Desktops)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   2. Breakpoint: max-width 992px (Tablets Landscape & Medium Screens)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .header-status-pill .status-hours {
    display: none;
  }

  .header-status-pill .status-divider {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   3. Breakpoint: max-width 768px (Tablets & Mobile Landscape)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --nav-height: 52px;
  }

  .header-status-pill {
    display: none;
  }

  .dashboard-hero-title {
    font-size: 1.25rem;
  }

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

  .services-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .footer-top-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-bottom-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Modals on Tablets */
  .service-modal-dialog {
    max-height: 90vh;
    padding: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   4. Breakpoint: max-width 640px (Mobile Phones)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .compact-header .btn-install span {
    display: none;
  }

  .compact-header .btn-install {
    padding: 0.4rem;
    border-radius: 50%;
  }

  .compact-header .btn-nav-cart .btn-cart-text {
    display: none;
  }

  .compact-header .btn-header-wa span {
    display: none;
  }

  .compact-header .btn-header-wa {
    padding: 0.4rem;
    border-radius: 50%;
  }

  .brand-text .brand-tagline {
    display: none;
  }

  .dashboard-hero {
    padding: 0.75rem 0 0.5rem;
  }

  .dashboard-hero-title {
    font-size: 1.15rem;
  }

  .dashboard-hero-sub {
    font-size: 0.82rem;
  }

  /* Mobile: Full-width search bar */
  .dashboard-search-bar {
    padding: 0.5rem 0.75rem;
  }

  .search-input-field::placeholder {
    font-size: 0.82rem;
  }

  .search-kbd-chip {
    display: none;
  }

  /* Mobile: Two-Column Category Grid (as explicitly required) */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .category-card {
    padding: 0.5rem 0.6rem;
    min-height: 48px;
  }

  .category-card-name {
    font-size: 0.76rem;
  }

  .category-card-count {
    font-size: 0.66rem;
  }

  /* Mobile: Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .service-card {
    padding: 0.75rem;
  }

  .service-card-title {
    font-size: 0.88rem;
  }

  /* Drawers full width on mobile */
  .cart-drawer,
  .assistant-drawer {
    max-width: 100%;
  }

  /* Service Detail Modal on Mobile */
  .service-modal {
    padding: 0.5rem;
    align-items: flex-end;
  }

  .service-modal-dialog {
    max-height: 92vh;
    padding: 1.25rem 1rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .detail-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-modal-actions .btn,
  .detail-modal-actions .btn-back-service {
    width: 100%;
  }

  /* Mobile Floating Controls: Small, Accessible, Bottom Right */
  .floating-actions-container {
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    right: 0.85rem;
    gap: 0.5rem;
  }

  .floating-btn {
    width: 42px;
    height: 42px;
  }

  .floating-tooltip {
    display: none;
  }

  .toast-region {
    top: auto;
    bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px));
    right: 0.85rem;
    left: 0.85rem;
  }

  .toast-message {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   5. Breakpoint: max-width 360px (Very Small Devices)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .brand-text .brand-name {
    font-size: 0.95rem;
  }

  .brand-logo-img {
    width: 30px;
    height: 30px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}
