/* Draggabilly lil page styles
------------------------- */

/* ---- base ---- */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #444;
  margin: 0;
}

/* base
------------------------- */

h1, h2, h3, h4, h5,
p,
ul, ol, pre {
  margin-top: 0;
  margin-bottom: 0.8em;
}

h1 {
  letter-spacing: -0.03em;
}

h2, hr {
  border: none;
  border-top: 2px solid #DDD;
  padding-top: 0.5em;
  margin-top: 2.0em;
  font-size: 2.2em;
}

h3, h4, h5 { font-weight: normal; }

h3 {
  font-size: 1.5em;
  margin-top: 2.0em;
}

a {
  color: #80D;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.8em;
}

pre, code {
  font-family: Consolas, Menlo, monospace;
  font-size: 15px;
  background: #EEE;
  color: #111;
}

code {
  padding: 0.1em 0.2em;
  border-radius: 2px;
}

pre {
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #DDD;
  white-space: pre-wrap;
}

pre code {
  border-radius: 0;
  padding: 0;
}

.tagline {
  font-size: 20px;
}

/* layout
------------------------- */

#content {
  padding: 1.0em 1.0em 4.0em;
}

.total-centered {
  position: absolute;
  width: 100%;
  top: 50%;
  text-align: center;
  transform: translateY(-50%);
}

/* demo
------------------------- */

.demo {
  position: relative;
}

.demo__positioner {
  margin-bottom: 0.8em;
}

.demo__edit-link {
  font-size: 0.9em;
  margin-top: 15px;
}


/* draggabillies
------------------------- */

.draggable {
  width:  150px;
  height: 150px;
  background: #FA0;
  border-radius: 10px;
  z-index: 1;
}

.draggable--squat { height: 100px; }

.draggable.is-dragging {
  opacity: 0.5;
  z-index: 2;
}

.draggable.is-dragging,
.draggable:hover,
.demo--handle .handle:hover {
  cursor: move;
  background: #0AF;
}


/* specific examples
------------------------- */

.demo--containment__container {
  top: -2.4em;
  height: 150px;
  padding: 15px 2.5%;
  border-radius: 10px;
  border: 6px solid #FA0;
}

.demo--containment .draggable {
  width: 23.3%;
  height: 80px;
  float: left;
  margin: 15px 5%;
}

.demo--handle .draggable {
  padding: 20px;
}

.demo--handle .draggable:hover {
  cursor: default;
  background: #FA0;
}

.demo--handle .handle {
  background: #555;
  background: hsla(0, 0%, 0%, 0.4);
  width:  60px;
  height: 60px;
  border-radius: 5px;
}

.demo--events pre {
  background: #555;
  color: white;
}

.demo--events pre code {
  color: white;
  background: none;
}

/* syntax highlighting
------------------------- */

code .string,
code .tag .value { color: #072; }
code .number, /* integer */
code .cp, /* doctype */
code .literal { color: #07D; } /*boolean*/
code .keyword { color: #C31; } /* keyword */
code .kd, /* storage */
code .attribute { color: #A61; } /* markup attribute */
code .p  { color: #EDB; } /* punctuation */
code .o  { color: #F63; }   /* operator */
code .nb { color: #AA97AC;} /* support */

/* comment */
code .comment { color: #999; font-style: italic; }

code .tag { color: #37B; } /* Markup open tag */

code .id { color: #567; } /* css id */
code .class { color: #A63; }  /* CSS class */
code .rules { color: #431; }
code .m  { color: #DE8E50; } /* CSS value */
code .nd { color: #9FAD7E; } /* CSS pseudo selector */
code .hexcolor { color: #F63; }
code .at_rule { color: #088; }

code .draggabilly_keyword, /* new Flickity() */
code .draggie_var { color: #D0D; } /* flkty */


/* tablet and desktop */
@media screen and (min-width: 768px) {

  h1 {
    font-size: 70px;
    line-height: 1.2;
    margin-bottom: 0.3em;
  }

  #content {
    width: 65%;
    padding: 1.0em 2% 4.0em;
    background: #F5F5F5;
  }

  pre, code {
    background: #FFF;
  }

  pre { border-color: #E5E5E5; }

  .demo__positioner {
    position: absolute;
    left: 106%;
    width: 52%;
  }

}
