/* DD mobile UX layer for optimalperformancechiro.com (QA findings RUX-2, RUX-3, RUX-6, LEGAL-5; 2026-11-27).
   Loaded on every page after the Oxygen styles. Desktop (over 1120px) is unchanged except the footer
   Disclaimer link, which copies the style of the Privacy and Terms links next to it.
   To remove: delete this file, dd-ux.js, the two tags that load them, and the .dd-callbar block before </body>. */

/* Footer Disclaimer link: same look as #link_text-379-12 and #link_text-381-12. */
.dd-footer-legal { font-family: 'Poppins'; font-size: 13px; font-weight: 300; color: #fff; padding-top: 10px; padding-bottom: 10px; text-align: left; }
@media (max-width: 991px) { .dd-footer-legal { margin-bottom: 8px; } }
@media (max-width: 767px) { .dd-footer-legal { text-align: center; margin-top: 0; width: 100%; } }

/* Mobile menu (modal) additions: same look as the existing links in #div_block-254-12. */
.dd-mnav-sub { color: #fff; font-size: 15px; line-height: 1; padding: 2px 15px; margin: 5px 0; opacity: .9; }
.dd-mnav-item { color: #fff; font-size: 15px; line-height: 1.2; padding: 2px 15px; margin: 5px 0; text-align: center; }
.dd-mnav-sub:hover, .dd-mnav-item:hover { transform: scale3d(1.1, 1.1, 1.1); }
.dd-mnav-group { width: 100%; text-align: center; }
.dd-mnav-group > summary { list-style: none; cursor: pointer; color: #fff; font-size: 17px; line-height: 1; padding: 2px 15px; margin: 5px 0; display: inline-flex; align-items: center; gap: 8px; }
.dd-mnav-group > summary::-webkit-details-marker { display: none; }
.dd-mnav-group > summary::before { content: '+'; font-size: 28px; font-weight: 300; line-height: 1; width: 15px; text-align: center; margin-right: 12px; }
.dd-mnav-group[open] > summary::before { content: '\2212'; }
.dd-mnav-list { display: flex; flex-direction: column; align-items: center; background-color: #2750c4; padding: 5px 0; border-radius: 10px; width: 100%; }
#div_block-275-12:focus-visible, #div_block-250-12:focus-visible, .dd-mnav-group > summary:focus-visible, #_toggle-286-12:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#div_block-275-12, #div_block-250-12 { cursor: pointer; }

/* Header photo strip (PERF-CLS-MOBILE, 2026-11-27): the 4 photos carry real width and height attributes and
   load eagerly, so the browser reserves their space before they arrive. These rules keep that box fixed
   while the files load, so the header does not grow and push the page down (layout shift).
   The sizes repeat the Oxygen header styles, because on many pages that stylesheet loads late. */
#image-321-12, #image-322-12, #image-323-12 { height: 50px; width: auto; aspect-ratio: 640 / 526; }
#image-378-12 { width: 200px; height: auto; aspect-ratio: 1179 / 676; }
@media (max-width: 991px) { #image-321-12, #image-322-12, #image-323-12 { height: 45px; } }
@media (max-width: 767px) {
  #image-321-12, #image-322-12, #image-323-12 { height: 35px; }
  #div_block-319-12 { max-width: 100%; }
  #div_block-319-12 > img { min-width: 0; max-width: 100%; object-fit: contain; flex: 0 0 auto; }
  #div_block-319-12 > #image-378-12 { flex: 0 1 200px; }
}
@media (max-width: 479px) { #image-321-12, #image-322-12, #image-323-12 { height: 30px; } }
/* CryoSkin page photos: real width and height attributes reserve their space before the lazy load. */
#image-56-505, #image-65-505 { height: auto; }

/* Height of the stuck header, used to keep anchor targets clear of it (FORMS-2).
   Over 1120px the full header sticks at about 272px; at 1120px and under the slim bar is about 56px. */
:root { --dd-sticky-h: 290px; }
@media (max-width: 1120px) { :root { --dd-sticky-h: 72px; } }
#gform_wrapper_2, #dd-gform-msg-2, #gform_2 input, #gform_2 textarea, .dd-anchor { scroll-margin-top: var(--dd-sticky-h); }

/* CryoSkin form result message (FORMS-2, FORMS-3): large and clear, so a visitor who lands back on the page sees it. */
#dd-gform-msg-2 { font-size: 18px; line-height: 1.45; font-weight: 500; color: #1d1d24; background: #eef3ff; border: 2px solid #4066d4; border-radius: 6px; padding: 18px 16px; margin: 12px 0; }
#dd-gform-msg-2.dd-msg-error { background: #fff3f1; border-color: #c0392b; }
#dd-gform-msg-2 a { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }

/* RUX-2: on phones and tablets the sticky header was the full 350px header (about 45% of a phone screen).
   While it is stuck, show only a slim bar: small logo on the left, Menu on the right.
   The tap-to-call bar at the bottom of phones carries the phone number. */
@media (max-width: 1120px) {
  #_header-2-225.oxy-sticky-header-active { display: flex; align-items: stretch; background-color: #22222c; }
  #_header-2-225.oxy-sticky-header-active #_header_row-10-225 { flex: 0 0 auto; width: auto; padding-top: 6px; padding-bottom: 6px; border-bottom: 0; }
  #_header-2-225.oxy-sticky-header-active #_header_row-10-225 .oxy-header-container { width: auto; padding-left: 10px; padding-right: 10px; }
  #_header-2-225.oxy-sticky-header-active #div_block-77-12,
  #_header-2-225.oxy-sticky-header-active #div_block-319-12 { display: none; }
  #_header-2-225.oxy-sticky-header-active #image-74-12 { height: 44px; width: auto; margin-bottom: 0; }
  #_header-2-225.oxy-sticky-header-active #_header_row-278-12 { flex: 1 1 auto; display: flex; align-items: center; }
  #_header-2-225.oxy-sticky-header-active #_header_row-278-12 > .oxy-header-container { width: 100%; flex-direction: row; justify-content: center; align-items: center; }
  #_header-2-225.oxy-sticky-header-active #_header_center-280-12 { display: none; }
}

/* RUX-3, RUX-R1: tap-to-call bar on phones and tablets (1120px and under, the same breakpoint as the slim
   sticky header, which hides the header phone and Schedule buttons). */
.dd-callbar { display: none; }
@media (max-width: 1120px) {
  .dd-callbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300; gap: 8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: #22222c; box-shadow: 0 -2px 10px rgba(0, 0, 0, .25); }
  .dd-callbar a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; border-radius: 5px; font-family: 'Poppins', Arial, sans-serif; font-size: 15px; font-weight: 500; white-space: nowrap; line-height: 1.1; text-align: center; text-decoration: none; color: #fff; }
  .dd-callbar a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .dd-callbar .dd-callbar-call { flex-grow: 1.6; background: #4066d4; }
  .dd-callbar .dd-callbar-book { background: transparent; border: 2px solid #fff; }
  .dd-callbar svg { width: 18px; height: 18px; margin-right: 8px; flex: 0 0 auto; fill: currentColor; }
  /* Keep the footer reachable above the bar. */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  /* Lift the ReviewWave chat button and its "Let's Chat?" bubble above the bar. */
  .rws-icon-container.rwl-bottom { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
  /* Hide the bar while the menu is open. */
  body.dd-menu-open .dd-callbar { display: none; }
}
/* Tablets: keep the two buttons a comfortable size in the middle of the bar. */
@media (min-width: 768px) and (max-width: 1120px) {
  .dd-callbar { justify-content: center; gap: 12px; }
  .dd-callbar a, .dd-callbar .dd-callbar-call { flex: 0 1 300px; font-size: 16px; }
}

/* RUX-M3: the ReviewWave chat button sits above everything; hide it while the menu is open. */
body.dd-menu-open .rws-icon-container { display: none !important; }

/* RUX-M1, RUX-M6: long words and web addresses wrap instead of pushing phones sideways. */
.oxy-rich-text a, .oxy-post-content p, .oxy-post-content a, .dd-legal-text a { overflow-wrap: anywhere; }
@media (max-width: 767px) {
  #_rich_text-5-642 { margin-left: 0; margin-right: 0; padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 340px) { .dd-callbar a { font-size: 13px; } .dd-callbar svg { display: none; } }

/* /disclaimer/ body text (built from the Terms page template). */
.dd-legal-text { max-width: 900px; margin: 0 auto; padding: 0 20px 40px; }
.dd-legal-text .dd-legal-h2 { font-size: 20px; line-height: 1.3; margin: 28px 0 10px; }
.dd-legal-text p { margin: 0 0 14px; }

/* Home hero (inherited from the WordPress site): 58.css fixes #new_columns-31-58 at 1120px and only
   resets it under 992px, so windows from 992px to about 1135px (iPad landscape, small laptops)
   scrolled sideways and cut off the hero text. Cap it at the window width. */
#new_columns-31-58 { max-width: 100%; }
