/* Shared sensitive-content preference: sidebar control and confirmation. */
.sensitive-toggle {
  min-height: 54px;
  gap: 12px;
}

.sensitive-toggle__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  white-space: normal;
}

.sensitive-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sensitive-toggle__track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border-radius: 999px;
  background: var(--border);
  transition: background .2s ease;
}

.sensitive-toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  transition: transform .2s ease;
}

.sensitive-toggle__input:checked + .sensitive-toggle__track {
  background: var(--success, #20a46b);
}

.sensitive-toggle__input:checked + .sensitive-toggle__track::after {
  transform: translateX(16px);
}

.sensitive-toggle__input:focus-visible + .sensitive-toggle__track {
  outline: 2px solid var(--text-soft);
  outline-offset: 3px;
}

.sensitive-confirm {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(520px, calc(100vw - 44px));
  max-height: calc(100dvh - 32px);
  padding: 24px 0;
  overflow: auto;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: center;
}

.sensitive-confirm::backdrop {
  background: rgba(10, 14, 18, .68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sensitive-confirm__title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .65);
}

.sensitive-confirm__description {
  margin: 0;
  color: rgba(255, 255, 255, .9);
  font-size: 15px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .72);
}

.sensitive-confirm__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.sensitive-confirm__actions button {
  min-width: 76px;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.sensitive-confirm__cancel {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.sensitive-confirm__accept {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(255, 255, 255, .92);
  color: #111318;
}

.sensitive-confirm__accept:hover {
  background: #fff;
  border-color: #fff;
}

.sensitive-confirm__cancel:hover {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .46);
}

.sensitive-confirm__actions button:active {
  transform: scale(.98);
}

.sensitive-confirm__actions button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Apply a stored preference before deferred scripts run, avoiding a blurred flash. */
.show-sensitive-content .nsfw > :not(.nsfw__overlay),
.show-sensitive-content .nsfw .fh-slider__img {
  filter: none;
  transform: none;
}

.show-sensitive-content .nsfw .nsfw__overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 640px) {
  .sensitive-confirm {
    padding: 20px 0;
  }

  .sensitive-confirm__title {
    font-size: 23px;
  }
}
