@tailwind base;
@tailwind components;
@tailwind utilities;

*,
*::before,
*::after {
  scroll-behavior: smooth;
}

:root {
  --content-width: 1120px;
  --container-width: 810px;

  
  /* devcashflow brand colors
   *--light-primary-color: #FECE44;
   *--light-secondary-color:  #0077C8;
   *--light-tertiary-color: #89f701;
  */

  --light-primary-color: 255, 255, 255;
  --light-secondary-color: #dddddd;
  --light-tertiary-color: #272822;
  --light-text-color: #dcdcdc;
}

.img-medium {
  width: 200px; /* Or any other size */
  height: auto; /* Maintain aspect ratio */
}

@font-face {
  font-family: Lato;
  font-weight: 400;
  src: url("/fonts/Lato-Regular.ttf");
}

@font-face {
  font-family: Lato;
  font-weight: 700;
  src: url("/fonts/Lato-Bold.ttf");
}

.hero-section {
  background-image: url("/images/banner_bg2.png");
  background-size: cover;
  background-position: center;
}



.content__container {
  overflow: hidden;
  height: 40px;
}

.content__container__list {
  list-style: none;

  animation-name: change;
  animation-duration: 20s;
  animation-iteration-count: infinite;
}

.content__container__list__item {
  margin: 0;
  line-height: 40px;
}

@keyframes change {
  0%, 7.14%, 100% {transform:translate3d(0,0,0);}
  14.28% {transform:translate3d(0,-14.28%,0);}
  21.42% {transform:translate3d(0,-28.57%,0);}
  28.57% {transform:translate3d(0,-42.85%,0);}
  35.71% {transform:translate3d(0,-57.14%,0);}
  42.85% {transform:translate3d(0,-71.42%,0);}
  53.5% {transform:translate3d(0,-85.71%,0);}
  64.28% {transform:translate3d(0,-71.42%,0);}
  71.42% {transform:translate3d(0,-57.14%,0);}
  78.54% {transform:translate3d(0,-42.85%,0);}
  85.71% {transform:translate3d(0,-28.57%,0);}
  92.85% {transform:translate3d(0,-14.28%,0);}
}

html {
  color: var(--light-text-color);
  font-family: "Lato", sans-serif;
  font-size: 17.5px;
  height: 100%;
  position: relative;
}

body {
  margin-bottom: 170px;
  height: 100%;
}

b,
strong {
  font-weight: bold;
}

a {
  color: inherit;
}

/* This is set in partials/head.html and is populated via config */
/* a:hover {
  color: var(--accent-color);
  fill: var(--accent-color);
} */

.image-wrapper {
  width: 100%;
  height: auto;
}

.post.container {
  box-sizing: border-box;
  display: inline-block;
  padding-left: 20px;
}

.post-toc {
  box-sizing: border-box;
  display: inline-block;
  padding-left: 50px;
  vertical-align: top;
  /* Would be 25% had there been no margins or border box on all inline blocks */
  width: 24%;
}

#toc {
  position: fixed;
  top: 80px;
  bottom: 20px;
  overflow-x: hidden;
  overflow-y: auto;
}

#toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

#toc ul li {
  margin-top: 12px;
}

#toc ul li a.level-1 {
  padding-left: 0;
}

#toc ul li a.level-2 {
  padding-left: 10px;
}

#toc ul li a.level-3 {
  padding-left: 20px;
}

#toc ul li a.level-4 {
  padding-left: 30px;
}

#toc ul li a {
  text-decoration: none;
}

#toc ul li a.active {
  color: var(--accent-color);
}

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




/* FOOTER */
.footer {
  background-color: #01121c ;
  bottom: 0;
  color: inherit;
  left: 0;
  overflow: hidden;
  padding: 40px 0;
  position: absolute;
  text-align: center;
  width: 100%;
}

.footer span {
  display: block;
  font-size: 0.85em;
  font-weight: 300;
  padding: 1px 0;
}

/** COMMON **/
.flex-break {
  flex-basis: 100%;
  height: 0;
  display: none;
}

.visibility-hidden {
  visibility: hidden;
}

.header-shadow {
  box-shadow: rgb(220, 220, 220) 0px 1px 5px;
}

/* TAGS */
.post-tags {
  list-style-type: none;
  padding: 0;
}
.post-tags .post-tag {
  border: 1.5px solid;
  border-radius: 4px;
  box-sizing: border-box;
  color: inherit;
  display: inline-block;
  font-size: 14px;
}
.post-tags .post-tag:hover {
  background-color: var(--light-text-color);
  color: rgb(var(--light-primary-color));
}
.post-tag a {
  color: inherit;
  display: block;
  padding: 6px 12px;
  text-decoration: none;
}

/* CODE BLOCKS */
code,
pre {
  background-color: var(--light-tertiary-color);
  box-sizing: border-box;
  color: white;
}

pre {
  font-size: 0.95rem;
  overflow: auto;
  padding: 20px;
}

code {
  box-decoration-break: clone;
  word-wrap: break-word;
  font-size: 0.8em;
}

:not(pre) > code {
  background-color: var(--light-secondary-color) !important;
  color: var(--light-text-color);
  padding: 1px 4px;
}

pre code {
  font-size: 0.9em;
}

blockquote {
  border-left: 2px solid var(--light-secondary-color);
  color: grey;
  padding-left: 1rem;
  margin-left: 0;
}

