/* ============================================
   LIBRARY PANEL
   Saved decks, deck cards, import/export
   ============================================ */

/* Mobile Overrides */
@media (max-width: 768px) {

   /* Mobile: inactive tabs show icon only, active tab shows icon + label */
   .lib-tab-btn .lib-tab-text {
      display: none;
   }
   .lib-tab-btn--active .lib-tab-text {
      display: inline;
   }

   /* Compact padding for icon-only inactive tabs */
   .lib-tab-btn {
      padding: 6px 8px !important;
   }
   .lib-tab-btn--active {
      padding: 6px 12px !important;
   }

   /* Deck grid: single column on mobile */
   .library-panel .deck-card-widget {
      min-width: 100% !important;
   }

   /* ============================================
      DISCOVER VIEW - Filter row on mobile
      ============================================ */

   /* Discover header: keep all filters on one row */
   .discover-header {
      gap: 6px !important;
      flex-wrap: nowrap !important;
   }

   /* Search: reduce min-width */
   .discover-header>div:first-child {
      min-width: 80px !important;
      flex: 1 !important;
   }

   /* Selects: compact */
   .discover-header select {
      padding: 6px 6px !important;
      font-size: 11px !important;
      max-width: 80px;
   }

   /* Refresh button: compact */
   .discover-header button {
      padding: 6px 8px !important;
   }

   /* ============================================
      UNIFIED SCROLL - Remove nested scroll containers
      ============================================ */

   /* Library content: let it grow naturally */
   .library-content {
      overflow-y: visible !important;
      height: auto !important;
   }

   /* Discover view: let it grow naturally */
   .discover-view {
      height: auto !important;
      overflow: visible !important;
   }

   /* Discover deck list: no nested scroll */
   .discover-view>div:last-child {
      overflow-y: visible !important;
      flex: none !important;
   }

   /* My Decks grid container: no nested scroll */
   .library-panel [style*="overflow-y: auto"] {
      overflow-y: visible !important;
   }
}