/* Help page: manual actions and tachograph error dialog refresh. */
body.help-page .help-manual-card::after {
  border-radius: inherit;
}

body.help-page .help-manual-card__actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.help-page .help-manual-card__actions > :where(a, button) {
  min-width: 0;
  min-height: 46px;
  border-radius: 8px;
  white-space: normal;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.29;
  transition: border-color 180ms ease, background-position 240ms ease, color 180ms ease, transform 120ms ease;
}

body.help-page .help-manual-card__actions > a {
  border-color: #002f6c;
  background-color: #002f6c;
  background-image: linear-gradient(90deg, #ff0000 50%, transparent 50%);
  background-position: 100% 0;
  background-size: 200% 100%;
  color: #fff;
}

body.help-page .help-manual-card__actions > a::before {
  content: none;
}

body.help-page .help-manual-card__actions > a:hover,
body.help-page .help-manual-card__actions > a:focus-visible {
  border-color: #ff0000;
  background-position: 0 0;
  color: #fff;
}

body.help-page .help-manual-card__actions > button {
  z-index: auto;
  margin-left: 0;
  border-color: #002f6c;
  background: #fff;
  color: #002f6c;
}

body.help-page .help-manual-card__actions > button:hover,
body.help-page .help-manual-card__actions > button:focus-visible {
  border-color: #ff0000;
  background: #fff;
  color: #ff0000;
}

body.help-page .help-manual-card__actions > :where(a, button):active {
  transform: translateY(1px);
}

body.help-page .help-cta__phone {
  min-height: 54px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: #fff;
  background-image: none;
  color: #002f6c;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease;
}

body.help-page .help-cta__phone:hover,
body.help-page .help-cta__phone:focus-visible {
  border-color: #ff0000;
  background: #fff;
  background-image: none;
  color: #ff0000;
}

body.help-page .help-manual-card__actions > :where(a, button):focus-visible,
body.help-page .help-errors-dialog :where(button, a, input):focus-visible {
  outline: 3px solid rgba(10, 91, 216, 0.32);
  outline-offset: 2px;
}

body.help-page #fines-memo {
  border-color: var(--help-navy);
  background-color: var(--help-navy);
  background-image: linear-gradient(145deg, #002e6b 0%, #0b5fa8 100%);
}

body.help-page #fines-memo .help-manual-card__media,
body.help-page #fines-memo .help-manual-card__content {
  background-color: transparent;
}

body.help-page #fines-memo .help-manual-card__media {
  border-bottom-color: transparent;
}

body.help-page #fines-memo :is(p, h3) {
  color: #fff;
}

body.help-page #fines-memo .help-manual-card__actions > a {
  border-color: #fff;
  background-color: #fff;
  color: #002f6c;
  transition:
    background-position 0.48s var(--ease-out, ease),
    color 0.28s ease,
    border-color 0.28s ease,
    translate 0.1s ease,
    scale 0.1s ease;
}

body.help-page #fines-memo .help-manual-card__actions > a:hover,
body.help-page #fines-memo .help-manual-card__actions > a:focus-visible {
  border-color: #ff0000;
  background-position: 0 0;
  color: #fff;
}

body.help-page #fines-memo .help-manual-card__actions > a:focus-visible {
  transition: none;
}

body.help-page .help-errors-modal {
  padding: 24px;
  background: rgba(15, 23, 42, 0.54);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 160ms ease, visibility 0s 160ms;
}

body.help-page .help-errors-modal.is-open {
  transition: opacity 160ms ease, visibility 0s;
}

