/**
 * editor-tags-attributes.css
 * Last modified: v015.021 (2025-11-12)
 * Changes: Styles for tags and attributes editor components
 */

/* ============================================
   Tags Editor Styles
   ============================================ */

/* Form section divider */
.editor-form-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--theme-border-primary, #333);
}

.editor-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--theme-text-primary);
  margin-bottom: 1rem;
}

/* Tags container - shows selected tags as pills */
.editor-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.5rem;
  background: var(--theme-bg-secondary, #1a1a1a);
  border: 1px solid var(--theme-border-primary, #333);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.editor-tags-container:empty::before {
  content: 'No tags selected';
  color: var(--theme-text-tertiary, #666);
  font-style: italic;
}

/* Tag pill */
.editor-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--theme-accent-action, #e63946);
  color: white;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}

.editor-tag-remove {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.editor-tag-remove:hover {
  opacity: 1;
}

/* Tag input wrapper */
.editor-tag-input-wrapper {
  position: relative;
}

/* Tag suggestions dropdown */
.editor-tag-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: var(--theme-bg-secondary, #1a1a1a);
  border: 1px solid var(--theme-border-primary, #333);
  border-top: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.editor-tag-suggestion {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--theme-text-secondary);
}

.editor-tag-suggestion:hover {
  background: var(--theme-bg-hover, #2a2a2a);
  color: var(--theme-text-primary);
}

/* ============================================
   Attributes Editor Styles
   ============================================ */

/* Multi-select container */
.editor-multiselect {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--theme-bg-secondary, #1a1a1a);
  border: 1px solid var(--theme-border-primary, #333);
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.editor-multiselect:empty {
  min-height: 40px;
}

/* Checkbox label in multi-select */
.editor-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
  color: var(--theme-text-secondary);
  font-size: 0.95rem;
}

.editor-checkbox-label:hover {
  background: var(--theme-bg-hover, #2a2a2a);
  color: var(--theme-text-primary);
}

.editor-checkbox-label input[type="checkbox"] {
  margin: 0;
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.editor-checkbox-label input[type="checkbox"]:checked {
  accent-color: var(--theme-accent-action, #e63946);
}

/* Scrollbar styling for multi-select */
.editor-multiselect::-webkit-scrollbar {
  width: 8px;
}

.editor-multiselect::-webkit-scrollbar-track {
  background: var(--theme-bg-primary, #0a0a0a);
  border-radius: 4px;
}

.editor-multiselect::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.editor-multiselect::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Scrollbar for tag suggestions */
.editor-tag-suggestions::-webkit-scrollbar {
  width: 8px;
}

.editor-tag-suggestions::-webkit-scrollbar-track {
  background: var(--theme-bg-primary, #0a0a0a);
}

.editor-tag-suggestions::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.editor-tag-suggestions::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* ============================================
   Modal Scrolling Adjustments
   ============================================ */

/* Ensure modal body can scroll with new content */
.editor-modal-body {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
