@use "../../scss/globals.scss";

.settings-general {
  display: flex;
  flex-direction: column;
  gap: globals.$spacing-unit * 2;

  &__section-title {
    margin-top: calc(globals.$spacing-unit * 2);
    margin-bottom: globals.$spacing-unit;
  }

  &__common-redist-button {
    align-self: flex-start;
  }

  &__test-achievement-notification-button {
    align-self: flex-start;
  }

  &__volume-control {
    display: flex;
    flex-direction: column;
    gap: 8px;

    label {
      font-size: 14px;
      color: globals.$muted-color;
    }
  }

  &__volume-input-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  &__volume-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: globals.$dark-background-color;
    border: 1px solid globals.$border-color;
    padding: 8px 8px;
    border-radius: 4px;
    transition: border-color 0.2s;

    &:focus-within {
      border-color: rgba(255, 255, 255, 0.5);
      color: globals.$muted-color;
    }

    input[type="number"] {
      width: 30px;
      background: transparent;
      border: none;
      color: globals.$muted-color;
      font-size: 14px;
      text-align: center;

      &:focus {
        outline: none;
      }

      &::-webkit-inner-spin-button,
      &::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
      }

      appearance: textfield;
      -moz-appearance: textfield;
    }
  }

  &__volume-input-unit {
    font-size: 14px;
    color: globals.$muted-color;
    pointer-events: none;
    user-select: none;
  }

  &__volume-input-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;

    button {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 16px;
      background: globals.$dark-background-color;
      border: 1px solid globals.$border-color;
      border-radius: 2px;
      color: globals.$muted-color;
      cursor: pointer;
      transition: all 0.2s;

      &:hover {
        color: globals.$muted-color;
        border-color: rgba(255, 255, 255, 0.5);
      }

      &:active {
        background: globals.$background-color;
      }

      svg {
        width: 12px;
        height: 12px;
      }
    }
  }
}
