@charset 'UTF-8';

@import 'variables';
@import 'mixins';
@import 'icons';

@include font-face('hastebin-icons', '../font/hastebin/hastebin-icons', '20150224');
@include font-face('Exo 2', '../font/exo2/Exo2-Italic', '20150226', 400, italic);
@include font-face('Exo 2', '../font/exo2/Exo2-SemiBoldItalic', '20150226', 600, italic);

html {
  height: 100%;
}

body, code, pre, textarea, ul {
  margin: 0;
  padding: 0;
}

body {
  padding: 1.5rem 3.2rem;
  height: 100%;
  background: $base-bg-color;
  font-family: $base-font-family;
}

// Pastebox

.pastebox {
  width: 100%;
  height: 100%;
  resize: none;

  font-family: $code-font-family;
  font-size: $code-font-size;
  -moz-tab-size: $code-tabsize;
  -o-tab-size: $code-tabsize;
  tab-size: $code-tabsize;

  color: $text-color;
  background: transparent;
  border: 0;
  outline: none;
}

.pastebox > code {
  padding: 0;  // override highlight.js' padding
  font-family: inherit;
  font-size: inherit;
}

// Line numbers

#linenos {
  position: absolute;
  top: 1.5rem;
  left: 0;
  width: 2.2rem;
  z-index: -1000;
  color: $linenum-color;
  font-family: $code-font-family;
  font-size: $code-font-size;
  text-align: right;
}

// Action bar (that thing in the top right corner)

#actionbar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: +900;  // watch out
  color: $icons-color;
}

.logo {
  padding: 0.8em;
  padding-bottom: 0.4em;
  text-align: center;
  background: $logo-bg-color;
}

.logo > a {
  font: italic normal 400 1.6em/1 "Exo 2";
  text-decoration: none;
  // this font looks ugly with antialiasing
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: $icons-color;
  opacity: 0.7;

  b {
    font-weight: 600;
  }

  &:hover {
    opacity: 1;
  }
}

.actions {
  padding: 0 0.5em;
  background: $actionbar-bg-color;
}

.button {
  display: inline-block;
  padding: 0.5em 0.15em;
  opacity: 0.3;
  font-size: 1.15em;

  &:before {
    @include icon-style('hastebin-icons');
  }

  &.enabled {
    opacity: 0.7;
  }

  &.enabled:hover {
    cursor: pointer;
    opacity: 1;
  }
}

#save-button:before {
  content: $icon-save;
  font-size: 106%;  // compensate different icon size
}

#new-button:before {
  content: $icon-new;
}

#duplicate-button:before {
  content: $icon-edit;
}

#raw-button:before {
  content: $icon-text;
}

#twitter-button:before {
  content: $icon-twitter;
}

.tooltip, #messages li {
  padding: 0.8em 1.2em;
  background: $tooltip-bg-color;
  font-size: 0.75em;
  line-height: 0.75em * 1.6;
}

.tooltip-label, #messages li {
  color: $text-color;
  font-weight: bold;
}

.tooltip-shortcut {
  opacity: 0.7;
  font-weight: normal;
}

// Error messages

#messages {
  position: fixed;
  top: 0;
  left: 50%;
  margin: 0 0 0 -25%;
  padding: 0;
  width: 50%;
  z-index: +1000;

  li {
    margin: 0 auto;
    background: $message-bg-color;
    list-style: none;
  }
}
