/* Minimal placeholder styling — replace with the real layout. */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #111;
  color: #eee;
  height: 100vh;
  overflow: hidden;
}

.layout {
  display: flex;
  height: 100vh;
}

#sidebar {
  width: 260px;
  flex-shrink: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #333;
  padding: 1rem;
}

#sidebar h1 {
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

.hidden {
  display: none !important;
}

#source-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  margin: 0 0 1rem;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 6px;
}

#source-tabs button {
  flex: 1;
  padding: 0.35rem 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #999;
  font-size: 0.85rem;
  cursor: pointer;
}

#source-tabs button:hover {
  color: #eee;
}

#source-tabs button.active {
  background: #2a2a2a;
  color: #fff;
  font-weight: 600;
}

#all-events-item {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

#event-sections,
#group-sections {
  flex: 1;
  overflow-y: auto;
}

#event-sections h3,
#group-sections h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #777;
  margin: 0.75rem 0 0.35rem;
}

#event-sections h3:first-child,
#group-sections h3:first-child {
  margin-top: 0;
}

.group-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 1.5rem;
  border-radius: 4px;
}

.event-list.drag-over {
  outline: 1px dashed #666;
  outline-offset: 2px;
  background: #161616;
}

#settings-toggle {
  margin-top: 1rem;
  padding: 0.5rem 0.6rem;
  background: #1c1c1c;
  border: 1px solid #333;
  color: #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: left;
}

#settings-toggle:hover {
  background: #2a2a2a;
  color: #fff;
}

#all-events-item li,
.event-list li,
.group-list li {
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #ccc;
}

.event-list li {
  cursor: grab;
}

.event-list li:active {
  cursor: grabbing;
}

#all-events-item li:hover,
.event-list li:hover,
.group-list li:hover {
  background: #1c1c1c;
}

#all-events-item li.active,
.event-list li.active,
.group-list li.active {
  background: #2a2a2a;
  color: #fff;
  font-weight: 600;
}

.content {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.5rem;
}

header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#search {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: #1c1c1c;
  border: 1px solid #333;
  color: #eee;
  border-radius: 4px;
}

#sort {
  padding: 0.5rem 0.6rem;
  background: #1c1c1c;
  border: 1px solid #333;
  color: #eee;
  border-radius: 4px;
  font-size: 0.9rem;
}

#status {
  color: #999;
  font-size: 0.85rem;
}

#results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.scene-card {
  border: 1px solid #333;
  border-radius: 6px;
  padding: 0.75rem;
  background: #1a1a1a;
}

.scene-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: block;
}

.scene-field {
  margin-bottom: 0.5rem;
}

.scene-field label {
  display: block;
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.15rem;
}

.copy-row {
  display: flex;
  gap: 0.4rem;
}

.copy-row input,
.copy-row textarea {
  flex: 1;
  background: #111;
  border: 1px solid #333;
  color: #eee;
  border-radius: 4px;
  padding: 0.35rem;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.copy-row button {
  padding: 0.35rem 0.6rem;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.copy-row button:hover {
  background: #333;
}

#settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

#settings-overlay.hidden {
  display: none;
}

#settings-panel {
  width: min(560px, 90vw);
  max-height: 85vh;
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.25rem;
}

#settings-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.settings-hint {
  color: #999;
  font-size: 0.8rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.settings-hint code {
  background: #111;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 0.05rem 0.3rem;
}

#settings-panel label {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin: 0.75rem 0 0.25rem;
}

#settings-panel textarea {
  width: 100%;
  background: #111;
  border: 1px solid #333;
  color: #eee;
  border-radius: 4px;
  padding: 0.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  resize: vertical;
}

#settings-status {
  color: #999;
  font-size: 0.8rem;
  min-height: 1.2em;
}

.settings-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.settings-actions button {
  padding: 0.45rem 0.8rem;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.settings-actions button:first-child {
  margin-left: 0;
}

.settings-actions button:hover {
  background: #333;
}

#settings-save {
  background: #2d6a4f;
  border-color: #3c8563;
}

#settings-save:hover {
  background: #357a5b;
}

#show-more {
  display: block;
  margin: 1rem auto 0.5rem;
  padding: 0.5rem 1.25rem;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #eee;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

#show-more:hover {
  background: #333;
}
