/* ============================= Settings warn card ============================= */

.library--warn {
  border-color: rgba(239, 68, 68, .30);
  background: rgba(254, 242, 242, .65);
}
.library--warn .library-head {
  border-bottom-color: rgba(239, 68, 68, .20);
}
.library-head h2:has(svg) {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.library--warn .library-head h2 {
  color: #991b1b;
}

.settings-warn-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.settings-warn-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

[data-theme="dark"] .library--warn {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(100, 0, 0, .12);
}
[data-theme="dark"] .library--warn .library-head {
  border-bottom-color: rgba(239, 68, 68, .18);
}
[data-theme="dark"] .library--warn .library-head h2 {
  color: #fca5a5;
}

/* ============================= Settings page ============================= */

.settings-body {
  padding: 0 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.settings-row--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.settings-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.settings-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.settings-badge {
  font-size: 0.68rem;
  font-weight: 500;
  background: var(--line);
  color: var(--muted);
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.settings-radio-group {
  display: grid;
  gap: 0.75rem;
}
.settings-radio-group--theme {
  grid-template-columns: repeat(2, 140px);
}
.settings-radio-group--cursor {
  display: flex;
  flex-wrap: wrap;
}
.settings-radio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 1.6rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
  width: 100%;
  min-width: 0;
}
.settings-radio-group--cursor .settings-radio-card {
  width: calc((100% - 4.5rem) / 7);
  min-width: 112px;
}
.settings-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-radio-card:has(input:not(:disabled)):hover {
  border-color: rgba(100, 100, 100, .35);
}
.settings-radio-card:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.42;
}
.settings-radio-icon {
  color: var(--text);
  display: flex;
  transition: color .15s;
}
.settings-radio-card img {
  width: 28px;
  height: 28px;
  display: block;
}
.settings-radio-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
}

.settings-radio-card:has(input[value="light"]:not(:disabled)):hover {
  border-color: rgba(101, 163, 13, .5);
}
.settings-radio-card:has(input[value="light"]:checked) {
  border-color: #84cc16;
  background: rgba(132, 204, 22, .07);
}
.settings-radio-card:has(input[value="light"]:checked) .settings-radio-icon {
  color: #84cc16;
}

.settings-radio-card:has(input[value="dark"]:not(:disabled)):hover {
  border-color: rgba(249, 115, 22, .5);
}
.settings-radio-card:has(input[value="dark"]:checked) {
  border-color: #f97316;
  background: rgba(249, 115, 22, .07);
}
.settings-radio-card:has(input[value="dark"]:checked) .settings-radio-icon {
  color: #f97316;
}

.settings-radio-card:has(input[name="cursor"]:not(:disabled)):hover {
  border-color: rgba(37, 99, 235, .5);
}
.settings-radio-card:has(input[name="cursor"]:checked) {
  border-color: #2563eb;
  background: rgba(37, 99, 235, .07);
}
.settings-radio-card:has(input[name="cursor"]:checked) .settings-radio-icon {
  color: #2563eb;
}

[data-theme="dark"] .settings-radio-card:has(input[value="light"]:checked) {
  background: rgba(132, 204, 22, .10);
}
[data-theme="dark"] .settings-radio-card:has(input[value="dark"]:checked) {
  background: rgba(249, 115, 22, .10);
}
[data-theme="dark"] .settings-radio-card:has(input[name="cursor"]:checked) {
  background: rgba(37, 99, 235, .12);
}

.settings-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}
.settings-note-list {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.btn-danger {
  padding: 0.55rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-danger:hover {
  background: #b91c1c;
}