body.help-page .help-errors-dialog {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, Inter, "Helvetica Neue", Arial, sans-serif;
  width: min(960px, 100%);
  height: min(640px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
  transform: translateY(8px) scale(0.99);
  transition: transform 160ms ease-out;
}

body.help-page .help-errors-dialog :is(h2, h3, p, a, button, input, span, label, strong) {
  font-family: inherit !important;
}

body.help-page .help-manual-card__actions > :where(a, button):focus-visible {
  transition: none;
}

body.help-page .help-errors-modal.is-open .help-errors-dialog {
  transform: none;
}

body.help-page .help-errors-dialog__close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #526783;
  font-size: 26px;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

body.help-page .help-errors-dialog__close:hover,
body.help-page .help-errors-dialog__close:focus-visible {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #172b4d;
}

body.help-page .help-errors-dialog__body {
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(270px, 304px) minmax(0, 1fr);
  border-top: 1px solid #e2e8f0;
}

body.help-page .help-errors-directory {
  grid-template-rows: auto auto minmax(0, 1fr);
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.help-page .help-errors-directory__head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}

body.help-page .help-errors-directory__head > p {
  margin: 0 0 4px;
  color: #526783;
  font-size: 10px;
  letter-spacing: 0.07em;
}

body.help-page .help-errors-directory__head h3 {
  font-family: var(--service-font-display, inherit);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 22px;
}

body.help-page .help-errors-directory__head > span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 17px;
}

body.help-page .help-errors-modal [hidden] {
  display: none !important;
}

body.help-page .help-errors-search {
  display: block;
  margin-top: 12px;
  color: #526783;
  font-size: 12px;
  font-weight: 600;
}

body.help-page .help-errors-search__control {
  position: relative;
  display: block;
  margin-top: 6px;
}

body.help-page .help-errors-search__clear {
  position: absolute;
  top: 50%;
  right: 1px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #526783;
  cursor: pointer;
  transform: translateY(-50%);
}

