/* Responsive image styling */
.responsive-image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

@media screen and (min-width: 960px) {
  .responsive-image {
    width: 75%;
  }
}

@media screen and (max-width: 959px) {
  .responsive-image {
    width: 100%;
  }
}

/* Banner for announcements and warnings */
.md-banner {
  color: var(--md-footer-fg-color--lighter);

  /* Don't wrap name of blog article */
  strong {
    color: var(--md-footer-fg-color);
    white-space: nowrap;
  }

  a {
    color: var(--md-footer-fg-color);
    &:focus,
    &:hover {
      color: currentcolor;

      .twemoji {
        background-color: var(--md-footer-fg-color);
        box-shadow: none;
      }
    }
  }

  .twemoji {
    display: inline-block;
    width: px2rem(24px);
    height: px2rem(24px);
    padding: px2rem(5px);
    vertical-align: bottom;
    border-radius: 100%;
    box-shadow: 0 0 0 px2rem(1px) currentcolor inset;
    transition: all 250ms;

    svg {
      display: block;
      max-height: initial;
    }
  }
}

/* Custom button styling */
.md-header__button--custom {
  padding: 0.1rem;
  margin: 0.2rem 0rem 0.2rem 0;
}

.md-header__button--custom > .md-custom-button {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  background: linear-gradient(135deg, #b5e7f1 0%, #8ad5e4 100%);
  color: #2c3e50;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 4px 12px rgba(181, 231, 241, 0.4),
    0 2px 6px rgba(181, 231, 241, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

@media screen and (max-width: 600px) {
  .md-header__button--custom > .md-custom-button {
    padding: 0.5rem 0.8rem;
  }
}

@media screen and (max-width: 400px) {
  .md-header__button--custom {
    margin: 0;
  }

  .md-header__button--custom > .md-custom-button {
    padding: 0.5rem 0.8rem;
    font-size: 0.6rem;
  }

  .md-header__button--custom > .md-custom-button.md-icon svg {
    margin-right: 0.1rem;
    width: 0.9rem;
    height: 0.9rem;
  }
}

.md-header__button--custom > .md-custom-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #cef1f7 0%, #b5e7f1 100%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 8px 16px rgba(181, 231, 241, 0.5),
    0 4px 8px rgba(181, 231, 241, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.md-header__button--custom > .md-custom-button:active {
  transform: translateY(0);
  background: linear-gradient(135deg, #b5e7f1 0%, #a2e0ec 100%);
  box-shadow:
    0 4px 8px rgba(181, 231, 241, 0.4),
    0 2px 4px rgba(181, 231, 241, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Framed GIF styling */
.framed-gif {
  position: relative;
  display: inline-block;
  padding: 0.75rem;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 0.75rem;
  box-shadow:
    0 8px 24px -12px rgba(0, 0, 0, 0.15),
    0 2px 6px -2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.framed-gif:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px -12px rgba(0, 0, 0, 0.25),
    0 4px 8px -2px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .framed-gif {
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow:
      0 8px 24px -12px rgba(0, 0, 0, 0.3),
      0 2px 6px -2px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .framed-gif:hover {
    box-shadow:
      0 12px 28px -12px rgba(0, 0, 0, 0.4),
      0 4px 8px -2px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}
