:root {
  --border-color: #dce2ee;
  --border-color-pink: #e9b0da;
  --marine: #1a6f7a;
  --dark: #163341;
  --light-blue: #d5eaf6;
  --light-gray: #f9fafa;
  --medium: #305c72;
  --light: #D5DFE8;
  --white: #fff;
  --link-color: #3574b4
}

*, *::before, *::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html,body {
  font-weight: 100;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  color: var(--dark);
  background-color: var(--light-gray);
}

.title {
  font-family: 'Fredoka One', cursive;
}
.title a {
  color: var(--dark);
  text-decoration: none;
}

button {
  border-radius: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

button > * {
  pointer-events: none;
}



/* HEADER
------------------------------------------------ */
header {
  max-width: 52rem;
  padding: 3rem 0 1rem;
  margin: 0 auto;
  text-align: center;
}
header h1 {
  font-size: 3rem;
  margin-top: 1rem;
  text-transform: uppercase;
}
header svg {
  width: 5rem;
}



/* LOADING SCREEN
------------------------------------------------ */
.loader {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: var(--dark);
  z-index: 100;
  font-weight: bold;
  color: #fff;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* LOGIN FORM
------------------------------------------------ */
.login-form {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  padding: 2rem;
  min-height: 5rem;
  background: var(--dark);
  color: #fff;
  z-index: 10;
}

.login-form-content {
  margin: 8rem auto;
  /* max-width: 20rem; */
  border: 1px solid rgb(255 255 255 / .2);
  box-shadow: 0px 2px 24px rgb(0 0 0 / .35);
  padding: 3rem;
  max-width: 30rem;
}
.login-form label,
.login-form input {
  display: block;
  width: 100%;
}
.login-form input {
  padding: .5rem;
}
.login-form-btn {
  margin-top: 1rem;
  padding: .5rem 1rem;
  background: var(--light);
}

.login-data {
  background-color: var(--light-blue);
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  animation: fadeout 0.5s 1;
  -webkit-animation: fadeout 0.5s 1;
  animation-fill-mode: forwards;

  animation-delay: 5s;
  -webkit-animation-delay: 5s; /* Safari and Chrome */
  -webkit-animation-fill-mode: forwards;
}

.close-login-btn {
  color: var(--white);
  position: absolute;
  right: 5rem;
  top: 5rem;
  font-size: 1.6rem;
}



/* MAIN CONTAINER/ELEMENT
------------------------------------------------ */
main {
  /* background-color: var(--white); */
  margin: 2rem auto;
  max-width: 48rem;

  display: grid;
  grid-template-columns: repeat(8, 1fr);
  row-gap: 2rem;
}


@media (min-width: 900px)  {
  .form-content {
    margin-left: 0;
    margin-right: 0;
  }
}

.rainbow {
  box-shadow: 0px 2px 75px -20px rgb(254 151 55 / 50%);
  border: 5px solid transparent;
  border-image: linear-gradient(to bottom right, #b827fc 0%, #2c90fc 25%, #b8fd33 50%, #fec837 75%, #fd1892 100%);
  border-image-slice: 1;
}





.editor-buttons {
 display: flex;
 padding: 1rem 1rem .5rem 1rem;
 border: 1px solid var(--light);
 border-bottom: none;
 border-top-left-radius: 4px;
 border-top-right-radius: 4px;
}

.editor-buttons * + * {
  margin: 0 .5rem;
}

button svg {
  color: var(--dark);
  min-height: 1rem;
  min-width: 1rem;
}







.post-btn {
  border: none;
  background-color: var(--dark);
  color: #fff;
  display: block;
  padding: 1rem;
  position: relative;
  margin-left: auto;
  margin-right: 1rem;
  margin-top: -4rem;
  transition: background-color ease-in-out 300ms;
  width: 5rem;

}


/* POST EDITOR/FORM
------------------------------------------------ */
.editor-container {
  background-color: var(--white);
  box-shadow: 0px 2px 75px -20px rgb(123 123 123 / 30%);

  display: flex;
  flex-direction: column;
  grid-column-start: 1;
  grid-column-end: 9;

  margin-bottom: 4rem;
  padding: 2rem 2rem 4rem;
  position: relative;
}


.ql-editor {
  background: var(--light-gray);
  color: var(--dark);
  min-height: 15rem;
  font-size: 1rem;
}

.ql-container {
  font-family: 'Nunito', sans-serif;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border: 1px solid var(--light);
}
.ql-toolbar.ql-snow {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}
.ql-container.ql-snow {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.post pre.ql-syntax {
    background-color: var(--dark);
    border-radius: 4px;
    color: var(--light);
    overflow: visible;
    padding: 1rem;
}

.post pre {
    white-space: pre-wrap;
    margin-bottom: 5px;
    margin-top: 5px;
    padding: 5px 10px;
}

.post .ql-align-left {
  text-align: left;
}
.post .ql-align-center {
  text-align: center;
}
.post .ql-align-right {
  text-align: right;
}
.post blockquote {
  font-family: serif;
  font-style: italic;
  border-left: 4px solid var(--light);
  margin-bottom: .5rem;
  padding: 1rem;
}

.post-btn:focus {
  box-shadow: 0px 10px 15px -4px rgb(41 130 177 / 75%);
}
.post-btn:active,
.post-btn:hover {
  background-color: var(--marine);
}



.empty {
  grid-column-start: 3;
  grid-column-end: 7;
  text-align: center;
}

.empty h2 {
  font-size: 4rem;
  margin-bottom: 1rem;
  margin-top: 3rem;
}


/* POST
------------------------------------------------ */
.post {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  min-height: 100%;
  padding: 1.5rem;
  position: relative;

  margin-left: 1rem;
  margin-right: 1rem;
  grid-column-start: 1;
  grid-column-end: 9;

  display: flex;
  flex-direction: column;


  animation: fadein 2s 1;
  -webkit-animation: fadein 2s 1;
  animation-fill-mode: forwards;
}

@media (min-width: 900px)  {
  .post {
    margin-left: 0;
    margin-right: 0;
    grid-column-start: 2;
    grid-column-end: 8;
    padding: 2rem;
  }
}

.post-user {
  /* color: #c580b3; */
  display: flex;
  align-items: center;
  font-size: .65rem;
  margin-bottom: 2rem;
}
.post-user h3 {
  letter-spacing: 2px;
  text-transform: uppercase;
}

.post-user p {
  font-size: .75rem;
  margin: 0;
}
.post-user-link {
  /* color: #c580b3 !important; */
  text-decoration: none;
  opacity: .8;
}

.post-user img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    padding: 0.25rem;
    border: 1px solid #ddd;
}
.post-user * + * {
    margin: 0 0.5rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  /* padding: 2rem; */

  font-size: .6rem;
  text-transform: uppercase;
  opacity: .7;
}
.post-date {
  color: var(--dark);
  font-weight: bold;
}

.post a:not(.post-link) {
  color: var(--link-color);
}

.post-link {
  align-items: center;
  color: var(--dark);
  display: flex;
  font-weight: bold;
  position: relative;
  text-decoration: none;
}

.post-link::before{
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--dark);
  transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (hover: hover) and (pointer: fine) {
  .post-link:hover::before{
    left: 0;
    right: auto;
    width: 100%;
  }
}

.post-content lite-youtube,
.post-content iframe,
.post-content img {
  border-radius: 4px;
}

.delete-btn {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: none;
  padding: 1rem;
}

img {
  height: auto;
  width: 100%;
}

iframe {
  border: none;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

lite-youtube {
  max-width: 100%;
}

.load-next {
  grid-column-start: 2;
  grid-column-end: 8;
}


.loginout-btn {
  --bg-color: var(--dark);
  background-color: var(--bg-color);
  border: none;
  box-shadow: 0px 10px 15px -4px rgb(41 130 177 / 75%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  bottom: 2rem;
  padding: .75rem 1.25rem;
  right: 2rem;
  transition: all ease-in-out 300ms;
  z-index: 5;
}
.loginout-btn:hover {
  box-shadow: 0px 37px 20px -15px rgb(41 130 177 / 20%);
  transform: translate(0px, -10px);
}

.loginout-btn svg {
  color: var(--white);
}


b {
  font-weight: bold;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


@keyframes fadein {
    from {opacity :0;}
    to {opacity :1;}
}

@-webkit-keyframes fadein {
    from {opacity :0;}
    to {opacity :1;}
}
@keyframes fadeout {
    from {opacity :1;}
    to {opacity :0;}
}

@-webkit-keyframes fadeout {
    from {opacity :1;}
    to {opacity :0;}
}


@keyframes shaded {
    0% {
      box-shadow: 0px 2px 75px -20px rgb(254 151 55 / 50%);
    }
    10% {
      box-shadow: 0px 2px 75px -20px rgb(254 55 55 / 50%);
    }
    20% {
      box-shadow: 0px 2px 75px -20px rgb(254 204 55 / 50%);
    }
    30% {
      box-shadow: 0px 2px 75px -20px rgb(119 254 55 / 50%);
    }
    40% {
      box-shadow: 0px 2px 75px -20px rgb(55 232 254 / 50%);
    }
    50% {
      box-shadow: 0px 2px 75px -20px rgb(55 120 254 / 50%);
    }
    70% {
      box-shadow: 0px 2px 75px -20px rgb(162 55 254 / 50%);
    }
    100% {
      box-shadow: 0px 2px 75px -20px rgb(254 55 180 / 50%);
    }
}