body.help-page .help-errors-search__clear::before,
body.help-page .help-errors-search__clear::after {
  position: absolute;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

body.help-page .help-errors-search__clear::after {
  transform: rotate(-45deg);
}

body.help-page .help-errors-search__control::before {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23526783' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
  content: "";
  pointer-events: none;
  transform: translateY(-50%);
}

body.help-page [data-help-errors-search] {
  width: 100%;
  min-height: 44px;
  padding: 8px 44px 8px 35px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #172b4d;
  font: inherit;
  font-size: 16px;
  line-height: 18px;
}

body.help-page [data-help-errors-search]::placeholder {
  color: #8492a6;
}

body.help-page [data-help-errors-search]::-webkit-search-cancel-button,
body.help-page [data-help-errors-search]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

body.help-page [data-help-errors-search]:focus {
  border-color: #315d9b;
  outline: 3px solid rgba(49, 93, 155, 0.16);
}

body.help-page .help-errors-list {
  grid-row: 3;
  gap: 4px;
  padding: 10px 10px 14px;
}

body.help-page .help-errors-list__item {
  min-height: 44px;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 7px 9px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

body.help-page .help-errors-list__item::before {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #e9eef5;
  color: #315d9b;
  content: "!";
  font-size: 12px;
}

body.help-page .help-errors-list__item:hover,
body.help-page .help-errors-list__item:focus-visible {
  border-color: #e2e8f0;
  background: #fff;
}

body.help-page .help-errors-list__item.is-active,
body.help-page .help-errors-list__item[aria-pressed="true"] {
  border-color: #dce5f1;
  background: #eaf0f8;
  color: #172b4d;
}

body.help-page .help-errors-list__item.is-active::before,
body.help-page .help-errors-list__item[aria-pressed="true"]::before {
  background: #d8e3f2;
  color: #172b4d;
}

body.help-page .help-errors-dialog__result {
  position: relative;
  padding: 28px 30px;
  background: #fff;
}

body.help-page [data-help-errors-empty] {
  grid-row: 2;
  margin: 0;
  padding: 14px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #6b7c93;
  font-size: 13px;
  line-height: 19px;
}

body.help-page .help-errors-search__clear:hover,
body.help-page .help-errors-search__clear:focus-visible {
  background: #f1f5f9;
  color: #172b4d;
}

body.help-page .help-errors-search__clear:active {
  background: #e8eef5;
}

body.help-page .help-errors-search__clear > * {
  font-size: 0;
  line-height: 0;
}

body.help-page .help-errors-search__clear:focus-visible {
  outline: 2px solid #315d9b;
  outline-offset: 1px;
}

body.help-page .help-errors-search__clear[hidden] {
  display: none !important;
}

body.help-page .help-errors-search__control:has([data-help-errors-search]:focus-visible) {
  border-radius: 7px;
}

body.help-page .help-errors-search__control:has([data-help-errors-search]:focus-visible) .help-errors-search__clear {
  color: #315d9b;
}

body.help-page .help-errors-search__control:has([data-help-errors-search]:not(:placeholder-shown)) .help-errors-search__clear {
  visibility: visible;
}

body.help-page .help-errors-search__control:not(:has([data-help-errors-search]:not(:placeholder-shown))) .help-errors-search__clear {
  visibility: hidden;
}

body.help-page .help-errors-search__control:has([data-help-errors-search]:not(:placeholder-shown)) .help-errors-search__clear:focus-visible {
  visibility: visible;
}

body.help-page .help-errors-dialog__status {
  position: relative;
  max-width: 360px;
  align-self: center;
  margin-inline: auto;
  padding: 54px 12px 0;
  border: 0;
  color: #526783;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

body.help-page .help-errors-dialog__status::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #f3f6fa center / 20px 20px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23315d9b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5h16v13H4z'/%3E%3Cpath d='M8 9h8M8 12h8M8 15h5'/%3E%3C/svg%3E");
  content: "";
  transform: translateX(-50%);
}

body.help-page .help-errors-answer,
body.help-page .help-errors-fallback {
  align-self: flex-start;
}

body.help-page .help-errors-answer__label,
body.help-page .help-errors-fallback__label {
  margin-bottom: 6px;
  color: #526783;
  font-size: 10px;
  letter-spacing: 0.07em;
}

body.help-page .help-errors-answer h3,
body.help-page .help-errors-fallback h3 {
  padding-right: 44px;
  margin-bottom: 14px;
  font-family: var(--service-font-display, inherit);
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

body.help-page .help-errors-answer__meaning,
body.help-page .help-errors-fallback > p:not(.help-errors-fallback__label) {
  color: #40536d;
  font-size: 14px;
  line-height: 21px;
}

body.help-page .help-errors-answer__label--steps {
  margin-top: 22px;
}

body.help-page .help-errors-answer__steps ol {
  gap: 10px;
}

body.help-page .help-errors-answer__steps li {
  min-height: 28px;
  padding: 2px 0 0 38px;
  color: #40536d;
  font-size: 14px;
  line-height: 21px;
}

body.help-page .help-errors-answer__steps li::before {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #eaf0f8;
  color: #315d9b;
  font-size: 10px;
}

body.help-page .help-errors-fallback__actions a {
  min-height: 42px;
  margin-top: 16px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 13px;
}

body.help-page .help-errors-answer__source {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #002f6c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: rgba(0, 47, 108, 0.35);
  text-underline-offset: 4px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

body.help-page .help-errors-answer__source:hover,
body.help-page .help-errors-answer__source:focus-visible {
  border: 0;
  background: transparent;
  color: #ff0000;
  text-decoration-color: currentColor;
}

body.help-page .help-errors-answer__source svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  position: relative;
  left: -4px;
  top: 1px;
  stroke-width: 2.2;
  transition: transform 180ms ease;
}

body.help-page .help-errors-answer__source:is(:hover, :focus-visible) svg {
  transform: translateX(4px);
}

body.help-page .help-errors-dialog__disclaimer {
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top-color: #e2e8f0;
  background: #f8fafc;
}

body.help-page .help-errors-disclaimer__icon {
  width: 20px;
  height: 20px;
  align-self: center;
  justify-self: center;
}

body.help-page .help-errors-dialog__disclaimer p {
  color: #63748b;
  font-size: 12px;
  line-height: 17px;
}

body.help-page .help-errors-modal.is-keyboard-open *,
body.help-page .help-errors-modal.is-keyboard-open *::before,
body.help-page .help-errors-modal.is-keyboard-open *::after {
  transition: none !important;
  scroll-behavior: auto !important;
}

@media (max-width: 720px) {
  body.help-page .help-errors-modal {
    align-items: stretch;
    padding: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.help-page .help-errors-dialog {
    display: grid;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    transform: none;
  }

  body.help-page .help-errors-dialog__close {
    top: 12px;
    right: 12px;
  }

  body.help-page .help-errors-dialog__body {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  body.help-page .help-errors-directory,
  body.help-page .help-errors-dialog__result {
    grid-area: 1 / 1;
    min-width: 0;
    min-height: 0;
  }

  body.help-page .help-errors-directory {
    display: grid;
    border-right: 0;
  }

  body.help-page .help-errors-directory__head > :is(p, h3) {
    padding-right: 52px;
  }

  body.help-page .help-errors-list {
    max-height: none;
  }

  body.help-page .help-errors-dialog__result {
    position: relative;
    z-index: 1;
    inset: auto;
    display: none;
    visibility: visible;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    padding: 62px 18px 22px;
    opacity: 1;
    pointer-events: auto;
  }

  body.help-page .help-errors-dialog__result::before {
    display: none;
  }

  body.help-page .help-errors-dialog__result > :where(.help-errors-answer, .help-errors-fallback, .help-errors-dialog__status) {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 100%;
    flex: 1;
    align-self: stretch;
    overflow-y: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    transform: none;
    transition: none;
  }

  body.help-page .help-errors-dialog__result.is-mobile-open {
    display: flex;
  }

  body.help-page .help-errors-dialog__result-close {
    position: absolute;
    top: 12px;
    left: 14px;
    right: auto;
    display: inline-flex;
    width: auto;
    min-width: 112px;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #315d9b;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }

  body.help-page .help-errors-dialog__result-close::before {
    content: "←";
    font-size: 17px;
    line-height: 1;
  }

  body.help-page .help-errors-dialog__body:has(.help-errors-dialog__result.is-mobile-open) .help-errors-directory {
    display: none;
  }

  body.help-page .help-errors-dialog__body:has(.help-errors-dialog__result.is-mobile-open) .help-errors-dialog__result {
    display: flex;
  }

  body.help-page .help-errors-answer__meaning,
  body.help-page .help-errors-fallback > p:not(.help-errors-fallback__label),
  body.help-page .help-errors-answer__steps li {
    font-size: 16px;
    line-height: 24px;
  }

  body.help-page .help-errors-dialog__disclaimer {
    gap: 8px;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  }

  body.help-page .help-errors-dialog__disclaimer p {
    font-size: 11px;
    line-height: 15px;
  }
}

/* Short viewports keep every list row and the full legal note reachable. */
@media (max-height: 540px) {
  body.help-page .help-errors-modal {
    align-items: stretch;
    padding: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body.help-page .help-errors-dialog {
    display: block;
    width: min(960px, 100%);
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    border-radius: 0;
    transform: none;
  }

  body.help-page .help-errors-dialog__close {
    position: fixed;
    z-index: 4;
    top: 10px;
    right: max(12px, calc((100vw - 960px) / 2 + 12px));
  }

  body.help-page .help-errors-dialog__body {
    height: 400px;
    min-height: 400px;
  }

}

@media (max-width: 420px) {
  body.help-page .help-manual-card__actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.help-page .help-errors-answer__source:is(:hover, :focus-visible) svg {
    transform: none;
  }

  body.help-page #fines-memo .help-manual-card__actions > a,
  body.help-page .help-errors-modal,
  body.help-page .help-errors-modal *,
  body.help-page .help-errors-modal *::before,
  body.help-page .help-errors-modal *::after,
  body.help-page .help-errors-dialog,
  body.help-page .help-manual-card__actions > :where(a, button),
  body.help-page .help-manual-card__actions > a::before {
    transition: none;
  }
}
