/* ============================================================
   Seed Code Chat — Settings
   Settings drawer/panel · Provider cards · Provider form
   ============================================================ */

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgba(5, 6, 5, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}

.settings-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: min(560px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3);
  transform: translateX(102%);
  transition: transform var(--t-med) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.settings-panel.open {
  transform: translateX(0);
}

.settings-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex: none;
}

.settings-head h2 {
  flex: 1;
  font-size: var(--fs-17);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-head h2 svg {
  color: var(--brand-strong);
}

.settings-tabs {
  padding: 0 14px;
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.settings-section {
  margin-bottom: 22px;
}

.settings-section h3 {
  font-size: var(--fs-13);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Setting rows ---- */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
}

.setting-row .sr-info .sr-title {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text);
}

.setting-row .sr-info .sr-desc {
  font-size: var(--fs-12);
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Provider cards ---- */
.provider-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-base), box-shadow var(--t-base),
    transform var(--t-fast), background var(--t-base);
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
}

.provider-card:hover {
  border-color: var(--brand-deep);
  transform: translateY(-1px);
}

.provider-card.active {
  border-color: var(--brand-deep);
  background: var(--brand-dim);
  box-shadow: inset 0 0 0 1px var(--brand-deep);
}

.provider-card .pc-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
  flex: none;
}

.pc-icon .seedcode-logo {
  width: 20px;
  height: 20px;
}

.provider-card .pc-info {
  flex: 1;
  min-width: 0;
}

.provider-card .pc-name {
  font-weight: 600;
  font-size: var(--fs-14);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-card .pc-desc {
  font-size: var(--fs-12);
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-card .pc-status {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.provider-card .pc-primary {
  font-size: 10px;
  font-weight: 700;
  color: #062A15;
  background: var(--brand-strong);
  border-radius: 4px;
  padding: 1px 7px;
  letter-spacing: 0.05em;
}

/* ---- Provider detail form ---- */
.provider-form .pf-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.provider-form .pf-head .pc-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-strong);
}

.provider-form .pf-head h3 {
  font-size: var(--fs-16);
  color: var(--text);
}

.provider-form .pf-head .pf-sub {
  font-size: var(--fs-12);
  color: var(--muted);
}

.model-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 6px;
  font-size: var(--fs-13);
}

.model-chip .mc-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-chip .mc-free {
  color: var(--brand-strong);
  font-size: var(--fs-11);
  font-weight: 700;
}

.model-chip .mc-remove {
  color: var(--muted);
  display: flex;
}

.model-chip .mc-remove:hover {
  color: var(--danger);
}

/* ---- Data & privacy ---- */
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.storage-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--fs-12);
  color: var(--muted);
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.45;
  margin-top: 12px;
}

.storage-note svg {
  color: var(--warning);
  flex: none;
  margin-top: 2px;
}

/* ---- About ---- */
.about-block {
  text-align: center;
  padding: 20px 0;
}

.about-block .about-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  color: var(--brand-strong);
  filter: drop-shadow(0 0 12px var(--brand-glow));
}

.about-block .about-name {
  font-size: var(--fs-18);
  font-weight: 700;
}

.about-block .about-ver {
  font-size: var(--fs-12);
  color: var(--muted);
  margin: 4px 0 12px;
  font-family: var(--font-mono);
}

.about-block .about-desc {
  color: var(--muted);
  font-size: var(--fs-13);
  max-width: 380px;
  margin: 0 auto 14px;
}

.credits {
  font-size: var(--fs-11);
  color: var(--muted-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

@media (max-width: 600px) {
  .settings-panel {
    width: 100vw;
    border-left: none;
  }
}
