/* plastay.css — Plastay (saved items) section: toolbar, cards, footer, guest and empty states.
   Moved out of the inline \3c style> in index.html (was lines 548–788). */

/* ── Plastay section ── */
/* All #plastay rules consolidated here — overrides base section rule */
#plastay {
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: #f5f6fa !important;
}

/* Inner scroll container — fills the absolute #plastayContent div */
#plastayItems {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 0 12px;
  padding-top: calc(56px + env(safe-area-inset-top, 0px) + 12px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Plastay content toolbar: item count, search, filter, and tabs ── */
.plastay-toolbar { padding: 4px 16px 0; }
.plastay-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
}
.plastay-count-info {
  font-size: 0.9rem;
  font-weight: 700;
  color: #6b7280;
}
.plastay-count-info .plastay-count-num {
  font-weight: 800;
  color: #1a1a2e;
}
.plastay-toolbar-icons { display: flex; gap: 8px; }
.plastay-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f1f5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  flex-shrink: 0;
  position: relative;
}
.plastay-icon-btn:active { background: #e4e6ee; }
.plastay-icon-btn.active { background: #19378C; color: #fff; }
.plastay-icon-btn .material-symbols-rounded { font-size: 19px; }

.plastay-search-row {
  padding-bottom: 12px;
}
.plastay-search-row input {
  width: 100%;
  border: 1.5px solid #eaeef8;
  background: #f7f8fb;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #1a1a2e;
  outline: none;
}
.plastay-search-row input:focus { border-color: #19378C; background: #fff; }

.plastay-sort-wrap { position: relative; }
.plastay-sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
  padding: 6px;
  min-width: 170px;
  z-index: 20;
  display: none;
  flex-direction: column;
}
.plastay-sort-menu.open { display: flex; }
.plastay-sort-menu button {
  background: none;
  border: none;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
}
.plastay-sort-menu button:active,
.plastay-sort-menu button:hover { background: #f5f6fa; }

.plastay-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1.5px solid #f0f0f0;
}
.plastay-tab {
  background: none;
  border: none;
  padding: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #9aa1b5;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
}
.plastay-tab.active {
  color: #1a1a2e;
  border-bottom-color: #1a1a2e;
}
.plastay-tab .plastay-tab-count {
  font-weight: 700;
  color: inherit;
  opacity: 0.65;
}
#plastayGrid { padding-top: 12px; }

/* Remove-from-Plastay button — top-left of the card image, so it doesn't
   collide with the shared card's 3-dot menu button (top-right). */
.plastay-card-remove-btn {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  background: rgba(0,0,0,0.42);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}
.plastay-card-remove-btn:hover { background: rgba(231,76,60,0.85); }

/* Guest state */
#plastayGuestGate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem 1.5rem;
  padding-top: calc(56px + env(safe-area-inset-top, 0px) + 2rem);
  text-align: center;
}

/* Empty state */
.plastay-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  gap: 8px;
  color: #bbb;
}
.plastay-empty-state .material-symbols-rounded { font-size: 52px; opacity: 0.4; }
.plastay-empty-state p { font-size: 14px; color: #999; line-height: 1.5; }

.item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 6px;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: #2c3e50;
}
.item-card:hover { border-color: #19378C; background: #eef1f9; transform: translateY(-2px); }
.item-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #eef1f9; display: flex; align-items: center; justify-content: center;
}
.item-card-icon .material-symbols-rounded { font-size: 20px; color: #19378C; }
.item-card-other .item-card-icon { background: #fff3e0; }
.item-card-other .item-card-icon .material-symbols-rounded { color: #e67e22; }
.item-card-other { border-style: dashed; border-color: #e0c090; color: #e67e22; }
