/* TV Hotel – Header Search Popover (v1.6.2). Coordinates with Salient 17.3.0 & Preventivo Header 2.1.1. */

body.tvh-search-ready #search-outer {
  display: none !important;
}

/* Desktop trigger: icon-only soft botanical orb inside Salient's #search-btn */
body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn,
body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn {
  width: 42px !important;
  height: 44px !important;
  margin: 0 2px 0 0 !important;
  padding: 0 !important;
}
body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div,
body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn > div {
  width: 42px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a,
body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn > div > a {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  color: #183b29 !important;
  text-decoration: none !important;
  opacity: 1 !important;
  background: transparent !important;
  transition: background-color 150ms ease, color 150ms ease !important;
}
body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a:hover,
body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn > div > a:hover {
  background: transparent !important;
}
body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a:focus-visible,
body.tvh-search-ready #header-outer .mobile-search:focus-visible {
  outline: 2px solid #183b29 !important;
  outline-offset: 2px !important;
}

html body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a .tvh-search-orb,
html body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn > div > a .tvh-search-orb,
html body.tvh-search-ready #header-outer .mobile-search .tvh-search-orb {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #e8f2e7 !important;
  background-color: #e8f2e7 !important;
  color: #183b29 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 36px !important;
  opacity: 1 !important;
  position: static !important;
  transform: none !important;
  box-shadow: none !important;
  transition: background-color 150ms ease, color 150ms ease !important;
}
html body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a:hover .tvh-search-orb,
html body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn > div > a:hover .tvh-search-orb,
html body.tvh-search-ready #header-outer .mobile-search:hover .tvh-search-orb {
  background: #d8ead6 !important;
  background-color: #d8ead6 !important;
  color: #183b29 !important;
}
html body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a[aria-expanded="true"] .tvh-search-orb,
html body.tvh-search-ready #header-outer #top ul.buttons > li#search-btn > div > a[aria-expanded="true"] .tvh-search-orb,
html body.tvh-search-ready #header-outer .mobile-search[aria-expanded="true"] .tvh-search-orb {
  background: #183b29 !important;
  background-color: #183b29 !important;
  color: #ffffff !important;
}
html body.tvh-search-ready #header-outer .tvh-search-orb svg {
  display: block !important;
  color: inherit !important;
  opacity: 1 !important;
}
html body.tvh-search-ready #header-outer .tvh-search-orb .tvh-ico-close {
  display: none !important;
}
html body.tvh-search-ready #header-outer a[aria-expanded="true"] .tvh-search-orb .tvh-ico-lens {
  display: none !important;
}
html body.tvh-search-ready #header-outer a[aria-expanded="true"] .tvh-search-orb .tvh-ico-close {
  display: block !important;
}

/* Mobile (<= 999px): clean botanical orb right beside Cart & Menu, zero boxed input */
@media (max-width: 999px) {
  body.tvh-search-ready #header-outer.tvh-header-ready .mobile-search,
  body.tvh-search-ready #header-outer .mobile-search {
    display: flex !important;
    position: static !important;
    order: 0 !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    text-decoration: none !important;
    background: transparent !important;
    border-radius: 999px !important;
  }
}

/* Whisper-light non-blocking click-away scrim */
.tvh-sp-scrim {
  position: fixed;
  inset: 0;
  z-index: 9996;
  background: rgba(24, 59, 41, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}
.tvh-sp-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Compact anchored search popover directly beneath header */
.tvh-sp-popover {
  position: fixed;
  top: calc(var(--tvh-header-height, 89px) + var(--tvh-admin-offset, 0px) + 10px);
  right: max(20px, calc((100vw - 1440px) / 2 + 32px));
  z-index: 9997;
  width: min(480px, calc(100vw - 40px));
  max-height: calc(100vh - var(--tvh-header-height, 89px) - var(--tvh-admin-offset, 0px) - 24px);
  overflow-y: auto;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #d2ddd3;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(24, 59, 41, 0.16);
  padding: 14px 16px 14px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1c241f;
  text-align: left;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms ease, visibility 0s linear 160ms;
}
.tvh-sp-popover.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms ease, visibility 0s linear 0s;
}
.tvh-sp-popover *,
.tvh-sp-popover *::before,
.tvh-sp-popover *::after {
  box-sizing: border-box;
}

@media (max-width: 999px) {
  .tvh-sp-popover {
    top: calc(var(--tvh-header-height, 72px) + var(--tvh-admin-offset, 0px));
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - var(--tvh-header-height, 72px) - var(--tvh-admin-offset, 0px));
    border-radius: 0 0 12px 12px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    padding: 12px 16px 16px;
  }
}

