/* The public page and editor share one tint layer. Its colour and opacity are independent. */
.drive-footer:has(> .drive-footer-photo)::before,
.drive-apply-chapter:has(> .drive-apply-photo)::before {
  background: var(--drive-overlay-color, #061b34);
}
/* The footer tint must cover every pixel equally, including at 100%. */
.drive-footer:has(> .drive-footer-photo)::before { inset: 0; mask-image: none; }
.drive-apply-chapter:has(> .drive-apply-photo)::before {
  mask-image: linear-gradient(110deg, #000 0%, rgb(0 0 0 / .93) 38%, rgb(0 0 0 / .6) 100%);
}
.drive-footer { --footer-default-top: 112px; --footer-default-gap: 26px; }
.drive-footer .drive-footer-main {
  padding-top: var(--footer-default-top);
  row-gap: var(--footer-default-gap);
}
.drive-footer .drive-footer-main table {
  width: auto;
  max-width: 100%;
}
.drive-footer .drive-footer-main td { padding-block: 1px; }
.drive-footer .drive-footer-main td:first-child { padding-right: 18px; }
.drive-footer .drive-footer-main div:has(> table) > :is(h2,h3,h4) { margin-bottom: 8px; }
@media (min-width: 1051px) {
  .drive-footer { --footer-desktop: 1; }
  /* A shared first baseline also follows spacing saved on the contact heading.
     Keep the headings lower in the photograph than the previous layout. */
  .drive-footer .drive-footer-main > div:has(a[href^="mailto:"]),
  .drive-footer .drive-footer-main > div:has(table) {
    align-self: first baseline !important;
  }
  .drive-footer .drive-footer-main > div > p:last-child:has(a[href^="mailto:"]) { margin-bottom: 0; }

}
/* Relative positioning moves the hours column as a unit. The next row reserves
   room independently so even a large shift cannot cover the legal links. */
.drive-footer .drive-footer-main > div:has(table) {
  position: relative;
  top: var(--footer-hours-offset, 0px);
}
.drive-footer .drive-footer-main > div:last-child:has(a[href*="adatkezeles"])::before {
  content: "";
  display: block;
  height: var(--footer-hours-offset, 0px);
}
@media (max-width: 1050px) {
  .drive-footer { --footer-default-top: 48px; }
}
@media (max-width: 650px) {
  .drive-footer { --footer-default-top: 36px; --footer-default-gap: 22px; }
}

/* Keep the old car to the left of the contact column at every breakpoint. */
.drive-footer-main:has(.drive-footer-logo):has(a[href^="mailto:" i]) > div:first-child {
  grid-column: 1; grid-row: 1; align-self: stretch; align-items: flex-end; justify-content: flex-start;
}
.drive-footer-main:has(.drive-footer-logo) > div:has(a[href^="mailto:" i]) {
  grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere;
}
.drive-footer .drive-footer-main .drive-footer-logo {
  margin: 0; transform: none; translate: 0 var(--car-email-shift, 0px) !important;
}
@media (max-width: 1050px) {
  .drive-footer-main:has(.drive-footer-logo):has(a[href^="mailto:" i]) {
    grid-template-columns: minmax(4rem, .6fr) minmax(0, 1.4fr);
  }
  .drive-footer-main:has(.drive-footer-logo):has(a[href^="mailto:" i]) > div:has(table),
  .drive-footer-main:has(.drive-footer-logo):has(a[href^="mailto:" i]) > div:last-child { grid-column: 2; }
}
@media (max-width: 650px) {
  .drive-footer-main:has(.drive-footer-logo):has(a[href^="mailto:" i]) {
    grid-template-columns: clamp(3.25rem, 17vw, 6rem) minmax(0, 1fr);
    column-gap: .85rem;
  }
  .drive-footer-main:has(.drive-footer-logo):has(a[href^="mailto:" i]) > div:last-child { grid-column: 1 / -1; }
}
