/* Reset
----------------------------------------------------------------------------- */

*, *:before, *:after {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, main, nav, section, summary {
  display: block;
}

/* Variables
----------------------------------------------------------------------------- */

:root {
  --theme-main: #AF5555;
  --theme-bgcolor: green;
}

/* Theme Colors
-------------------------------------------------- */

.blue {
  --theme-main: #62A5F0;
}

.green {
  --theme-main: #5D9A6D;
}

.red {
  --theme-main: #AF5555;
}


/* Layout
----------------------------------------------------------------------------- */

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  color: #444;
  background-color: #fffcf6;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  margin: 3rem 0 0 0;
}

/*
header {
  position: relative;
}


*/

footer {
  text-align: center;
  margin: 0rem 0 3rem 0;
}

/* Grid Layout
----------------------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  grid-gap: 10px;
  padding-bottom: 2rem;
}

.grid .item {
  padding: 1rem;
  width: auto;
  overflow: hidden;
  max-height: 297px;
  text-align: center;
}

/* Logo
----------------------------------------------------------------------------- */

.logo {
  margin-bottom: 1rem;
}

.logo, .logo p {
  text-align: center;
}

.logo svg {
  max-width: 60px;
  max-height: 60px;
  width: auto;
  height: auto;
}

.logo svg path { /* Fallback for CSS property selector in IE/Edge */
  fill: #AF5555; /* IE */
  fill: var(--theme-main); /* Edge */
}

.logo svg path[fill="#FFFFFF"],   .logo svg path[fill="#000000"],
.logo svg path[stroke="#FFFFFF"], .logo svg path[stroke="#000000"] {
  fill: var(--theme-main);
}

.logo.cyclecolors svg path[fill="#FFFFFF"],   .logo.cyclecolors svg path[fill="#000000"],
.logo.cyclecolors svg path[stroke="#FFFFFF"], .logo.cyclecolors svg path[stroke="#000000"] {
  animation: cyclecolors 10s linear infinite;
}

