@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
 */

body {
  font: 13px/20px 'Lucida Grande', Tahoma, Verdana, sans-serif;
  color: #404040;
  background: #f8f6f6;
}

.container {
  margin: 50px auto;
  width: 380px;

  .todo { margin: 0 auto; }
}

.todo {
  position: relative;
  width: 260px;
  padding: 12px 0;
  background: white;
  border: 1px solid;
  border-color: #dfdcdc #d9d6d6 #ccc;
  border-radius: 2px;
  @include box-shadow(0 1px 2px rgba(black, .1));

  &:before, &:after {
    content: '';
    position: absolute;
    z-index: -1;
    height: 4px; // required to apply border-radius
    background: white;
    border: 1px solid #ccc;
    border-radius: 2px;
  }

  &:after {
    bottom: -3px;
    left: 0;
    right: 0;
    @include box-shadow(0 1px 2px rgba(black, .1));
  }

  &:before {
    bottom: -5px;
    left: 2px;
    right: 2px;
    border-color: #c4c4c4;
    @include box-shadow(0 1px 2px rgba(black, .15));
  }

  .lt-ie9 & {
    &:before, &:after {
      height: 1px;
      border-top: 0;
    }
  }
}

.todo-list {
  border-top: 1px solid #e6ebed;

  &:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 35px;
    width: 3px;
    z-index: 2;
    border: 1px solid #f2e3df;
    border-width: 0 1px;
  }

  li {
    position: relative;
    padding: 7px 15px 7px 50px;
    line-height: 21px;
    font-size: 12px;
    color: #8b8f97;
    border-bottom: 1px solid #e6ebed;
  }

  .toggle {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 35px;
    @include hide-text;

    &:before {
      content: '';
      position: absolute;
      top: 9px;
      left: 9px;
      width: 15px;
      height: 15px;
      background: #faf9f9;
      border: 1px solid #6bb3ca;
      border-radius: 2px;
      @include transition(box-shadow .2s);
      @include box-shadow(0 1px 1px #dfecf4);
    }

    &:hover:before { @include box-shadow(0 0 3px #6bb3ca); }
  }

  .done .toggle:before, .toggle:active:before {
    border-color: #c0c0c0 #ccc #d8d8d8;
    background: #fdfcfc url('../img/sprite.png') 2px 2px no-repeat;
    @include box-shadow(inset 0 1px rgba(black, .05), inset 0 5px 5px rgba(black, .05));
  }
}

.todo-controls {
  margin: 0 15px 12px 50px;
  height: 12px;

  li { float: left; }
  li + li { margin-left: 10px; }
  .right { float: right; }

  a {
    display: block;
    margin: 0;
    opacity: .6;

    &:hover { opacity: 1; }
  }
}

.todo-pagination {
  margin: 12px 12px 0 50px;
  height: 22px;

  li { float: left; }
  .next { float: right; }
  .next i { margin: 0 0 0 2px; }

  a, span {
    display: block;
    line-height: 22px;
    font-size: 11px;
    color: #676f7f;
  }

  a {
    padding: 0 8px;
    text-decoration: none;
    text-shadow: 0 1px white;
    background: #f1f0f0;
    border-radius: 3px;

    &:hover { background: #e9e9e9; }
  }

  span {
    padding: 0 4px;
    opacity: .3;
  }
}

$icons: ('check', 0 0),
        ('add', -12px 0),
        ('delete', -24px 0),
        ('settings', -36px 0),
        ('previous', -48px 0),
        ('next', -60px 0);

[class^="icon-"], [class*=" icon-"] {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 2px;
  width: 12px;
  height: 12px;
  background-image: url('../img/sprite.png');
  background-repeat: no-repeat;
  @include hide-text;
}

@each $pair in $icons {
  .icon-#{nth($pair, 1)} { background-position: nth($pair, 2); }
}
