/**
 * DART3D compact stacked footer.
 * Applies only when the Blocksy footer columns stack (max-width: 999px).
 * Desktop (1000px+) is unchanged.
 */

@media (max-width: 999px) {
  #footer.ct-footer.d3f-ready {
    background-color: #fbfbfb;
    color: #687279;
  }

  #footer.d3f-ready [data-row="top"] > .ct-container {
    display: block !important;
    padding-top: 18px !important;
    padding-bottom: 16px !important;
    text-align: left;
  }

  /* Hide the original stacked widget columns; JS keeps them in the DOM
     (including the hidden custom_html-2 promo-bar helper). */
  #footer.d3f-ready [data-row="top"] > .ct-container > [data-column] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  /* Redundant 100px logo row — brand already sits in the sticky header. */
  #footer.d3f-ready [data-row="middle"] {
    display: none !important;
  }

  #footer.d3f-ready [data-row="bottom"] > .ct-container {
    padding-top: 0 !important;
    padding-bottom: 16px !important;
    border-top: 1px dashed rgba(222, 222, 222, 0.8);
  }

  #footer.d3f-ready .ct-footer-copyright {
    text-align: center;
    color: #989898;
    font-size: 13px;
    line-height: 18px;
    border-top: none;
    padding-top: 14px;
    margin-top: 4px;
  }

  /* Keep the product sticky ATC from covering the copyright. */
  body.single-product #footer.d3f-ready [data-row="bottom"] > .ct-container {
    padding-bottom: 88px !important; /* 73px bar + gap */
  }

  .d3f-shell {
    display: block;
    width: 100%;
  }

  .d3f-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
    color: #687279;
    padding: 0 0 14px;
    border-bottom: 1px solid #d9dadc;
  }
  .d3f-trust span { white-space: nowrap; }
  .d3f-trust .d3f-dot {
    color: #d9dadc;
    padding: 0 7px;
  }

  .d3f-acc {
    border-bottom: 1px solid #d9dadc;
  }
  .d3f-acc__btn {
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: #131117;
    font-family: "IBM Plex Mono", sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    text-align: left;
    cursor: pointer;
  }
  .d3f-acc__btn:focus-visible {
    outline: 2px solid #e23d28;
    outline-offset: 2px;
  }

  .d3f-chev {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    position: relative;
  }
  .d3f-chev::before,
  .d3f-chev::after {
    content: "";
    position: absolute;
    background: #131117;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .d3f-chev::before {
    width: 12px;
    height: 1.5px;
    left: 2px;
    top: 7.25px;
  }
  .d3f-chev::after {
    width: 1.5px;
    height: 12px;
    left: 7.25px;
    top: 2px;
  }
  .d3f-acc.is-open .d3f-chev::after {
    opacity: 0;
    transform: scaleY(0);
  }

  .d3f-panel {
    display: none;
    padding: 0 0 12px;
  }
  .d3f-acc.is-open .d3f-panel { display: block; }

  .d3f-panel a,
  .d3f-panel .d3f-meta {
    display: block;
    padding: 10px 0;
    color: #687279;
    text-decoration: none;
    font-size: 15px;
    line-height: 22px;
  }
  .d3f-panel a:hover,
  .d3f-panel a:focus-visible { color: #e23d28; }
  .d3f-panel a:focus-visible {
    outline: 2px solid #e23d28;
    outline-offset: 2px;
  }
  .d3f-panel .d3f-meta {
    padding: 8px 0 0;
    font-size: 13px;
    line-height: 20px;
    white-space: pre-line;
  }
  .d3f-panel .d3f-meta + .d3f-meta { padding-top: 4px; }

  .d3f-contact {
    padding: 16px 0 12px;
    text-align: center;
  }
  .d3f-contact a {
    display: block;
    color: #131117;
    text-decoration: none;
    font-size: 14px;
    line-height: 22px;
    padding: 4px 0;
  }
  .d3f-contact a:hover,
  .d3f-contact a:focus-visible { color: #e23d28; }

  @media (prefers-reduced-motion: reduce) {
    .d3f-chev::before,
    .d3f-chev::after { transition: none; }
  }
}

@media (min-width: 1000px) {
  /* Belt and braces: never restyle the 3-column desktop footer. */
  #footer.d3f-ready .d3f-shell { display: none !important; }
}
