/* Recipe UI ownership: Lists. Responsive rules stay with this owner. */

.type-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: var(--recipe-font-subheading);
  color: var(--gray-4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-tab-btn:hover {
  color: var(--ink-2);
  border-bottom-color: var(--line-strong);
}

.type-tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.tab-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--recipe-radius-status);
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: var(--recipe-font-body);
  color: var(--gray-4);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--recipe-shadow-surface);
}

.tab-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink-2);
  background: var(--gray-1);
}

.tab-btn.active {
  background: var(--ink);
  color: var(--recipe-surface);
  border-color: var(--ink);
  box-shadow: var(--recipe-shadow-surface);
}

.lib-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }

.lib-count { color: var(--gray-4); font-size: var(--recipe-font-working); }

.lib-search { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.75rem; flex-wrap: wrap; }

.lib-search input[type="search"] {
  flex: 1;
  min-width: 220px;
  padding: 0.45rem 0.6rem;
  border-radius: var(--recipe-radius-large);
  border: 1.5px solid var(--line);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.lib-search input[type="search"]:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: var(--recipe-shadow-focus);
}

.lib-search button {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: var(--recipe-radius-large);
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: var(--recipe-shadow-overlay);
}

.lib-search button:hover {
  background: color-mix(in srgb, var(--recipe-ink) 3%, transparent);
  transform: translateY(-1px);
  box-shadow: var(--recipe-shadow-overlay);
}

.lib-categories { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

.cat-chip {
  border: 1.5px solid var(--line-strong);
  background: transparent;
  border-radius: var(--recipe-radius-status);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  transition: all 200ms ease;
}

.cat-chip:hover {
  border-color: var(--ink);
  background: color-mix(in srgb, var(--recipe-ink) 3%, transparent);
}

.cat-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--recipe-surface);
  box-shadow: var(--recipe-shadow-overlay);
}

.lib-list { display: flex; flex-direction: column; gap: 0.75rem; }

.lib-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--recipe-radius-large);
  padding: 1rem 1.15rem;
  background: var(--recipe-surface);
  box-shadow: var(--recipe-shadow-surface);
  transition: border-color var(--recipe-motion-fast) var(--ease), box-shadow var(--recipe-motion-fast) var(--ease);
}

.lib-item.recipe-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.lib-item.recipe-card .thumb-container {
  width: 90px;
  height: 90px;
  flex: 0 0 90px;
}

.lib-item.recipe-card .lib-body {
  flex: 1 1 auto;
  min-width: 0;
}



.lib-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--recipe-shadow-overlay);
}


.lib-title {
  font-weight: 700;
  font-size: var(--recipe-font-heading);
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.lib-title:hover {
  color: var(--ink-2);
}

.lib-card-title-row {
  display: block;
}

.lib-desc {
  margin: 0 0 0.85rem;
  color: var(--gray-4);
  line-height: 1.5;
  font-size: var(--recipe-font-working);
}

.lib-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--gray-4);
  font-size: var(--recipe-font-control);
}

.search-btn--on {
  background: var(--recipe-ink);
  color: var(--recipe-surface);
  border-color: var(--recipe-ink);
  box-shadow: none;
}

.search-btn--on .library-tool-btn__label {
  opacity: 0.92;
}

.lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--recipe-radius-status);
  background: var(--gray-1);
  border: 1.5px solid var(--line);
  font-weight: 600;
  color: var(--ink);
  font-size: var(--recipe-font-control);
  transition: all 0.2s ease;
}

