.saved-searches-under-search {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}
.saved-searches-under-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.saved-searches-under-search-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, rgba(255,255,255,0.55));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.saved-search-link-btn {
  border: none;
  background: transparent;
  color: var(--primary-accent, #00d4ff);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.saved-searches-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 88px;
  overflow: auto;
}
.saved-search-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
}
.saved-search-item {
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: var(--surface-raised, #2a2a3c);
  color: var(--text, #fff);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 12px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.saved-search-item:hover { border-color: var(--primary-accent, #00d4ff); }
.saved-search-delete {
  border: none;
  background: transparent;
  color: var(--text-muted, rgba(255,255,255,0.5));
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 4px;
}

#collections-manager-dialog {
  min-width: 400px;
  width: min(560px, 92vw);
  max-width: 92vw;
}

#collections-manager-dialog .modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  flex-shrink: 0;
}

#collections-manager-dialog .modal-header-row h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
}

#collections-manager-dialog .form-group {
  width: 100% !important;
  max-width: 100%;
  padding: 0 !important;
  margin-bottom: 12px;
  box-sizing: border-box;
}

#collections-manager-dialog .form-group .input-with-icon {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

#collections-manager-dialog .form-group input,
#collections-manager-dialog .form-group select,
#collections-manager-dialog .form-group .input-with-icon input,
#collections-manager-dialog .form-group .input-with-icon select {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

#collections-manager-dialog .dialog-buttons {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

#collections-manager-dialog .dialog-buttons button {
  width: auto;
  min-width: 88px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 20px;
}

.collections-manager-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.collections-manager-list {
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  max-height: 300px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

#collections-manager-dialog.modal-fullscreen {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
}

#collections-manager-dialog.modal-fullscreen .collections-manager-form {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#collections-manager-dialog.modal-fullscreen .collections-manager-list-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#collections-manager-dialog.modal-fullscreen .collections-manager-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.collections-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}
.collections-row:last-child { border-bottom: none; }
.collections-row-open {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text, #fff);
  cursor: pointer;
  text-align: left;
  padding: 8px 4px;
  border-radius: 6px;
}
.collections-row-open:hover { background: var(--surface-raised, #2a2a3c); }
.collections-row-count {
  color: var(--text-muted, rgba(255,255,255,0.55));
  font-size: 12px;
}
.collections-empty {
  color: var(--text-muted, rgba(255,255,255,0.55));
  padding: 20px 12px;
  font-size: 13px;
  text-align: center;
}
.collections-picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  overflow: auto;
  margin: 12px 0;
}
.collections-picker-item {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: var(--surface-raised, #2a2a3c);
  color: var(--text, #fff);
  cursor: pointer;
  text-align: left;
}
.collections-picker-item:hover {
  border-color: var(--primary-accent, #00d4ff);
}
#collections-button svg {
  width: 22px;
  height: 22px;
}
