/* 4.0.8-dev: a single native WordPress search form, moved (not cloned)
   into the mobile navigation overlay while open. */
/* Desktop: overlay input to the left of a stationary search icon.
   Override legacy :focus-within width rules without changing header layout. */
@media (min-width: 1501px) {
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search,
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search:focus-within,
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search.tn-search-expanded {
    position: relative !important;
    display: block !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search .wp-block-search__inside-wrapper,
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search.tn-search-expanded .wp-block-search__inside-wrapper {
    position: relative !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    overflow: visible !important;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search .wp-block-search__input,
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search:focus-within .wp-block-search__input {
    position: absolute !important;
    right: 42px !important;
    top: 50% !important;
    transform: translateY(-50%);
    box-sizing: border-box !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search.tn-search-expanded .wp-block-search__input,
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search.tn-search-expanded:focus-within .wp-block-search__input {
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    padding: 6px 9px !important;
    border: 1px solid var(--wp--preset--color--border, #bbb) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: var(--wp--preset--color--paper, #fff) !important;
    color: var(--wp--preset--color--ink, #171717) !important;
    z-index: 5 !important;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions form.tn-header-search.wp-block-search .wp-block-search__button {
    position: relative !important;
    z-index: 6 !important;
  }
}
/* Mobile search lives exclusively inside the expanded navigation overlay. */
@media (max-width: 1500px) {
  body .wp-site-blocks .tn-site-header.tn-unified-header .tn-header-actions > form.tn-header-search.wp-block-search {
    display: none !important;
  }

  body .wp-site-blocks .tn-site-header.tn-unified-header nav.tn-original-navigation
  .wp-block-navigation__responsive-container.is-menu-open form.tn-mobile-nav-search.wp-block-search {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.25rem 0 0 !important;
    padding: 1rem 0 0 !important;
    border-top: 1px solid var(--wp--preset--color--border, #c8c8c8);
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header nav.tn-original-navigation
  form.tn-mobile-nav-search .wp-block-search__inside-wrapper {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    gap: .5rem;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header nav.tn-original-navigation
  form.tn-mobile-nav-search input[type="search"] {
    display: block !important;
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: .65rem .75rem !important;
    opacity: 1 !important;
    border: 1px solid var(--wp--preset--color--border, #c8c8c8) !important;
    border-radius: 4px;
    background: var(--wp--preset--color--paper, #fff);
    color: var(--wp--preset--color--ink, #171717);
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header nav.tn-original-navigation
  form.tn-mobile-nav-search .wp-block-search__button {
    display: grid !important;
    flex: 0 0 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0 !important;
  }
}

/* 4.0.9-dev: give the desktop search overlay its own horizontal clearance.
   The form and icon remain anchored; move only the navigation as a group.
   The existing 1500px breakpoint keeps mobile behavior unchanged. */
@media (min-width: 1501px) {
  body .wp-site-blocks .tn-site-header.tn-unified-header.tn-desktop-search-open
  nav.tn-original-navigation {
    transform: translateX(-205px) !important;
    transition: transform 160ms ease-out;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header
  nav.tn-original-navigation {
    transition: transform 160ms ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  body .wp-site-blocks .tn-site-header.tn-unified-header
  nav.tn-original-navigation { transition: none !important; }
}

/* 4.0.10-dev: accessible contrast for the mobile search submit control.
   The previous dark-gray button made its dark magnifying glass difficult to see.
   Scope strictly to the search form inside the expanded mobile navigation. */
@media (max-width: 1500px) {
  body .wp-site-blocks .tn-site-header.tn-unified-header
  nav.tn-original-navigation form.tn-mobile-nav-search.wp-block-search
  button.wp-block-search__button {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #555555 !important;
    border-radius: 4px !important;
    opacity: 1 !important;
    cursor: pointer;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header
  nav.tn-original-navigation form.tn-mobile-nav-search.wp-block-search
  button.wp-block-search__button svg {
    fill: currentColor !important;
    stroke: currentColor !important;
    opacity: 1 !important;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header
  nav.tn-original-navigation form.tn-mobile-nav-search.wp-block-search
  button.wp-block-search__button:hover {
    background: #eeeeee !important;
  }
  body .wp-site-blocks .tn-site-header.tn-unified-header
  nav.tn-original-navigation form.tn-mobile-nav-search.wp-block-search
  button.wp-block-search__button:focus-visible {
    outline: 3px solid #111111 !important;
    outline-offset: 2px;
  }
}
