/* Mobile-only enhancement for the existing Journal3 footer data. */
.yt-mobile-footer-toggle {
  display: none;
}

@media (max-width: 767.98px) {
  html {
    background-color: #0c3365;
  }

  body {
    background-color: #0c3365 !important;
  }

  html.route-product-product body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  footer.yt-mobile-footer-enhanced {
    margin-bottom: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
    background-color: #0c3365;
  }

  footer.yt-mobile-footer-enhanced > .grid-rows {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background-color: #0c3365;
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-empty-row {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  footer.yt-mobile-footer-enhanced .grid-row-5 {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  footer.yt-mobile-footer-enhanced .grid-row-5 .grid-cols {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  footer.yt-mobile-footer-enhanced .grid-row-5 .grid-col {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .auto-grid-items {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .module-item {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 9px;
    background: rgba(255, 255, 255, .055);
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .catalog-title {
    display: none !important;
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle i {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .2);
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle i::before,
  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle i::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 5px;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .16s ease;
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle i::after {
    transform: rotate(90deg);
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle[aria-expanded='true'] i::after {
    transform: rotate(0deg);
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle[aria-expanded='true'] {
    background: rgba(255, 255, 255, .045);
  }

  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle:focus-visible {
    outline: 2px solid #ff8a2a;
    outline-offset: -3px;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .item-assets {
    margin: 0 !important;
    padding: 2px 12px 10px !important;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .item-assets[hidden] {
    display: none !important;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .subitems {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .module-subitem {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .module-subitem > a {
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 7px 2px !important;
    color: rgba(255, 255, 255, .88) !important;
    font-size: 12.5px;
    line-height: 1.35;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-decoration: none;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-1-1 .module-catalog .module-subitem > a:focus-visible {
    border-radius: 4px;
    outline: 2px solid #ff8a2a;
    outline-offset: 1px;
  }

  footer.yt-mobile-footer-enhanced .grid-module-footer-5-2-1,
  footer.yt-mobile-footer-enhanced .grid-module-footer-5-2-2 {
    margin-top: 8px !important;
  }

  footer.yt-mobile-footer-enhanced .grid-row-6 {
    margin-bottom: 0 !important;
    padding-bottom: 18px !important;
    background-color: #0c3365;
  }
}

@media (prefers-reduced-motion: reduce) {
  footer.yt-mobile-footer-enhanced .yt-mobile-footer-toggle i::after {
    transition: none;
  }
}
