/* =============================================================================
   WRM LIVING STUDIO OS: RESPONSIVE ADAPTATIONS & ACCESSIBILITY
   Tablet, Mobile Viewports, Touch Targets, Reduced Motion
   ============================================================================= */

/* Tablet Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
  .os-opening-statement {
    display: none;
  }

  .desktop-icons {
    top: 16px;
    left: 16px;
    gap: 12px 14px;
  }

  .desktop-icon-node {
    width: 82px;
    padding: 6px 4px;
  }

  .d-icon-graphic {
    width: 48px;
    height: 48px;
  }

  .d-icon-graphic svg {
    width: 28px;
    height: 28px;
  }

  .os-taskbar {
    bottom: 10px;
    left: 12px;
    right: 12px;
    height: 44px;
  }

  .os-window {
    min-width: 320px;
    min-height: 240px;
  }
}

/* Tablet Portrait Breakpoint (<= 768px) */
@media (max-width: 768px) {
  .desktop-icons {
    bottom: 68px;
    gap: 10px 12px;
  }

  .tray-theme-label {
    display: none;
  }

  .system-tray {
    gap: 6px;
    padding: 0 6px;
  }

  .tray-clock {
    font-size: 10px;
  }

  .os-window {
    border-radius: var(--radius-md);
  }

  .catalog-items-container {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* Mobile Breakpoint (<= 480px, including 390x844) */
@media (max-width: 480px) {
  .desktop-icons {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 64px;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 12px 8px;
  }

  .desktop-icon-node {
    width: 72px;
    min-height: 76px;
  }

  .d-icon-graphic {
    width: 44px;
    height: 44px;
  }

  .d-icon-label {
    font-size: 10px;
  }

  .os-taskbar {
    bottom: 8px;
    left: 8px;
    right: 8px;
    height: 42px;
    padding: 2px 6px;
    border-radius: var(--radius-md);
  }

  .start-btn {
    padding: 4px 10px;
    height: 30px;
    font-size: 11px;
  }

  .taskbar-tab {
    max-width: 120px;
    min-width: 70px;
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .crt-tag {
    display: none;
  }

  /* Full Bleed Mobile Windows */
  .os-window {
    top: 6px !important;
    left: 6px !important;
    width: calc(100vw - 12px) !important;
    height: calc(100dvh - 60px) !important;
    min-width: 0;
    min-height: 0;
    border-radius: var(--radius-md) !important;
  }

  .window-titlebar {
    height: 36px;
    padding: 0 10px;
  }

  .window-resize-handle {
    display: none;
  }

  .weekly-edition-view {
    padding: 16px;
  }

  .weekly-title {
    font-size: 20px;
  }

  .weekly-featured-card {
    padding: 14px;
  }
}

/* Touch Device Target Enforcements */
@media (pointer: coarse) {
  .start-btn,
  .tray-btn,
  .win-btn,
  .catalog-chip,
  .catalog-action-btn {
    min-height: 40px;
    min-width: 40px;
  }

  .win-btn {
    width: 32px;
    height: 32px;
  }

  .win-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .desktop-icon-node:hover {
    transform: none !important;
  }

  .catalog-card:hover {
    transform: none !important;
  }

  .win-btn:hover {
    transform: none !important;
  }
}
