/* =======================================================
   Properfy Manager - Searchbar
   ======================================================= */

.hn-searchbar{
  --hn-sb-gap: 12px;
  --hn-sb-radius: 8px;
  --hn-sb-text: var(--e-global-color-text, #111827);
  --hn-sb-muted: #64748b;
  --hn-sb-primary: var(--e-global-color-primary, #2563eb);
  --hn-sb-accent: #b0893f;
  --hn-sb-border: #d9dee8;
  --hn-sb-surface: #ffffff;
  --hn-sb-field-bg: #ffffff;
  --hn-sb-btn-bg: var(--hn-sb-primary);
  --hn-sb-btn-color: #ffffff;
  --hn-sb-btn-border: var(--hn-sb-btn-bg);
  --hn-sb-tab-active-bg: var(--hn-sb-primary);
  --hn-sb-tab-active-color: #ffffff;
  display: block;
  width: 100%;
  padding: 16px;
  color: var(--hn-sb-text);
  background: var(--hn-sb-surface);
  border: 1px solid var(--hn-sb-border);
  border-radius: var(--hn-sb-radius);
  box-shadow: 0 14px 38px rgba(15,23,42,.08);
}

.hn-searchbar,
.hn-searchbar *,
.hn-searchbar *::before,
.hn-searchbar *::after{
  box-sizing: border-box;
}

.hn-searchbar .tabs-wrap{
  overflow: visible;
}

.hn-searchbar .tabs-head{
  display: block;
  max-width: 100%;
  margin: 0 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.hn-searchbar .tabs-head::-webkit-scrollbar{
  display: none;
}

.hn-searchbar .tabs{
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: max-content;
  padding: 0;
}

.hn-searchbar .tab-item{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 96px;
  padding: 8px 13px;
  color: var(--hn-sb-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  background: color-mix(in srgb, var(--hn-sb-text) 5%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--hn-sb-text) 10%, #ffffff);
  border-radius: var(--hn-sb-radius);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.hn-searchbar .tab-item.is-active{
  color: var(--hn-sb-tab-active-color);
  background: var(--hn-sb-tab-active-bg);
  border-color: var(--hn-sb-tab-active-bg);
}

.hn-searchbar .tab-item:not(.is-active):hover{
  background: color-mix(in srgb, var(--hn-sb-text) 8%, #ffffff);
}

.hn-searchbar .tab-item.is-muted{
  cursor: default;
  opacity: .6;
  pointer-events: none;
}

.hn-searchbar .sb-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--hn-sb-gap);
  align-items: end;
}

.hn-searchbar .cols-1{ grid-template-columns: repeat(1, minmax(0,1fr)); }
.hn-searchbar .cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.hn-searchbar .cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.hn-searchbar .cols-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.hn-searchbar .cols-5{ grid-template-columns: repeat(5, minmax(0,1fr)); }
.hn-searchbar .cols-6{ grid-template-columns: repeat(6, minmax(0,1fr)); }

@media (max-width:1024px){
  .hn-searchbar .t-cols-1{ grid-template-columns: repeat(1, minmax(0,1fr)); }
  .hn-searchbar .t-cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hn-searchbar .t-cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hn-searchbar .t-cols-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hn-searchbar .t-cols-5{ grid-template-columns: repeat(5, minmax(0,1fr)); }
  .hn-searchbar .t-cols-6{ grid-template-columns: repeat(6, minmax(0,1fr)); }
}

@media (max-width:767px){
  .hn-searchbar{
    padding: 14px;
  }
  .hn-searchbar .m-cols-1{ grid-template-columns: repeat(1, minmax(0,1fr)); }
  .hn-searchbar .m-cols-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hn-searchbar .m-cols-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hn-searchbar .m-cols-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .hn-searchbar .m-cols-5{ grid-template-columns: repeat(5, minmax(0,1fr)); }
  .hn-searchbar .m-cols-6{ grid-template-columns: repeat(6, minmax(0,1fr)); }
}

.hn-searchbar .sb-field,
.hn-searchbar .sb-actions{
  min-width: 0;
}

.hn-searchbar .sb-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hn-searchbar .sb-lbl{
  color: color-mix(in srgb, var(--hn-sb-text) 66%, #ffffff);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.hn-searchbar .sb-input{
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--hn-sb-text);
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
  background-color: var(--hn-sb-field-bg);
  border: 1px solid var(--hn-sb-border);
  border-radius: var(--hn-sb-radius);
  outline: none;
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.hn-searchbar select.sb-input{
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.hn-searchbar .sb-input::placeholder{
  color: color-mix(in srgb, var(--hn-sb-muted) 78%, #ffffff);
}

.hn-searchbar .sb-input:focus{
  border-color: color-mix(in srgb, var(--hn-sb-primary) 78%, #ffffff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hn-sb-primary) 20%, transparent);
}

.hn-searchbar .sb-actions{
  display: flex;
  align-items: flex-end;
}

.hn-searchbar .sb-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  color: var(--hn-sb-btn-color);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  background: var(--hn-sb-btn-bg);
  border: 1px solid var(--hn-sb-btn-border);
  border-radius: var(--hn-sb-radius);
  cursor: pointer;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--hn-sb-btn-bg) 22%, transparent);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease, color .18s ease;
}

.hn-searchbar .sb-btn:hover{
  filter: brightness(.97);
  transform: translateY(-1px);
}

.hn-searchbar .sb-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hn-sb-btn-bg) 32%, transparent);
}

.hn-searchbar .screen-reader-text{
  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;
}

/* Classic */
.hn-searchbar--classic{
  --hn-sb-radius: 4px;
  --hn-sb-btn-bg: #111827;
  --hn-sb-btn-border: #111827;
  --hn-sb-tab-active-bg: #111827;
  padding: 14px;
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 8px 20px rgba(17,24,39,.06);
}
.hn-searchbar--classic .sb-input,
.hn-searchbar--classic .sb-btn,
.hn-searchbar--classic .tab-item{
  border-radius: 4px;
}

/* Modern */
.hn-searchbar--modern{
  --hn-sb-radius: 8px;
  --hn-sb-border: color-mix(in srgb, var(--hn-sb-primary) 18%, #ffffff);
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: color-mix(in srgb, var(--hn-sb-primary) 18%, #ffffff);
  box-shadow: 0 18px 44px rgba(15,23,42,.11);
}
.hn-searchbar--modern .sb-field{
  padding: 8px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.84);
  border-radius: calc(var(--hn-sb-radius) + 2px);
}
.hn-searchbar--modern .sb-input{
  border-color: transparent;
  box-shadow: none;
}

/* Elegant */
.hn-searchbar--elegant{
  --hn-sb-radius: 4px;
  --hn-sb-primary: #b0893f;
  --hn-sb-btn-bg: #111827;
  --hn-sb-btn-border: #111827;
  --hn-sb-tab-active-bg: #b0893f;
  background: #ffffff;
  border-color: rgba(176,137,63,.48);
  box-shadow: 0 1px 0 rgba(176,137,63,.20), 0 16px 34px rgba(15,23,42,.08);
}
.hn-searchbar--elegant .sb-lbl{
  color: #7c5b1d;
}
.hn-searchbar--elegant .sb-input{
  border-color: rgba(176,137,63,.34);
}
.hn-searchbar--elegant .sb-input:focus{
  border-color: #b0893f;
  box-shadow: 0 0 0 3px rgba(176,137,63,.18);
}

/* Nova */
.hn-searchbar--nova{
  --hn-sb-text: #f8fafc;
  --hn-sb-muted: #cbd5e1;
  --hn-sb-border: rgba(255,255,255,.18);
  --hn-sb-surface: #111827;
  --hn-sb-field-bg: rgba(255,255,255,.96);
  --hn-sb-btn-bg: #f6c85f;
  --hn-sb-btn-border: #f6c85f;
  --hn-sb-btn-color: #111827;
  --hn-sb-tab-active-bg: #f6c85f;
  --hn-sb-tab-active-color: #111827;
  background: linear-gradient(135deg, #111827 0%, #263244 100%);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 20px 52px rgba(2,6,23,.24);
}
.hn-searchbar--nova .sb-input{
  color: #111827;
  border-color: transparent;
}
.hn-searchbar--nova .tab-item{
  color: #ffffff;
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.14);
}

/* Compact */
.hn-searchbar--compact{
  --hn-sb-gap: 8px;
  --hn-sb-radius: 6px;
  --hn-sb-btn-bg: #111827;
  --hn-sb-btn-border: #111827;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.hn-searchbar--compact .tabs-head{
  margin-bottom: 8px;
}
.hn-searchbar--compact .sb-input,
.hn-searchbar--compact .sb-btn{
  min-height: 40px;
}
.hn-searchbar--compact .sb-btn{
  box-shadow: none;
}

/* Minimal */
.hn-searchbar--minimal{
  --hn-sb-radius: 0;
  --hn-sb-btn-bg: #111827;
  --hn-sb-btn-border: #111827;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.hn-searchbar--minimal .sb-input{
  padding-inline: 0;
  background: transparent;
  border-width: 0 0 1px;
  box-shadow: none;
}
.hn-searchbar--minimal .sb-input:focus{
  box-shadow: none;
}
.hn-searchbar--minimal .tab-item{
  background: transparent;
}

/* Premium */
.hn-searchbar--premium{
  --hn-sb-radius: 6px;
  --hn-sb-primary: #b0893f;
  --hn-sb-btn-bg: #111827;
  --hn-sb-btn-border: #111827;
  --hn-sb-tab-active-bg: #b0893f;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
    linear-gradient(135deg, rgba(176,137,63,.18), rgba(17,24,39,.08));
  border-color: rgba(176,137,63,.42);
  box-shadow: 0 20px 48px rgba(17,24,39,.12);
}
.hn-searchbar--premium .sb-row{
  padding-left: 10px;
  border-left: 3px solid #b0893f;
}
.hn-searchbar--premium .sb-input{
  border-color: rgba(176,137,63,.30);
}
.hn-searchbar--premium .sb-btn{
  box-shadow: 0 10px 22px rgba(17,24,39,.18);
}

@media (prefers-reduced-motion: reduce){
  .hn-searchbar .sb-input,
  .hn-searchbar .sb-btn,
  .hn-searchbar .tab-item{
    transition: none;
  }
  .hn-searchbar .sb-btn:hover{
    transform: none;
  }
}