.lib-chip:hover {
  background: var(--gray-2);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.lib-chip.muted {
  background: var(--gray-1);
  border-color: var(--line);
  color: var(--gray-4);
}

.lib-chip.concept {
  background: var(--recipe-information-wash);
  border-color: var(--recipe-information-wash);
  color: var(--recipe-information);
}

.lib-chip.yield {
  background: var(--recipe-success-wash);
  border-color: var(--recipe-success-wash);
  color: var(--recipe-success);
}

.lib-chip.total {
  background: var(--gray-1);
  border-color: var(--line-strong);
  color: var(--ink);
}

.lib-chip.category {
  background: var(--recipe-warning-wash);
  border-color: var(--recipe-warning-wash);
  color: var(--recipe-warning);
}

.lib-chip.citation {
  background: var(--recipe-information-wash);
  border-color: var(--recipe-information-wash);
  color: var(--recipe-information);
}

.lib-id { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; opacity: 0.7; font-size: var(--recipe-font-compact); }

.lib-badge-library {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: var(--recipe-radius-medium);
  background: var(--recipe-success);
  color: var(--recipe-surface);
  font-size: var(--recipe-font-metadata);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--recipe-shadow-surface);
  border: 1.5px solid color-mix(in srgb, var(--recipe-surface) 20%, transparent);
  flex-shrink: 0;
}

.lib-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1.5px solid var(--line);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.lib-action {
  font-size: var(--recipe-font-control);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: all 200ms ease;
  background: transparent;
  border: 1.5px solid transparent;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-family: var(--font-sans);
  border-radius: var(--recipe-radius-medium);
}

.lib-action:hover {
  background: var(--gray-1);
  border-color: var(--line);
  color: var(--ink-2);
  transform: translateY(-1px);
}

.lib-action-primary {
  color: var(--recipe-surface);
  font-weight: 700;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--recipe-shadow-surface);
}

.lib-action-primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
  box-shadow: var(--recipe-shadow-surface);
}

.lib-action-delete {
  color: var(--gray-4);
  margin-left: auto;
  border-color: transparent;
  padding: 0.4rem 0.85rem;
}

.lib-action-delete:hover {
  color: var(--recipe-danger);
  background: var(--recipe-danger-wash);
  border-color: var(--recipe-danger-wash);
  transform: translateY(-1px);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-4);
}

.empty-icon {
  color: var(--gray-4);
  opacity: 0.6;
  margin: 0 auto 1rem;
  display: block;
}

.empty-state h3 {
  font-size: var(--recipe-font-heading);
  color: var(--ink);
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
}

.empty-hint {
  margin: 0 0 1.5rem;
  color: var(--gray-4);
  font-size: var(--recipe-font-body);
}

.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-card {
  border: 1px solid var(--line);
  border-radius: var(--recipe-radius-large);
  padding: 0.85rem 1rem;
  background: var(--paper);
  box-shadow: var(--recipe-shadow-surface);
}

.skeleton-title {
  height: 20px;
  width: 60%;
  background: linear-gradient(
    90deg,
    var(--gray-1) 0%,
    var(--gray-2) 50%,
    var(--gray-1) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--recipe-radius-small);
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.skeleton-desc {
  height: 16px;
  width: 85%;
  background: linear-gradient(
    90deg,
    var(--gray-1) 0%,
    var(--gray-2) 50%,
    var(--gray-1) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--recipe-radius-small);
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
  margin-bottom: 0.5rem;
}

.skeleton-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.skeleton-chip {
  height: 24px;
  width: 80px;
  background: linear-gradient(
    90deg,
    var(--gray-1) 0%,
    var(--gray-2) 50%,
    var(--gray-1) 100%
  );
  background-size: 200% 100%;
  border-radius: var(--recipe-radius-status);
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.2s;
}

.skeleton-chip:nth-child(2) {
  width: 100px;
  animation-delay: 0.3s;
}

.skeleton-chip:nth-child(3) {
  width: 90px;
  animation-delay: 0.4s;
}

.skeleton-chip:nth-child(4) {
  width: 70px;
  animation-delay: 0.5s;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.dock-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.4rem 0.2rem;
  font-family: var(--font-sans);
  font-size: var(--recipe-font-metadata);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-4);
  cursor: pointer;
  border-radius: var(--recipe-radius-medium);
  transition: all 0.2s ease;
}