/* Single input form inside popover (hardened against Salient input/button resets) */
.tvh-sp-form {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 12px 0 !important;
  padding: 4px 4px 4px 12px !important;
  background: #f5f8f4 !important;
  border: 1.5px solid #277833 !important;
  border-radius: 8px !important;
  box-shadow: 0 0 0 3px rgba(39, 120, 51, 0.10) !important;
}
.tvh-sp-lead {
  width: 17px;
  height: 17px;
  color: #277833;
  flex: 0 0 auto;
  display: block;
}
.tvh-sp-popover input.tvh-sp-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 6px 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  color: #1c241f !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
@media (max-width: 999px) {
  .tvh-sp-popover input.tvh-sp-input {
    font-size: 16px !important;
  }
}
.tvh-sp-popover input.tvh-sp-input::placeholder {
  color: #5c6e61 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}
.tvh-sp-popover button.tvh-sp-clear {
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  color: #5b6d61 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  flex: 0 0 auto !important;
}
.tvh-sp-popover button.tvh-sp-clear:hover {
  background: #e4ede4 !important;
  color: #183b29 !important;
}
.tvh-sp-popover button.tvh-sp-clear[hidden] {
  display: none !important;
}
html body #tvh-search-popover.tvh-sp-popover form.tvh-sp-form button.tvh-sp-submit[type="submit"] {
  appearance: none !important;
  border: 0 !important;
  background: #183b29 !important;
  background-color: #183b29 !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  box-shadow: none !important;
  flex: 0 0 auto !important;
  transition: background-color 140ms ease !important;
}
html body #tvh-search-popover.tvh-sp-popover form.tvh-sp-form button.tvh-sp-submit[type="submit"]:hover {
  background: #277833 !important;
  background-color: #277833 !important;
}
.tvh-sp-popover button.tvh-sp-submit:focus-visible,
.tvh-sp-popover button.tvh-sp-chip:focus-visible,
.tvh-sp-popover button.tvh-sp-clear:focus-visible,
.tvh-sp-popover a.tvh-sp-item:focus-visible,
.tvh-sp-popover a.tvh-sp-all:focus-visible {
  outline: 2px solid #183b29 !important;
  outline-offset: 2px !important;
}

.tvh-sp-label {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #4b5d50 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Quick catalog chips */
.tvh-sp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tvh-sp-popover button.tvh-sp-chip {
  appearance: none !important;
  border: 1px solid #d5e0d6 !important;
  background: #f8fbf7 !important;
  color: #183b29 !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin: 0 !important;
  padding: 7px 11px !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: border-color 140ms ease, background-color 140ms ease !important;
}
.tvh-sp-popover button.tvh-sp-chip:hover {
  border-color: #277833 !important;
  background: #ebf3ea !important;
}

/* Live results list */
.tvh-sp-popover ul.tvh-sp-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  transition: opacity 120ms ease;
}
.tvh-sp-popover ul.tvh-sp-list.is-loading {
  opacity: 0.35;
  pointer-events: none;
}
.tvh-sp-popover ul.tvh-sp-list > li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tvh-sp-popover a.tvh-sp-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 8px 9px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  color: #1c241f !important;
  background: transparent;
  transition: background-color 120ms ease;
}
.tvh-sp-popover a.tvh-sp-item:hover,
.tvh-sp-popover a.tvh-sp-item.is-active {
  background: #f3f7f2 !important;
}
.tvh-sp-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}
.tvh-sp-thumb {
  width: 44px;
  height: 34px;
  border-radius: 5px;
  background: #f3f7f2;
  border: 1px solid #dce5dc;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  color: #46594b;
}
.tvh-sp-thumb.is-hub {
  background: #183b29;
  border-color: #183b29;
  color: #d7e87c;
  letter-spacing: 0.03em;
}
.tvh-sp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 2px;
  background: #ffffff;
}
.tvh-sp-meta {
  flex: 1 1 auto;
  min-width: 0;
}
.tvh-sp-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #183b29;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tvh-sp-sub {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  color: #506255;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tvh-sp-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.tvh-sp-price {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1c241f;
  white-space: nowrap;
}
.tvh-sp-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.tvh-sp-badge.is-in {
  background: #e8f4ea;
  color: #1e6028;
}
.tvh-sp-badge.is-arch {
  background: #f0f2f0;
  color: #526157;
}
.tvh-sp-badge.is-guide {
  background: #edf5e4;
  color: #275e2b;
}

.tvh-sp-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e9efe9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tvh-sp-popover a.tvh-sp-all {
  display: inline-flex !important;
  align-items: center !important;
  padding: 7px 12px !important;
  border-radius: 6px !important;
  background: #183b29 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: background-color 140ms ease !important;
}
.tvh-sp-popover a.tvh-sp-all:hover {
  background: #277833 !important;
}
.tvh-sp-hint {
  font-size: 11.5px;
  color: #5b6d61;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .tvh-sp-hint {
    display: none;
  }
}
.tvh-sp-msg {
  font-size: 12.5px;
  line-height: 1.45;
  color: #4b5d50;
  padding: 8px 2px;
}

@media (prefers-reduced-motion: reduce) {
  .tvh-sp-popover,
  .tvh-sp-scrim,
  .tvh-search-orb,
  body.tvh-search-ready #header-outer #top ul.tvh-tools > li#search-btn > div > a {
    transition: none !important;
  }
}
