html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Helvetica;
    background-color: #f5f5f5;
    color: #363433;
    -webkit-text-size-adjust: 100%;
}

header {
    background-color: #fff;
    border-bottom: 0.5px solid #ccc;
    text-align: center;
}

header menu {
    position: relative;
    display: flex;
    align-items: flex-end;
    max-width: 1280px;
    padding: 1em 2em 1em 2em;
    text-align: left;
    margin: auto;
}

header menu::before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 1em;
    right: 1em;
    height: 5px;
    background: #cde9f4;/*linear-gradient(to right, red, orange);*/
    border-radius: 5px;
}

header menu .logo {
    height: 3em;
    margin-bottom: -.45em; /* for baseline alignment */
}

header menu nav {
    text-align: right;
    flex-grow: 1;
}
header menu nav a.menu {
    margin-left: 1em;
}
.menu {
    display: inline-block;
    position: relative;
    text-decoration: none;
    color: #363433;
}

.menu::before {
    content: "";
    position: absolute;
    bottom: -.3em;
    left: 50%;
    right: 50%;
    height: 3px;
    background: linear-gradient(to right, orange, red 50%, orange);
    opacity: 0;
    border-radius: 3px;
    transition: .25s;
}
.menu:visited {
    color: #363433;
    transition: .25s;
}
.menu.selected::before,
.menu:hover::before,
.menu:active::before {
    left: 0%;
    right: 0%;
    opacity: 1;
    transition: .25s;
}

body#page-home header menu {
    padding-top: 2em;
    padding-bottom: 1.7em;
}

body#page-home header menu .logo {
    height: 5em;
    margin-bottom: -.7em; /* for baseline alignment */
}

@media (max-width: 768px) {
    body#page-home header menu .logo {
        height: 4em;
        margin-bottom: -.6em; /* for baseline alignment */
    }
}

@media (max-width: 600px) {
    header menu {
        display: block;
        text-align: center;
    }
    header menu nav {
        text-align: center;
        margin-top: 1em;
    }
    header menu .logo,
    body#page-home header menu .logo {
        height: 3em;
        margin-bottom: 0;
        margin-left: 2em;
    }
    main {
        padding: 1.5em;
    }
}

div.main-wrapper {
    text-align: center
}
main {
    max-width: 1280px;
    text-align: left;
    margin: auto;
    padding: 2em;
}
#page-home main {
    text-align: center;
}

.btn.icon {
    border: 1px solid #ddd;
    background-color: #eee;
    padding: 0;
    width: 3em;
    height: 2.5em;
    cursor: pointer;
}
.btn.icon:hover {
    background-color: #eef;
    border: 1px solid #ccc;
}
.btn.icon:active {
    background-color: #ccf;
    border: 1px solid #888;
}
.btn.icon img {
    height: 16px;
}

.collection-header {
    display: flex;
    align-items: flex-end;
    margin-bottom: 1em;
}
.collection-header h2 {
    margin: 0;
    flex-grow: 1;
}
.choose-theme {
/*    border: 1px solid #666;*/
    margin-right: 1em;
}
.choose-theme label {
/*    border-right: 1px solid #666*/
    display: inline-block;
    padding: .2em .4em;
    color: #363433;
    font-size: initial;
    font-weight: normal;
}
.choose-theme label::last-child {
/*    border-right: none*/
}
.choose-theme input {
    display: none;
}

.embeddable {
    margin-bottom: 2em;
}
.embeddable+.embeddable {
    border-top: 3px solid #aaa;
    padding-top: 1em;
}

.embeddable .embed-name {
    margin: 0 0 0.75em 0;
    display: flex;
    align-items: flex-end;
}
.embeddable .embed-name h3 {
    flex-grow: 1;
    margin: 0;
}
.embeddable .embed-name .button {
    flex-grow: 0;
    margin-left: 0.5em;
}

.embeddable .embed-link {
    display: flex;
    margin: 0 1em 0 1em;
}
.embeddable .embed-link span {
    display: inline-block;
    flex-shrink: 0;
    margin-top: .3em;
    padding: 2px 0.5em;
/*  border-bottom: 1px solid #ddd;*/
}
.embeddable .embed-link a {
    display: inline-block;
    flex-grow: 1;
    font-size: 0.9em;
    margin-top: 0.4em;
    padding: 2px 0.5em 2px 0;
/*  border-bottom: 1px solid #ddd;*/
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    margin-right: 0.5em;
}

.embeddable .embed-link a,
.embeddable .embed-link a:visited {
    color: #666;
}
.embeddable .embed-link a:hover,
.embeddable .embed-link a:active {
    color: #363433;
    text-decoration: underline;
}

.embeddable .embed-link input[type="text"] {
    position: absolute;
    right: 99999px;
    font-size: 0.8em;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 1px;
    flex-grow: 1;
}
.embeddable .embed-link .btn {
    border-bottom: none;
}
.embeddable .embed-link .btn.clear {
    opacity: 0.25;
}
.embeddable.selected .embed-link .btn.clear {
    opacity: 1;
}