.dock-tab-btn:hover {
  background: var(--gray-1);
  color: var(--ink);
}

.dock-tab-btn.active {
  background: var(--ink);
  color: var(--recipe-surface);
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
}

.month-picker-trigger-wrap {
  position: relative;
  display: inline-flex;
}

.month-picker-dropdown {
  min-width: 220px;
  padding: 0.85rem;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: var(--paper-bright, var(--recipe-surface));
  border: 1px solid color-mix(in srgb, var(--recipe-ink) 10%, transparent);
  border-radius: var(--recipe-radius-large);
  box-shadow: var(--recipe-shadow-overlay);
  z-index: 200;
}

.filter-picker-trigger-wrap {
  position: relative;
  display: inline-flex;
}

.filter-picker-dropdown {
  min-width: 300px;
  max-width: 360px;
  padding: 1rem;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  background: var(--paper-bright, var(--recipe-surface));
  border: 1px solid color-mix(in srgb, var(--recipe-ink) 10%, transparent);
  border-radius: var(--recipe-radius-large);
  box-shadow: var(--recipe-shadow-overlay);
  z-index: 200;
}

@media (max-width: 840px) {
.filter-picker-dropdown {
    min-width: 0;
    right: auto;
    left: 0;
    max-width: calc(100vw - 2rem);
  }
}

.search-btn--on {
  background: var(--recipe-accent);
  color: var(--recipe-surface);
  border-color: var(--recipe-accent);
}

.tab-btn {
  background: var(--recipe-surface);
  border: 1px solid var(--recipe-line);
  border-radius: var(--recipe-radius-status);
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: var(--recipe-font-body);
  color: var(--recipe-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--recipe-shadow-surface);
}

.tab-btn:hover {
  border-color: var(--sage-green);
  color: var(--recipe-accent-strong);
  background: color-mix(in srgb, var(--recipe-success) 5%, transparent);
}

.tab-btn.active {
  background: var(--sage-green);
  color: var(--recipe-surface);
  border-color: var(--sage-green);
  box-shadow: var(--recipe-shadow-surface);
}

#menu-recipe-library-container .recipe-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#menu-recipe-library-container .recipe-card:hover {
  box-shadow: var(--recipe-shadow-overlay);
}

#menu-recipe-library-container .recipe-card:active {
  transform: translateY(0);
}

#menu-recipe-search-form .menu-tab-input:checked + .tab-btn {
  background: var(--ink);
  color: var(--recipe-surface);
  border-color: var(--ink);
}

#menu-recipe-search-form .menu-recipe-status-tabs {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

#menu-recipe-search-form .menu-recipe-status-tabs .tab-btn {
  padding: 0.38rem 0.72rem;
  font-size: var(--recipe-font-metadata);
  letter-spacing: 0;
}

#menu-load-menu-form .menu-tab-input:checked + .tab-btn {
  background: var(--ink);
  color: var(--recipe-surface);
  border-color: var(--ink);
}

.kg-container-sized {
  width: 100%;
  height: 500px;
}

.hero-image-square-300 {
  width: 300px;
  height: 300px;
}

.label-inline-flex {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.library-hero .library-status-toggle .library-status-btn.active,
.library-hero .library-status-toggle .search-btn--on {
  background: var(--recipe-ink);
  border-color: var(--recipe-ink);
  color: var(--recipe-surface);
}

.library-hero .library-tool-btn.search-btn--on:not(.library-status-btn) {
  background: var(--sage-green, var(--recipe-success));
  border-color: var(--sage-green, var(--recipe-success));
  color: var(--recipe-surface);
}

.library-widget .tab-btn {
  border-radius: var(--recipe-radius-medium);
  padding: 0.38rem 0.72rem;
  box-shadow: none;
  font-size: var(--recipe-font-metadata);
  line-height: 1.1;
  letter-spacing: 0;
}

.library-widget .tab-btn.active {
  box-shadow: none;
}
