/*
 * Talententest.com — mobiele laag voor de gegenereerde VO/MBO-testpagina's.
 * Wordt via strip_auth_qr.py geïnjecteerd, zodat een nieuwe ClassPilot-build
 * deze verbeteringen niet overschrijft.
 */

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

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  min-width: 0;
  max-width: 100%;
}

img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

.tt-site-header__inner,
main > section > div,
#questionnaire-section,
#question-card,
#result-section,
#results-section,
#result,
#results {
  min-width: 0;
}

.tt-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
  backdrop-filter: blur(14px);
}

.tt-site-header__inner {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 64rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.tt-site-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #2c2c2c;
  text-decoration: none;
}

.tt-site-brand__wordmark {
  font-weight: 800;
}

.tt-site-nav {
  align-items: center;
}

.tt-site-nav a {
  text-decoration: none;
}

.tt-site-nav-toggle {
  display: none;
}

.tt-site-nav a:focus-visible,
.tt-site-nav-toggle:focus-visible,
.hs-btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--hs-blue-primary, #2563eb) 32%, white);
  outline-offset: 3px;
}

table {
  max-width: 100%;
}

.grid-2-col {
  min-width: 0;
}

@media (max-width: 767px) {
  .tt-site-header__inner {
    min-height: 64px;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
  }

  .tt-site-brand {
    min-width: 0;
  }

  .tt-site-brand img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .tt-site-brand__wordmark {
    overflow: hidden;
    font-size: 1.08rem !important;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .tt-site-nav-toggle {
    display: inline-flex;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin-left: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    color: #334155;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .08);
  }

  .tt-site-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
  }

  .tt-site-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .tt-site-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .tt-site-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .tt-site-nav {
    display: none !important;
    position: absolute;
    z-index: 70;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch !important;
    gap: 4px !important;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .16);
    backdrop-filter: blur(18px);
  }

  .tt-site-nav.is-open {
    display: flex !important;
  }

  .tt-site-nav a {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    color: #475569;
  }

  .tt-site-nav a:hover {
    background: #f8fafc;
  }

  .tt-site-nav a:last-child {
    justify-content: space-between;
    margin-top: 4px;
    background: var(--hs-blue-light, #eff6ff);
    color: var(--hs-blue-primary, #2563eb);
  }

  body.tt-menu-open {
    overflow: hidden;
  }

  main {
    min-width: 0;
  }

  main > section {
    max-width: 100%;
  }

  main > section[class*="px-6"],
  main > section[class*="px-8"],
  main > section[class*="px-12"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  main > section[class*="py-20"],
  main > section[class*="py-24"],
  main > section[class*="py-32"] {
    padding-top: 3.25rem !important;
    padding-bottom: 3.25rem !important;
  }

  #questionnaire-section {
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
  }

  #question-card {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 1.25rem !important;
    border-radius: 1.75rem !important;
  }

  #question-card button,
  #question-card [role="button"] {
    min-height: 48px;
  }

  .hs-btn {
    min-height: 48px;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  #classpilot-upsell {
    width: calc(100% - 2rem);
    margin-left: auto;
    margin-right: auto;
    padding: 1.1rem !important;
    border-radius: 1.25rem !important;
  }

  #classpilot-upsell a {
    width: 100%;
    min-height: 46px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .grid-2-col {
    grid-template-columns: 1fr !important;
  }

  [class*="rounded-[4rem]"],
  [class*="rounded-[3.5rem]"],
  [class*="rounded-[3rem]"],
  [class*="rounded-[2.5rem]"] {
    border-radius: 1.75rem !important;
  }

  [class*="p-12"]:not(.print-page),
  [class*="p-16"]:not(.print-page),
  [class*="p-20"]:not(.print-page) {
    padding: 1.5rem !important;
  }

  [class*="fixed"][class*="inset-0"] {
    padding: 12px;
  }

  [class*="fixed"][class*="inset-0"] > div {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .overflow-x-auto,
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 360px) {
  .tt-site-header__inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .tt-site-brand__wordmark {
    font-size: .98rem !important;
  }

  #questionnaire-section {
    width: calc(100vw - 1.5rem) !important;
    max-width: calc(100vw - 1.5rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-site-nav-toggle span {
    transition: none;
  }
}

@media print {
  .tt-site-nav-toggle {
    display: none !important;
  }
}
