/* ── Selje shared layout & brand ───────────────────────────────── */
.svf-settings-page {
  --selje-brand: #2e7d7a;
  --selje-brand-light: #ebf5f4;
  background: var(--selje-brand-light);
  padding: 16px;
  border: 1px solid #dcdcde;
  border-radius: 6px;
}

.svf-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: #fff;
  border: 1px solid #dcdcde;
  border-left: 3px solid var(--selje-brand);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.svf-settings-header h1 {
  margin: 0;
  font-size: 1.3em;
  line-height: 1.4;
}

.svf-settings-header__subtitle {
  color: #646970;
  margin-top: 4px;
  font-size: 13px;
}

.svf-settings-header__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.svf-version {
  display: inline-block;
  background: #f6f7f7;
  border: 1px solid var(--selje-brand);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--selje-brand);
  font-size: 12px;
}

.svf-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 16px;
  align-items: start;
}

.svf-settings-main {
  min-width: 0;
}

.svf-settings-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  padding: 14px 16px;
  min-width: 0;
}

.svf-settings-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.svf-sidebar-box {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 6px;
  padding: 12px;
  min-width: 0;
}

.svf-sidebar-box h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
}

.svf-sidebar-heading {
  margin: 16px 0 6px 0;
  padding-top: 12px;
  border-top: 1px solid #f0f0f1;
  font-size: 11px;
  font-weight: 700;
  color: #1d2327;
}

/* Info icon + CSS tooltip */
.sodl-help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2271b1;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, serif;
  cursor: default;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.sodl-help-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #1d2327;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 4px;
  white-space: normal;
  width: 240px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 9999;
}

.sodl-help-tip:hover::after,
.sodl-help-tip:focus::after {
  opacity: 1;
}

.sodl-help-tip:focus {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}

.sodl-doc-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #2271b1;
  font-size: 13px;
  text-align: left;
}

.sodl-doc-link-btn:hover,
.sodl-doc-link-btn:focus {
  color: #135e96;
  text-decoration: underline;
}

/* Documentation overlay */
#sodl-readme-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
}

#sodl-readme-overlay.is-open {
  display: flex;
}

#sodl-readme-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

#sodl-readme-modal {
  position: relative;
  background: #fff;
  border-radius: 6px;
  width: 90%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}

#sodl-readme-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #dcdcde;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

#sodl-readme-close {
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  color: #646970;
  border-radius: 3px;
}

#sodl-readme-close:hover,
#sodl-readme-close:focus {
  color: #1d2327;
  background: #f0f0f1;
}

#sodl-readme-modal-body {
  overflow-y: auto;
  padding: 20px 28px 28px;
  font-size: 14px;
  line-height: 1.7;
}

.svf-doc-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.svf-doc-links li {
  margin: 6px 0;
}

.svf-doc-links a {
  font-size: 13px;
}

.svf-donate-button {
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.8;
  padding: 0 10px;
  min-height: auto;
}

.svf-settings-page .nav-tab-active,
.svf-settings-page .nav-tab-active:hover,
.svf-settings-page .nav-tab-active:focus {
  border-bottom-color: var(--selje-brand);
  color: var(--selje-brand);
}

@media (max-width: 782px) {
  .svf-settings-layout {
    grid-template-columns: 1fr;
  }
}

.sodl-roles-row {
  margin-top: 8px;
}

.sodl-library-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sodl-library-actions form {
  margin: 0;
}

.sodl-donate-button,
.sodl-donate-button:visited {
  background: #ca6ce6;
  border-color: #ffffff;
  color: #ffffff;
  font-weight: 700;
}

.sodl-donate-button:hover,
.sodl-donate-button:focus {
  background: #b65fd1;
  border-color: #ffffff;
  color: #ffffff;
}