@keyframes cyclecolors {
	0%  {fill:var(--theme-main);color:var(--theme-main);box-shadow:0%;}
	16% {fill:#D08536;color:#D08536;}
	32% {fill:#CC9933;color:#CC9933;}
	48% {fill:#5D9A6D;color:#5D9A6D;}
	64% {fill:#62A5F0;color:#62A5F0;}
	96% {fill:#9854CA;color:#9854CA;}
}

.logo .cyclecolors {
    background: linear-gradient(303deg, #2d9021, #820ccb, #cb0c0c, #0c84cb, #cb7b0c, #cb0cad);
    background-size: 1200% 1200%;
    -webkit-animation: AnimationName 30s ease infinite;
    -moz-animation: AnimationName 30s ease infinite;
    -o-animation: AnimationName 30s ease infinite;
    animation: AnimationName 30s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:92% 0%}
    50%{background-position:9% 100%}
    100%{background-position:92% 0%}
}
@-moz-keyframes AnimationName {
    0%{background-position:92% 0%}
    50%{background-position:9% 100%}
    100%{background-position:92% 0%}
}
@-o-keyframes AnimationName {
    0%{background-position:92% 0%}
    50%{background-position:9% 100%}
    100%{background-position:92% 0%}
}
@keyframes AnimationName {
    0%{background-position:92% 0%}
    50%{background-position:9% 100%}
    100%{background-position:92% 0%}
}

/* Text Elements
----------------------------------------------------------------------------- */

h1, h2 {
  font-weight: normal;
  margin: 1rem 0 .5rem 0;
}

h1 { font-size: 2rem; margin-top: 1.5rem; }
h1 a { color: #444; }
h2 { font-size: 1.2rem; }

p {
  color: #666;
  line-height: 1.4rem;
}

.grid p {
  font-size: .9rem;
}

ul {
  margin: 0.5rem 0;
  line-height: 1.5rem;
  padding-left: 20px;
}

ul.dashed {
  list-style: none;
  padding-left: 0;
}
ul.dashed > li:before {
  content: "-";
  padding-right: 10px;
}

img {
  height: 4rem;
  margin: 0 auto;
}

a {
	text-decoration: none;
	color: var(--theme-main);
}

/* Form Elements
----------------------------------------------------------------------------- */

form {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
  padding: 1rem 0;
}

form div {
  position: relative;
}

#message {
  height: 15px;
}
#message.success {
  color: green;
}
#message.failure {
  color: red;
}

/* Inputs
-------------------------------------------------- */

input, select {
  width: 100%;
  height: 3rem;
  padding: 16px 8px;
  padding: 12px 8px 0px;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  color: inherit;
  outline: 0;
  border: 1px solid #d9d9d9;
}

/* Make label and outline green when valid */
input:required:valid,
input:optional:valid.clicked,
select.clicked:valid {
  border-color: green;
}
input:required:valid + label,
input:optional:valid.clicked + label,
select.clicked:valid + label {
  color: green;
}

/* Transition border color only after being clicked once. This prevents a quick
  transition from black immediately upon load in some browsers */
input.clicked, input.hasbeenclicked {
  transition: border-color 0.2s ease-in-out;
}

/* Attached input and button
-------------------------------------------------- */

.combined {
  display: flex;
  flex-direction: row;
}

.combined button {
  border-radius: 0px 4px 4px 0px;
}

form input.clicked + label, form select.clicked + label {
  font-weight: 400;
  font-size: 12px;
  transform: translate3d(0, -10px, 0);
}
form input.clicked,
form select.clicked {
  transition: border 0.2s ease-in-out;
}

form select:not(.hasbeenclicked) {
  color: white;
}
form select:focus {
  color: initial;
}
input, select {
  color: inherit;
  background-color: rgba(var(--theme-bgcolor), 1);
}

/* Labels
-------------------------------------------------- */

label {
    display: block;
    position: relative;
    height: 1.5rem;
    line-height: 1.5rem;
}

label input {
    float: left;
    width: initial;
    height: 100%;
    margin-right: 10px;
}

form input:valid,
form input:focus,
form select:focus {
  padding: 12px 8px 0px;
}

form input + label,
form input:optional + label {
  color: #909090;
}

form input ~ label,
form select ~ label {
  line-height: initial;
  pointer-events: none;
  position: absolute;
  top: 15px;
  left: 8px;
  color: #909090;
  transform: translate3d(0, 0, 0);
  transition: transform 0.2s ease-in-out, font-size 0.2s ease-in-out;
}

form input:required:valid + label, form input:focus + label,
form input:optional.clicked + label, form select:focus + label {
  font-weight: 400;
  font-size: 12px;
  transform: translate3d(0, -10px, 0);
  transition: transform 0.2s ease-in-out, font-size 0.2s ease-in-out;
}

form span {
  display: block;
  font-size: .8rem;
  line-height: initial;
  text-align: center;
  margin-top: 10px;
}

/* Buttons
----------------------------------------------------------------------------- */

button {
  background-color: initial;
  outline: none;
  font-weight: 300;
}

button {
  min-width: 150px;
  height: 3rem;
  background-color: var(--theme-main);
  -webkit-appearance: none;
  color: #FFF;
  border: 0 none;
  cursor: pointer;
  -webkit-border-radius: 5px;
  border-radius: 5px;
  line-height: 50px;
  width: initial;
  -webkit-box-shadow: none;
  box-shadow: none;
  outline: 0;
  letter-spacing: .4px;
  transition: opacity .2s, background-color 0.2s, color 0.2s;
  font-size: inherit;
  text-align: center;
  padding: initial !important;
  margin: 0 auto;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

button:hover {
  color: white;
  opacity: 0.8;
  transition: opacity .2s;
}
button:active {
  opacity: 0.6;
  transition: opacity .2s;
}