/*
SCSS variables are information about icon's compiled state, stored under its original file name

.icon-home {
  width: $icon-home-width;
}

The large array-like variables contain all information about a single icon
$icon-home: x y offset_x offset_y width height total_width total_height image_path;

At the bottom of this section, we provide information about the spritesheet itself
$spritesheet: width height image $spritesheet-sprites;
*/
$hot-air-balloon-name: 'hot-air-balloon';
$hot-air-balloon-x: 0px;
$hot-air-balloon-y: 0px;
$hot-air-balloon-offset-x: 0px;
$hot-air-balloon-offset-y: 0px;
$hot-air-balloon-width: 90px;
$hot-air-balloon-height: 90px;
$hot-air-balloon-total-width: 180px;
$hot-air-balloon-total-height: 180px;
$hot-air-balloon-image: 'sprites/circular-icons.png';
$hot-air-balloon: (0px, 0px, 0px, 0px, 90px, 90px, 180px, 180px, 'sprites/circular-icons.png', 'hot-air-balloon', );
$information-name: 'information';
$information-x: 90px;
$information-y: 90px;
$information-offset-x: -90px;
$information-offset-y: -90px;
$information-width: 26px;
$information-height: 26px;
$information-total-width: 180px;
$information-total-height: 180px;
$information-image: 'sprites/circular-icons.png';
$information: (90px, 90px, -90px, -90px, 26px, 26px, 180px, 180px, 'sprites/circular-icons.png', 'information', );
$people-name: 'people';
$people-x: 90px;
$people-y: 0px;
$people-offset-x: -90px;
$people-offset-y: 0px;
$people-width: 90px;
$people-height: 90px;
$people-total-width: 180px;
$people-total-height: 180px;
$people-image: 'sprites/circular-icons.png';
$people: (90px, 0px, -90px, 0px, 90px, 90px, 180px, 180px, 'sprites/circular-icons.png', 'people', );
$ticket-name: 'ticket';
$ticket-x: 0px;
$ticket-y: 90px;
$ticket-offset-x: 0px;
$ticket-offset-y: -90px;
$ticket-width: 90px;
$ticket-height: 90px;
$ticket-total-width: 180px;
$ticket-total-height: 180px;
$ticket-image: 'sprites/circular-icons.png';
$ticket: (0px, 90px, 0px, -90px, 90px, 90px, 180px, 180px, 'sprites/circular-icons.png', 'ticket', );
$spritesheet-width: 180px;
$spritesheet-height: 180px;
$spritesheet-image: 'sprites/circular-icons.png';
$spritesheet-sprites: ($hot-air-balloon, $information, $people, $ticket, );
$spritesheet: (180px, 180px, 'sprites/circular-icons.png', $spritesheet-sprites, );

/*
The provided mixins are intended to be used with the array-like variables

.icon-home {
  @include sprite-width($icon-home);
}

.icon-email {
  @include sprite($icon-email);
}
*/
@mixin sprite-width($sprite) {
  width: nth($sprite, 5);
}

@mixin sprite-height($sprite) {
  height: nth($sprite, 6);
}

@mixin sprite-position($sprite) {
  $sprite-offset-x: nth($sprite, 3);
  $sprite-offset-y: nth($sprite, 4);
  background-position: $sprite-offset-x  $sprite-offset-y;
}

@mixin sprite-image($sprite) {
  $sprite-image: nth($sprite, 9);
  background-image: image-url('#{$sprite-image}');
}

@mixin sprite($sprite) {
  @include sprite-image($sprite);
  @include sprite-position($sprite);
  @include sprite-width($sprite);
  @include sprite-height($sprite);
}

/*
The `sprites` mixin generates identical output to the CSS template
  but can be overridden inside of SCSS

@include sprites($spritesheet-sprites);
*/
@mixin sprites($sprites) {
  @each $sprite in $sprites {
    $sprite-name: nth($sprite, 10);
    .#{$sprite-name} {
      @include sprite($sprite);
    }
  }
}
/*
Icon classes can be used entirely standalone. They are named after their original file names.

```html
<!-- `display: block` sprite -->
<div class="icon-home"></div>

<!-- `display: inline-block` sprite -->
<img class="icon-home" />
```
*/
.icon-hot-air-balloon {
  background-image: image-url('sprites/circular-icons.png');
  background-position: 0px 0px;
  width: 90px;
  height: 90px;
}
.icon-information {
  background-image: image-url('sprites/circular-icons.png');
  background-position: -90px -90px;
  width: 26px;
  height: 26px;
}
.icon-people {
  background-image: image-url('sprites/circular-icons.png');
  background-position: -90px 0px;
  width: 90px;
  height: 90px;
}
.icon-ticket {
  background-image: image-url('sprites/circular-icons.png');
  background-position: 0px -90px;
  width: 90px;
  height: 90px;
}
