/* Base styles */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.body-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.main-wrapper {
  flex: 1;
}

a {
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition-property: color, text-decoration-color;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration-color: var(--miwi-link-color-underline);
  &:hover {
    color: var(--bs-link-color);
    text-decoration-color: var(--bs-link-color);
  }
}

/* Header */

.miwi-header-container {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
[data-bs-theme="light"] .miwi-header-container {
  background-color: var(--miwi-header-bg-light);
  border-bottom: 1px solid var(--miwi-header-border-light);
  box-shadow: 0 1px 6px hsla(0, 0%, 0%, 0.3);
}
[data-bs-theme="dark"] .miwi-header-container {
  background-color: var(--miwi-header-bg-dark);
  border-bottom: 1px solid var(--miwi-header-border-dark);
  box-shadow: 0 1px 8px hsla(0, 0%, 0%, 0.2);
}

.miwi-header {
  font-size: 0.875rem;
  transition: padding 0.3s ease;
}
.miwi-header-shrunk {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.miwi-header-logo > svg {
  width: 144px;
  height: 21px;
}
@media screen and (min-width: 992px) {
  .miwi-header-logo > svg {
    width: 180px;
    height: 27px;
    transition: width 0.3s ease, height 0.3s ease;
  }
  .miwi-header-shrunk .miwi-header-logo > svg {
    width: 144px;
    height: 21px;
  }
}

/* Footer */

.miwi-footer {
  background-color: var(--miwi-color-header-bg);
}
[data-bs-theme="light"] .miwi-footer {
  background-color: var(--miwi-footer-bg-light);
}
[data-bs-theme="dark"] .miwi-footer {
  background-color: var(--miwi-footer-bg-dark);
}

.miwi-footer-logo > svg {
  width: 180px;
  height: 27px;
}

/* Long content */

.miwi-article-content {
  font-size: 1rem;
  line-height: 1.75;
  max-width: 70ch;
  margin: 0 auto;

  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ol,
  ul,
  figure,
  blockquote {
    margin-bottom: 1.5rem;
  }

  h2,
  h3 {
    margin-top: 3rem;
  }

  li {
    margin-bottom: 1rem;
    &:last-child {
      margin-bottom: 0;
    }
  }

  blockquote {
    padding-left: 1.25rem;
    border-left: 0.75rem solid var(--miwi-color-accent-2);
    cite {
      font-size: 0.875rem;
    }
  }

  .img-wrapper {
    figure {
      padding: 1.5rem;
      background: white;
      border-radius: 0.5rem;
    }
  }
}
@media screen and (min-width: 992px) {
  .miwi-article-content {
    font-size: 1.125rem;
  }
}

/* WP Blocks */

.miwi-article-content .wp-block-rank-math-toc-block {
  margin-top: 3rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }
  ul,
  ol,
  li {
    margin-top: 0;
    margin-bottom: 0;
  }
  ul,
  ol {
    padding-left: 1.5rem;
  }
  li {
    display: list-item;
    margin-bottom: 0.5rem;
    &::before {
      content: none;
    }
  }
  ol {
    list-style-type: circle;
  }
  ol ol {
    list-style-type: none;
  }
}
[data-bs-theme="light"] .wp-block-rank-math-toc-block {
  background: var(--bs-gray-200);
}
[data-bs-theme="dark"] .wp-block-rank-math-toc-block {
  background: var(--miwi-footer-bg-dark);
}

.miwi-article-content .wp-block-kevinbatdorf-code-block-pro {
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Post list */

.miwi-post-list-item {
  border: 0;
  background-color: hsla(0, 0%, 60%, 0.08);
}

/* Author box */

.miwi-author-box {
  border: 0;
  background-color: hsla(0, 0%, 60%, 0.08);
  .author-name {
    font-size: 1.25rem;
  }
}

/* Reusable components */

.miwi-btn-primary {
  --bs-btn-color: #000;
  --bs-btn-bg: var(--miwi-color-accent-1);
  --bs-btn-border-color: var(--miwi-color-accent-1);
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: var(--miwi-color-accent-1-darker);
  --bs-btn-hover-border-color: var(--miwi-color-accent-1-darker);
  --bs-btn-focus-shadow-rgb: 49, 132, 253;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: var(--miwi-color-accent-1-darkest);
  --bs-btn-active-border-color: var(--miwi-color-accent-1-darkest);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #000;
  --bs-btn-disabled-bg: var(--miwi-color-accent-1);
  --bs-btn-disabled-border-color: var(--miwi-color-accent-1);
}

.miwi-btn-minimal-light {
  --bs-btn-color: #fff;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--miwi-color-accent-1);
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 49, 132, 253;
  --bs-btn-active-color: var(--miwi-color-accent-1-darker);
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: transparent;
  --bs-btn-active-shadow: none;
  --bs-btn-disabled-color: var(--bs-btn-disabled-color);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}

.miwi-nav-light {
  --bs-nav-link-color: #fff;
  --bs-nav-link-hover-color: var(--miwi-color-accent-1);
}

/* Utility classes */

.text-small {
  font-size: 0.875rem;
}

/* Plugins */

.rp4wp-related-posts {
  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }
}
