/*
Theme Name: TrustDialer
Theme URI: https://trustdialer.com
Description: TrustDialer child theme for WPressOne.
Author: TrustDialer
Template: wpressone
Version: 1.0.0
Text Domain: trustdialer
*/

/* WPressOne now wraps regular pages in a fixed-width container. TrustDialer's
 * WPO rows provide their own reading widths and full-bleed section backgrounds. */
body:is(.home, .td-features-page-body, .td-help-page-body, .td-contact-page-body, .td-compare-page-body, .td-store-page-body) .wpo-content.wpo-container {
  width: 100%;
  max-width: none;
  padding: 0 !important;
}

.td-page-top-target {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Read by screen readers and search engines, not shown on screen. */
.td-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* inc/trustdialer/seo.php promotes SeoOne's sitemap title to the page h1. Its
 * .h2 class keeps the h2 type scale; keep the h2 spacing as well. */
h1.seo-one-human-sitemap__title {
  margin-block: 0.83em;
}

.td-back-to-top {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: #0a2946;
  color: #fff;
  box-shadow: 0 12px 30px rgba(4, 25, 44, 0.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.td-back-to-top.is-visible,
.td-back-to-top:focus-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.td-back-to-top:hover {
  background: #ff3654;
  color: #fff;
  box-shadow: 0 14px 34px rgba(4, 25, 44, 0.3);
  transform: translateY(-2px);
}

.td-back-to-top:focus-visible {
  outline: 3px solid #ff3654;
  outline-offset: 3px;
}

.td-back-to-top svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 600px) {
  .td-back-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-back-to-top {
    transition: none;
  }
}

/* Keep the compact footer readable without altering the shared WPressOne template. */
@media (max-width: 760px) {
  .td-reference-footer .td-reference-footer__top {
    display: flex !important;
    min-height: 0;
    padding-block: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
  }

  .td-reference-footer .td-reference-footer__top .td-reference-brand {
    display: inline-flex;
    width: auto;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    align-self: flex-start;
    line-height: 0;
  }

  .td-reference-footer .td-reference-footer__top .td-reference-brand img {
    margin: 0 !important;
  }

  .td-reference-footer .td-reference-footer__tagline {
    margin: 0 0 18px !important;
  }

  .td-reference-footer .td-reference-footer__top > p:empty {
    display: none;
  }

  .td-reference-footer .td-reference-footer__top nav {
    display: grid;
    grid-template-columns: repeat(4, max-content);
    justify-content: space-between;
    column-gap: 4px;
    row-gap: 12px;
    width: 100%;
    margin-top: 8px;
    overflow-x: visible;
  }

  .td-reference-footer .td-reference-footer__top nav a {
    min-width: 0;
    font-size: clamp(11px, 3.2vw, 12px);
    white-space: nowrap;
  }
}

@media (max-width: 340px) {
  .td-reference-footer .td-reference-footer__top nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .td-reference-footer .td-reference-footer__top nav a {
    line-height: 1.25;
    white-space: normal;
  }
}
