/* Responsive CSS for Tablet and Mobile viewports */

/* Tablet (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  sidebar {
    width: 220px;
    padding: 20px 12px;
  }

  header.top-bar {
    padding: 0 16px;
  }

  .search-box {
    width: 280px;
  }

  .content-body {
    padding: 20px 16px;
  }

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

/* Mobile Devices (max-width: 768px) */
@media screen and (max-width: 768px) {
  #app-container {
    flex-direction: column;
  }

  sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100vh;
    width: 260px;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
  }

  sidebar.open {
    left: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  header.top-bar {
    height: 64px;
    padding: 0 14px;
    gap: 10px;
  }

  .search-box {
    flex: 1;
    width: auto;
  }

  .search-box input {
    padding: 10px 12px 10px 36px;
    font-size: 13px;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group, .sort-group {
    justify-content: space-between;
  }

  .notes-container.grid-view {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95vw;
    max-height: 95vh;
    border-radius: var(--radius-md);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Desktop default hide mobile menu button */
.mobile-menu-btn {
  display: none;
}
