@import '../../shared/mixins',
        '../../shared/reset',
        '../../shared/about-dark';

/*
 * Copyright (c) 2012-2013 Thibaut Courouble
 * http://www.cssflow.com
 *
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */

html, body { min-height: 100%; }

body {
  font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif;
  color: #404040;
  background: #93a0b0;
  @include radial-gradient(center, circle cover, #a1acbb, #93a0b0 70%);
}

.settings {
  margin: 80px auto;
  width: 300px;
  background: #fafafa;
  border-radius: 5px;
  @include linear-gradient(top, #fafafa, #e1e1e1);
  @include box-shadow(0 2px 2px rgba(black, .15), 0 0 0 1px rgba(black, .1));
}

.settings-header {
  padding: 10px;
  background: #b5b5b5;
  border-bottom: 1px solid #949494;
  border-radius: 5px 5px 0 0;
  @include linear-gradient(top, #dadada, #b1b1b1);
  @include box-shadow(inset 0 1px rgba(white, .15));

  > h2 {
    line-height: 25px;
    font-size: 15px;
    color: #505050;
    text-align: center;
    text-shadow: 0 1px rgba(white, .4);
  }

  > a {
    position: relative;
    float: left;
    width: 23px;
    height: 23px;
    background: #ddd;
    background-clip: padding-box;
    border: 1px solid;
    border-color: #aaa #9c9c9c #888;
    border-radius: 13px;
    @include hide-text;
    @include linear-gradient(top, #fafafa, #c1c1c1);
    @include box-shadow(inset 0 1px 1px rgba(white, .9));
    @extend %icon;

    &:before {
      position: absolute;
      top: 6px;
      left: 6px;
      width: 12px;
      height: 12px;
    }

    &:active {
      background: #ccc;
      border-color: #888 #9c9c9c #9c9c9c;
      @include box-shadow(inset 0 1px 2px rgba(black, .2));
    }
  }

  .icon-close { float: right; }
}

.settings-form {
  text-shadow: 0 1px rgba(white, .5);

  > h3 {
    line-height: 25px;
    font-size: 11px;
    color: #888;
    text-align: center;
    text-transform: uppercase;
    @include linear-gradient(top, rgba(black, 0), rgba(black, .05));
  }

  > label {
    display: block;
    position: relative;
    padding: 8px 12px 8px 52px;
    line-height: 16px;
    font-size: 11px;
    color: #8c8c8c;
    border-top: 1px solid #d5d5d5;
    cursor: pointer;
    @include box-shadow(inset 0 1px rgba(white, .5));
    @extend %icon;

    &:before {
      position: absolute;
      top: 50%;
      left: 12px;
      margin-top: -14px;
      width: 28px;
      height: 28px;
    }
  }

  input { display: none; }

  strong {
    display: block;
    font-size: 12px;
    color: #414141;
    font-weight: bold;
  }
}

.settings-switch {
  float: right;
  margin: 5px 0 0 20px;
  padding: 1px;
  width: 52px;
  background: #b5b5b5;
  background-clip: padding-box;
  border: 1px solid;
  border-color: rgba(black, .45) rgba(black, .4) rgba(black, .28);
  border-radius: 10px;
  @include box-sizing(border-box);
  @include linear-gradient(top, #b5b5b5, #d5d5d5);
  @include box-shadow(inset 0 1px 1px rgba(black, .12), 0 1px rgba(white, .4));
  @include transition(.15s ease-out);

  input:checked + & {
    padding-left: 19px;
    background: #417ece;
    background-clip: border-box;
    border-color: #1f559f #3672b8 #498cd3;
    @include linear-gradient(top, #417ece, #62a4ee);
  }
}

.settings-switch-handle {
  display: block;
  margin: 1px;
  padding: 1px;
  width: 26px;
  height: 12px;
  background: #fbfbfb;
  border-radius: 8px;
  @include linear-gradient(top, #fbfbfb, #d9d9d9);
  @include box-shadow(inset 0 0 0 1px rgba(white, .2), 0 0 0 1px rgba(black, .3), 0 1px rgba(black, .1));

  &:before, &:after {
    content: '';
    width: 11px;
    height: 12px;
    border-radius: 6px;
  }

  &:before {
    float: left;
    background: #dfdfdf;
    border-right: 1px solid rgba(black, .2);
    @include linear-gradient(left, #dfdfdf, #c4c4c4);
  }

  &:after {
    float: right;
    background: #dfdfdf;
    border-left: 1px solid rgba(black, .2);
    @include linear-gradient(right, #dfdfdf, #c4c4c4);
  }
}

%icon:before {
  content: '';
  display: block;
  background-image: url('../img/icons.png');
}

.icon-wifi:before { background-position: 0 0; }
.icon-gps:before { background-position: -28px 0; }
.icon-close:before { background-position: 0 -28px; }
.icon-prev:before { background-position: -12px -28px; }