.embeddable .swift-snip-snippet {
    margin-left: 0.5em;
    margin-right: 0.5em;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, .2);
}

.embeddable.selected .swift-snip-snippet * {
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
}

.embeddable.selected .swift-snip-snippet ol.code li i,
.embeddable.selected .swift-snip-snippet ol.code li b {
    opacity: 0.5;
}
.embeddable.selected .swift-snip-snippet ol.code li.selected i,
.embeddable.selected .swift-snip-snippet ol.code li.selected b {
    opacity: 1;
}

.embeddable .raw-snippet {
    display: none;
}

.swift-snip-snippet .theme-light ol.code li.selected::before {
    background-color: #ffc;
    color: #000;
}
.swift-snip-snippet .theme-dark ol.code li.selected::before {
    background-color: #660;
    color: #fff;
}
.swift-snip-snippet .theme-light.no-numbers ol.code li.selected::after {
    border-left: 5px solid #ff4;
    left: 0px !important;
}
.swift-snip-snippet .theme-dark.no-numbers ol.code li.selected::after {
    border-left: 5px solid #990;
    left: 0px !important;
}

#page-home .samples {
    display: flex;
    justify-content: center;
}
#page-home .samples .swift-snip-snippet {
    margin: 1em;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, .2);
}
@media (max-width: 768px) {
    #page-home .samples {
        flex-direction: column;
    }
}
@media (max-width: 600px) {
    #page-home .samples .swift-snip-snippet {
        margin-left: .5em;
        margin-right: .5em;
    }
}
@media (max-width: 420px) {
    #page-home .samples .swift-snip-snippet {
        margin-left: 0;
        margin-right: 0;
    }
}

#page-home .beta {
    margin-top: 2em;
}

.modal-wrapper {
    display: none;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background-color: rgba(228, 228, 228, 0.77);
    z-index: 100;
    text-align: center;
}
.modal-wrapper.visible {
    display: block;
}

.modal-wrapper.busy {
    z-index: 101;
}
.modal-content {
    width: 90%;
    padding: 1em;
    max-width: 600px;
    background-color: #fff;
    border: 2px solid #7f7b95;
    margin: 2em auto 0 auto;
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(0, 0, 0, .3);
}

#modal-edit-snippet {
}
#modal-edit-snippet .modal-content {
    max-width: 1000px;
}
#modal-edit-snippet input[type='text'] {
    width: 100%;
    font-size: 1em;
}
#modal-edit-snippet .editor {
    margin-top: 1em;
    margin-bottom: 1em;
    width: 100%;
    height: calc(100vh - 30em);
    border: 1px solid #444;
}

.button {
    display: inline-block;
    border: 1px solid #888;
    border-radius: 5px;
    padding: .2em .4em;
    text-decoration: none;
    color: #363433;
    background-color: #fff;
    font-size: initial;
    font-weight: normal;
    transition: 0.2s;
}
header .button {
    padding: .4em;
    border-color: #363433;
    transition: 0.2s;
}
.button:visited {
    color: #363433;
}
.button:hover,
.button:active {
    background-color: #cde9f4;
    border-color: #363433;
    transition: 0.2s;
}
.button .icon {
    height: 1.2em;
    margin-bottom: -.2em;
}

.button.disabled {
    opacity: 0.5;
    cursor: default;
}
.button.disabled:hover,
.button.disabled:active {
    background-color: #fff;
    border-color: #888;
}

.gist-list { }
.gist-list article {
    
}
.gist-list article h4 {
    margin-bottom: 0.5em;
}
.gist-list article .gist-detail {
    margin-top: 0;
    font-size: 0.9em;
}
.gist-access {
    display: inline-block;
    border: 1px solid #888;
    border-radius: 3px;
    color: #888;
    padding: 1px 4px;
}
.gist-access.private {
    border-color: #c57e53;
    color: #c57e53;
}

/* spinner: https://tobiasahlin.com/spinkit/ */

.spinner {
  width: 40px;
  height: 40px;

  display: none;
  position: relative;
  margin: 20px auto;
}

.double-bounce1, .double-bounce2 {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.6;
  position: absolute;
  top: 0;
  left: 0;
  
  -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
  animation: sk-bounce 2.0s infinite ease-in-out;
}
.double-bounce1 {
  background-color: #383;
}
.double-bounce2 {
  background-color: #338;
}

.double-bounce2 {
  -webkit-animation-delay: -1.0s;
  animation-delay: -1.0s;
}

@-webkit-keyframes sk-bounce {
  0%, 100% { -webkit-transform: scale(0.0) }
  50% { -webkit-transform: scale(1.0) }
}

@keyframes sk-bounce {
  0%, 100% { 
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 50% { 
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
  }
}
