/**
 * Module: Global layout
 * Source: Stage 4 approved global layout
 * Change-ID: 20260726-160736-stage-4-global-layout
 * Runtime: Bricks-native Header 3413 and Footer 3414
 */

:root {
  --volvo-header-height: 72px;
  --volvo-mobile-sticky-height: 60px;
  --volvo-chat-safe-offset: 0px;
}

.volvo-global-header {
  background: color-mix(in srgb, var(--volvo-white) 96%, transparent);
  border-bottom: 1px solid var(--volvo-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-bar .volvo-global-header {
  top: 32px;
}

.volvo-global-header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  min-height: var(--volvo-header-height);
}

.volvo-global-logo {
  flex: 0 0 auto;
}

.volvo-global-logo img {
  display: block;
  height: 38px;
  object-fit: contain;
  width: auto;
}

.volvo-global-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.volvo-global-nav .volvo-mega-root > .sub-menu {
  background: var(--volvo-white);
  border: 1px solid var(--volvo-border);
  display: grid;
  gap: 24px 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--volvo-container-standard);
  padding: 32px;
  width: min(92vw, var(--volvo-container-standard));
}

.volvo-global-nav .volvo-mega-group > a {
  color: var(--volvo-black);
  font-weight: 700;
}

.volvo-global-nav .sub-menu a {
  white-space: normal;
}

.volvo-header-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
}

.volvo-header-hotline {
  color: var(--volvo-graphite);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.volvo-header-quote {
  min-height: 44px;
  white-space: nowrap;
}

.volvo-breadcrumb-wrap {
  background: var(--volvo-canvas);
  border-bottom: 1px solid var(--volvo-border);
}

.home .volvo-breadcrumb-wrap {
  display: none;
}

.volvo-global-breadcrumb,
.volvo-global-breadcrumb ol,
.volvo-global-breadcrumb ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  min-width: 0;
}

.volvo-global-breadcrumb {
  color: var(--volvo-graphite);
  font-size: .8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  padding-block: 12px;
}

.volvo-global-footer {
  background: var(--volvo-canvas);
  border-top: 1px solid var(--volvo-border);
  color: var(--volvo-black);
}

.volvo-global-footer > .volvo-container-standard {
  padding-block: 64px 36px;
}

.volvo-footer-brand {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.volvo-footer-grid {
  display: grid;
  width: 100%;
  gap: 40px 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.volvo-footer-column {
  align-content: start;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.volvo-footer-title {
  color: var(--volvo-black);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0 0 4px;
}

.volvo-footer-link {
  color: var(--volvo-graphite);
  font-size: .875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.volvo-footer-link:hover,
.volvo-footer-link:focus-visible {
  color: var(--volvo-nordic-blue);
  text-decoration: underline;
  text-underline-offset: .18em;
}

.volvo-footer-bottom {
  align-items: center;
  border-top: 1px solid var(--volvo-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-top: 24px;
}

.volvo-mobile-sticky-cta {
  display: none;
}

@media (max-width: 1279px) {
  :root {
    --volvo-header-height: 64px;
  }

  .volvo-global-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .admin-bar .volvo-global-header {
    top: 46px;
  }

  .volvo-global-header-inner {
    gap: 10px;
  }

  .volvo-global-logo img {
    height: 34px;
  }

  .volvo-global-nav {
    flex: 0 0 auto;
    margin-left: 0;
    order: 3;
  }

  .volvo-header-actions {
    margin-left: auto;
    order: 2;
  }

  .volvo-header-hotline {
    display: none;
  }

  .volvo-header-quote {
    font-size: .8125rem;
    min-height: 44px;
    padding-inline: 14px;
  }

  .volvo-global-nav .bricks-mobile-menu-toggle {
    align-items: center;
    display: flex;
    height: 44px;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }

  .volvo-global-nav .bricks-mobile-menu-wrapper,
  .volvo-global-nav .brx-mobile-menu-wrapper {
    box-sizing: border-box;
    max-width: 420px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    width: 88vw;
  }

  .volvo-global-nav .sub-menu {
    position: static;
    width: 100%;
  }

  .volvo-global-nav .volvo-mega-root > .sub-menu {
    border: 0;
    display: block;
    max-width: none;
    padding: 8px 0 8px 16px;
    width: 100%;
  }

  .volvo-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(var(--volvo-mobile-sticky-height) + env(safe-area-inset-bottom, 0px));
  }

  .volvo-breadcrumb-wrap .volvo-container-standard {
    padding-inline: var(--volvo-gutter);
  }

  .volvo-global-breadcrumb {
    font-size: .75rem;
    padding-block: 10px;
  }

  .volvo-global-footer > .volvo-container-standard {
    padding-block: 48px 30px;
  }

  .volvo-footer-grid {
    gap: 30px;
    grid-template-columns: minmax(0, 1fr);
  }

  .volvo-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .hiba-verify-contact-hub {
    bottom: calc(var(--volvo-mobile-sticky-height) + env(safe-area-inset-bottom, 0px) + 12px) !important;
  }

  .volvo-mobile-sticky-cta {
    align-items: center;
    background: var(--volvo-white);
    border-top: 1px solid var(--volvo-border);
    bottom: var(--volvo-chat-safe-offset);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    left: 0;
    min-height: calc(var(--volvo-mobile-sticky-height) + env(safe-area-inset-bottom, 0px));
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    right: 0;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 90;
  }

  .volvo-mobile-sticky-link {
    align-items: center;
    border: 1px solid var(--volvo-black);
    border-radius: var(--volvo-radius-md);
    display: inline-flex;
    font-size: .8125rem;
    font-weight: 700;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
  }

  .volvo-mobile-sticky-link:first-child {
    background: var(--volvo-black);
    color: var(--volvo-white);
  }

  .volvo-mobile-sticky-link:last-child {
    background: var(--volvo-white);
    color: var(--volvo-black);
  }

  body:has(form:focus-within) .volvo-mobile-sticky-cta {
    opacity: 0;
    pointer-events: none;
    transform: translateY(110%);
  }
}


@media (prefers-reduced-motion: reduce) {
  .volvo-mobile-sticky-cta {
    transition: none;
  }
}