hr {
  color: var(--light-secondary-color);
  margin: 50px auto;
}

table {
  border-collapse: collapse;
  margin: 30px 0;
  text-align: left;
  display: block;
  overflow-x: auto;
}

table thead {
  background-color: var(--light-secondary-color);
}

table td,
table th {
  padding: 1.4rem;
}

table td {
  border-bottom: 1px solid var(--light-secondary-color);
}

/* HOME PAGE */
.home-about, .home-content {
  text-align: center;
}

.avatar {
  width: 150px;
  /* fill: black */
  float: left;
  margin-left: 16px;
}

.home-about .avatar img {
  width: 150px;
  border-radius: 50%;
  height: auto;
  object-fit: cover;
}

/* Avatar sizes (default is M) - XS, S, M, L, XL */
.home-about .avatar img.size-xs {
  height: 7rem;
  width: 7rem;
}

.home-about .avatar img.size-s {
  height: 9rem;
  width: 9rem;
}

.home-about .avatar img.size-m {
  height: 11rem;
  width: 11rem;
}

.home-about .avatar img.size-l {
  height: 13rem;
  width: 13rem;
}

.home-about .avatar img.size-xl {
  height: 15rem;
  width: 15rem;
}

.social-icons {
  text-align: center;
}

.social-icons .social-icons-list {
  display: inline-block;
  list-style-type: none;
  padding: 0;
  text-align: center;
}

.social-icons-list .social-icon {
  box-sizing: border-box;
  display: inline-block;
  fill: var(--light-text-color);
  height: 24px;
  margin: 0 6px;
  width: 24px;
}

.social-icon a svg path {
  transition: fill 0.15s ease;
}

.home-posts {
  margin: auto;
  padding-top: 20px;
  width: 80%;
}

/* SINGLE */
.post [role="doc-subtitle"] {
  font-size: 1.1em;
  font-style: italic;
}
.post .post-date, .prev-post-date, .next-post-date {
  color: gray;
}
.post-content {
  line-height: 1.7;
  letter-spacing: 0.5px;
}

.post-content h2 {
  font-size: 1.5rem;
}

.post-content h3 {
  font-size: 1.25rem;
}

.post-content a {
  text-decoration: underline;
}

.post-content ul {
  margin: 1.5rem 0;
  padding: 0 1.5rem;
  list-style-type: none;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

.post-content li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.post-content li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-color: #7f7f7f;
  box-shadow: 0 0 0 0.15rem #fff;
}

.post-content li:after {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 1.2rem;
  width: 0.15rem;
  height: calc(100% - 1.2rem);
  background-color: #7f7f7f;
}

.post-content p {
  margin: .8rem 0;
  line-height: 1.5;
}

.post-content img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
}

/* LIST */
.list-posts .list-title {
  text-align: center;
}
.list-posts .posts-year {
  margin-top: 70px;
}
.list-posts .post-title {
  margin: 18px 0 0 15px;
}
.list-posts a {
  text-decoration: none;
}
.post-title .post-link,
.post-title .post-date {
  display: inline-block;
}
.post-title .post-link {
  /* This magic number is the largest width that keeps the post-date div from
   *  causing the line to wrap with the longest possible date string
   *  "September 22, 2022"
   */
  width: 73%;
}
.post-description {
  font-size: 8pt;
  margin: 10px 5px;
}
.tags-list .post-tags {
  margin-top: 50px;
}
.tags-list .post-tags .post-tag {
  margin: 2px 5px;
  padding: 0;
}
.tags-list .post-tags .post-tag a {
  border-radius: inherit;
  padding: 0;
}
.tags-list .post-tags .post-tag a div {
  display: inline-block;
}
.tags-list .post-tags .post-tag a .tag-name {
  padding: 5px 8px;
}
.tags-list .post-tags .post-tag a .tag-posts-count {
  background-color: var(--light-secondary-color);
  border-radius: inherit;
  color: inherit;
  opacity: 0.8;
  padding: 6px;
  position: relative;
  z-index: 0;
}
.tags-list .post-tags .post-tag:hover a .tag-posts-count {
  background-color: var(--light-text-color);
  color: rgb(var(--light-primary-color));
}

.text-404 {
  margin-top: 125px;
  text-align: center;
}

@media only screen and (max-width: 820px) {
  body {
    font-size: 0.95rem;
  }

  .flex-break {
    display: block;
  }

  .home-about .avatar img {
    border-radius: 50%;
    height: 7rem;
    width: 7rem;
  }

  .nav-links .nav-link,
  .nav-icons-divider {
    display: none;
  }

  #hamburger-menu-toggle {
    display: inline-block;
  }

  .home-about, .home-content {
    margin: 0 auto;
  }

  #toc {
    display:none;
  }

  .list-posts {
    flex: 1;
  }

  .list-posts .post-date {
    color: gray;
  }
}

@media only screen and (min-width: 820px) {
  .nav-hamburger-list {
    visibility: hidden !important;
  }
}

/*Accessibility*/
.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.prev-post {
  float: left;
  text-align: left;
}

.next-post {
  float: right;
  text-align: right;
}

.prev-post, .next-post {
  max-width: 33%;
}

.email-form {
  display: flex;
  flex-direction: column;
}

.email-form .btn {
  width: 100px;
  margin: 0 auto;
  margin-top: 10px;
}

.email-form small {
  font-size: 8pt;
}
