/*
 * SGKMatik portal overrides.
 * New responsive and accessibility rules live here instead of growing the
 * legacy inline template. The legacy block can be migrated section-by-section.
 */

.mobile-menu {
  display: none;
}

.stat small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 0.72rem;
  line-height: 1.35;
}

:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
  }

  .top > .brand {
    min-width: 0;
  }

  .top > .brand small {
    overflow: hidden;
    max-width: 25ch;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top > .top-nav {
    display: none;
  }

  .mobile-menu {
    position: relative;
    display: block;
  }

  .mobile-menu summary {
    display: inline-flex;
    min-width: 48px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #d7e1ee;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    display: grid;
    width: min(286px, calc(100vw - 24px));
    gap: 4px;
    padding: 10px;
    border: 1px solid #d7e1ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgb(15 23 42 / 18%);
  }

  .mobile-menu nav a {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-menu nav a:hover {
    background: #eef4ff;
  }

  .mobile-menu nav .mobile-menu-primary {
    background: linear-gradient(135deg, #0057ff, #1fbf75);
    color: #fff;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
