/* Module-scoped styles for the thread cover editor and the confession picker (session 49).
 * Split from styles.css so neither file nears the 400-line cap. Every class is prefixed `threads__`. */

.threads__cover {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.threads__cover-frame {
  aspect-ratio: 3 / 2;
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.threads__cover-frame--drawer {
  margin-bottom: var(--s-4);
}

.threads__cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.threads__cover-info {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.threads__cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.threads__cover-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-8) var(--s-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.threads__crop {
  max-height: 360px;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--r-md);
}

.threads__crop-img {
  display: block;
  max-width: 100%;
}

.threads__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-4);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  cursor: pointer;
}

.threads__drop:hover,
.threads__drop:focus-within {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.threads__drop-icon {
  color: var(--text-muted);
}

.threads__drop-title {
  font-weight: 500;
  color: var(--text);
}

.threads__drop-hint {
  max-width: 380px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* Confession picker (New thread form only) */

.threads__picker {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.threads__picker-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.threads__picker-summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-sm);
}

.threads__picker-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.threads__source-list {
  max-height: 260px;
  overflow-y: auto;
}

.threads__sources {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.threads__source-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.threads__source {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  width: 100%;
  padding: var(--s-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.threads__source:hover {
  border-color: var(--border-strong);
}

.threads__source:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.threads__source--selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.threads__source-text {
  font-size: var(--fs-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.threads__source-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: var(--fs-xs);
}
