/* Studio Settings page styles — extracted from inline <style> in
 * settings.html so we can iterate without rehashing CSP. Loaded via
 * <link rel="stylesheet"> which `style-src 'self'` already covers. */

.settings-section {
  background: var(--surface, #0F172A);
  border: 1px solid var(--line, #1E293B);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.settings-section h2 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.settings-section .lede {
  margin: 0 0 22px 0;
  font-size: 13.5px;
  color: var(--muted-2, #94A3B8);
  line-height: 1.55;
}

.settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.settings-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #CBD5E1);
}
.settings-row input[type="url"],
.settings-row input[type="text"] {
  width: 100%;
  background: var(--surface-2, #0B1120);
  border: 1px solid var(--line-2, #334155);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text, #E2E8F0);
  font-family: var(--font-mono);
  font-size: 13px;
}
.settings-row input:focus,
.settings-row select:focus {
  outline: 0;
  border-color: var(--accent, #7DD3FC);
}
.settings-row .hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2, #94A3B8);
  line-height: 1.6;
}

/* Native <select> — match input styling on the dark theme. The browser
 * default is a glaring white box that breaks the visual hierarchy. */
.settings-row select {
  width: 100%;
  background: var(--surface-2, #0B1120);
  border: 1px solid var(--line-2, #334155);
  border-radius: 8px;
  padding: 10px 36px 10px 12px;
  color: var(--text, #E2E8F0);
  font-family: var(--font-mono);
  font-size: 13px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
}
.settings-row select:hover {
  border-color: var(--muted-2, #94A3B8);
}
.settings-row select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.settings-row select option {
  background: #0F172A;
  color: #E2E8F0;
}

/* Visual separator inside a settings-section (between Subscribe action
 * and the Preferences group below it). */
.settings-divider {
  border: 0;
  border-top: 1px solid var(--line, #1E293B);
  margin: 22px 0 18px;
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
.settings-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2);
  margin-left: auto;
}
.settings-status[data-state="ok"] {
  color: var(--ok, #4ADE80);
}
.settings-status[data-state="err"] {
  color: #F87171;
}

/* Pill states — `connected/disconnected` for webhooks,
 * `subscribed/unsubscribed` for digest. */
.settings-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.settings-pill[data-state="connected"],
.settings-pill[data-state="subscribed"] {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.4);
  color: var(--ok);
}
.settings-pill[data-state="disconnected"],
.settings-pill[data-state="unsubscribed"] {
  color: var(--muted-2);
}
.settings-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Footnotes group at the bottom of a settings-section — small lines
 * each prefixed with a subtle bullet for visual rhythm. Replaces the
 * loose stack of <p class="hint"> elements. */
.settings-footnotes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #1E293B);
}
.settings-footnotes .hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted-2, #94A3B8);
  line-height: 1.6;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.settings-footnotes .hint::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2, #94A3B8);
  margin-top: 7px;
  flex-shrink: 0;
  opacity: 0.55;
}
.settings-footnotes .hint > span:first-of-type {
  display: inline;
}

/* Digest-section locale row — give it breathing room from the action
 * row above so it reads as a separate preference group. */
.settings-row.digest-prefs-row {
  margin-top: 4px;
}
