[data-panel="settings"] {
  height: 100%;
}

#panel h2 {
  margin: 0 -16px 16px 0;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  height: 73px;
  display: flex;
  align-items: center;
  z-index: 2;
}

#panel h2::before {
  content: "";
  position: absolute;
  right: 100%;
  height: inherit;
  width: 16px;
  background: var(--bg-1);
  border-bottom: inherit;
}

#panel h2::after {
  content: "";
  position: absolute;
  left: 100%;
  height: inherit;
  width: 56px;
  background: var(--bg-1);
  border-bottom: inherit;
}

#settings-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.settings-radio-label {
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.vertical .settings-radio-label {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.setting-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-inner-wrapper {
  display: flex;
  gap: 8px;
  position: relative;
  width: 100%;
}

.setting-wrapper:not(:last-child) {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.setting-wrapper > label:first-child {
  width: 100%;
}

.setting-wrapper > label > h3 {
  margin: 0;
}

.setting-wrapper-radio {
  justify-content: space-between;
  align-items: center;
}

.setting-wrapper-radio > .settings-inner-wrapper > label {
  transition: background 0.1s linear;
  padding: 8px;
  padding-top: 6px;
  border-radius: 8px;
  cursor: pointer;
  flex-basis: 100%;
  text-align: center;
  min-width: 30%;
}

.setting-wrapper-radio > .settings-inner-wrapper.vertical > label {
  padding-top: 8px;
  padding-left: 12px;
  min-height: 40px;
  max-height: 40px;
  transition: var(--box-shadow-transition), background 0.1s linear;
}

input[type="radio"] {
  appearance: none;
  height: 1.25em;
  width: 1.25em;
  margin: 8px auto 0;
  cursor: pointer;
  position: relative;
}

.vertical input[type="radio"] {
  margin: 0;
  margin-left: 8px;
}

input[type="radio"]::after {
  content: "\e18a";
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-family: "Phosphor";
  position: absolute;
  inset: 0;
  font-size: 1.25rem;
  transition: color 0.1s linear;
}

input[type="radio"]:checked::after {
  content: "\eb08";
  font-family: "Phosphor-fill";
  color: var(--accent);
}

label:has(input[type="radio"]) {
  transition: color 0.1s linear, var(--box-shadow-transition);
  box-shadow: 0 0 var(--accent);
}

label:has(input[type="radio"]:checked) {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 90%);
}

label:has(input[type="radio"]:focus-visible) {
  box-shadow: 0 0 0 2px var(--accent);
}

.button-in-radios {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--btn);
}

.button-in-radios:hover:not(:active) {
  background: var(--btn-hover);
}

#panel #more-fonts-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
  border-bottom: none;
}

#fonts-back {
  height: 40px;
  width: 40px;
  border-radius: 50%;
}

#more-fonts-search-wrapper {
  position: sticky;
  top: 57px /* 56 + 1 for the border */;
  margin: -16px;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  z-index: 3;
}

#more-fonts-search {
  height: 40px;
  border-radius: 100px;
  background: var(--bg-2);
  padding: 0 24px;
  width: 100%;
}
