@mixin spinbutton() {
  spinbutton {
    &.horizontal {
      border: 1px solid $borders;
      background-color: $base_color;
      border-radius: $entry_radius;

      &:backdrop {
        border-color: $unfocused_borders;
        background-color: $unfocused_base_color;
      }

      &:disabled {
        border-color: $unfocused_borders;
        color: $disabled_fg_color;
        background-color: $disabled_base_color;

        &:backdrop {
          border-color: $unfocused_borders;
          color: $unfocused_disabled_fg_color;
          background-color: $unfocused_disabled_base_color;
        }
      }

      &:focus {
        border-color: $selected_bg_color;
        box-shadow: 0 0 0 1px $selected_bg_color;
      }

      entry {
        border: none;
        background: none;
        padding: 6px;
        padding-top: 0;
        padding-bottom: 0;
        min-width: 34px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;

        &:focus { box-shadow: none; }
      }

      button {
        border: none;
        border-radius: 0;
        min-height: 16px;
        border-color: gtkshade($borders, 1.1);
        background: none;
        box-shadow: -1px 0 $bg_color;
        text-shadow: none;
        -gtk-icon-shadow: none;

        &:backdrop { box-shadow: -1px 0 $bg_color; }

        &.down { border-radius: 0; }
        &.up {
          border-top-left-radius: 0;
          border-bottom-left-radius: 0;
        }
      }
    }

    &.vertical {
      entry {
        min-height: 32px;
        min-width: 32px;
        padding: 0;
        border-radius: 0;
      }

      button {
        min-height: 32px;
        min-width: 32px;
        padding: 0;

        &.up {
          border-bottom-left-radius: 0;
          border-bottom-right-radius: 0;
          border-bottom-width: 0;
        }

        &.down {
          border-top-width: 0;
          border-top-left-radius: 0;
          border-top-right-radius: 0;
        }
      }
    }
  }
}
