.enclosing-container {
  border-color: var(--p-content-border-color);
}

.preferences-section {
  @media (min-width: 768px) {
    padding: 0 1rem;
  }
}

.section-header {
  margin-bottom: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--p-text-color);
  margin: 0;

  .pi {
    color: var(--p-primary-color);
  }
}

.settings-card {
  border: 1px solid var(--p-content-border-color);
  border-radius: 8px;
  background: var(--p-content-background);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.setting-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;

  &:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  &.setting-item-indented {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--p-content-border-color);
    position: relative;

    &::before {
      content: '';
      position: absolute;
      left: -2px;
      top: 0;
      bottom: 0;
      width: 2px;
      background: var(--p-primary-color);
      opacity: 0.3;
    }
  }

  @media (max-width: 768px) {
    flex-direction: column;
    gap: 1rem;

    &.setting-item-indented {
      margin-left: 1rem;
      padding-left: 0.75rem;
    }
  }
}

.setting-info {
  flex: 1;
  min-width: 0;

  .setting-label {
    display: block;
    font-weight: 600;
    color: var(--p-text-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .setting-label-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;

    .setting-label {
      margin-bottom: 0;
      flex-shrink: 0;
    }
  }

  .setting-description {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--p-text-muted-color);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;

    .pi {
      margin-top: 0.125rem;
      flex-shrink: 0;
    }

    .pi-exclamation-triangle {
      color: var(--p-orange-500);
    }

    .pi-info-circle {
      color: var(--p-primary-color);
    }
  }
}

.setting-control {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;

  @media (max-width: 768px) {
    align-items: flex-start;
    width: 100%;
  }
}

.warning-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--p-red-400);
  font-size: 0.875rem;
  line-height: 1.5;

  .pi-exclamation-triangle {
    color: var(--p-red-500);
    margin-top: 0.125rem;
    flex-shrink: 0;
  }

  strong {
    font-weight: 600;
    color: var(--p-red-500);
  }
}
