/* search2027: the header search (layout.blade.php, search2027.js). Result rows reuse livesearch2027's .live-search-* look. */
.header-search-toggle{display:flex;align-items:center;justify-content:center;gap:8px;flex-shrink:0;min-height:44px;padding:8px 15px 8px 13px;border:1px solid var(--line);border-radius:30px;background:#fff;color:var(--ink);font:inherit;font-size:13px;font-weight:500;line-height:1;cursor:pointer}
.header-search-toggle[hidden],.header-search[hidden]{display:none}
.header-search-toggle svg{width:18px;height:18px;flex:none}
.header-search-toggle[aria-expanded=true]{border-color:var(--blue);background:var(--blue-soft);color:var(--blue)}
.header-search-toggle:focus-visible,.header-search-close:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.header-search-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.header-search{position:fixed;top:var(--search-top,88px);left:0;right:0;bottom:0;z-index:70;background:#12263461;overflow:hidden}
.header-search-sheet{box-sizing:border-box;display:flex;flex-direction:column;width:min(780px,calc(100% - 32px));max-height:calc(100% - 24px);margin:0 auto;padding:16px 14px 8px;border:1px solid var(--line);border-top:0;border-radius:0 0 18px 18px;background:#fff;box-shadow:0 18px 48px #17394e33}
.header-search-form{display:flex;align-items:center;gap:10px;flex:none;margin:0 2px}
.header-search-field{display:flex;flex:1;align-items:center;gap:10px;min-width:0;min-height:52px;padding:0 16px;border:1.5px solid var(--blue);border-radius:14px;background:#fff;cursor:text}
.header-search-field:focus-within{outline:3px solid var(--blue);outline-offset:2px}
.header-search-field svg{flex:none;width:20px;height:20px;color:var(--blue)}
.header-search-field input{flex:1;min-width:0;padding:12px 0;border:0;outline:0;background:none;color:var(--ink);font:inherit;font-size:16px}
.header-search-field input::placeholder{color:#7b878f}
.header-search-close{flex:none;min-height:44px;padding:0 15px;border:0;border-radius:12px;background:#f1f3f4;color:var(--ink);font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.header-search .header-search-results{position:static;flex:1 1 auto;width:auto;max-width:none;max-height:none;min-height:0;margin:10px 0 0;padding:0 0 6px;overflow-y:auto;overscroll-behavior:contain;border:0;border-radius:0;background:none;box-shadow:none;text-align:left}
.header-search .header-search-results:empty{display:none}
.header-search .live-search-label{margin-top:10px}
.header-search .live-search-option.is-all{color:var(--blue)}
.header-search-hint{margin:12px 10px 4px}
@media(hover:hover){.header-search-toggle:hover{border-color:var(--blue);color:var(--blue)}.header-search-close:hover{background:#e6eaec}}
@media(max-width:1319px){.header-search-toggle{width:44px;padding:0}.header-search-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
/* With บริการดูแลห้อง and the search button the one-row header needs room below 1200px in every language, as English
   already did (rental2027.css): short language names, the saved button without its word. */
@media(min-width:851px) and (max-width:979px){.header-inner{gap:12px}html[lang] .desktop-nav{gap:11px}.header-inner .wordmark{font-size:19px}}
@media(min-width:851px) and (max-width:919px){html[lang=en] .header-inner{gap:8px}html[lang=en] .desktop-nav{gap:8px}html[lang=en] .desktop-nav a{font-size:11px}html[lang=en] .lang-switch a{padding-left:5px;padding-right:5px}}
@media(min-width:1101px) and (max-width:1199px){html[lang=en] .header-inner{gap:12px}html[lang=en] .desktop-nav{gap:10px}html[lang=en] .lang-switch{margin-right:-8px}}
@media(min-width:1320px) and (max-width:1439px){html[lang=en] .header-search-toggle{width:44px;padding:0}html[lang=en] .header-search-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
@media(min-width:1200px) and (max-width:1219px){html[lang=en] .header-inner{gap:24px}}
@media(min-width:1200px) and (max-width:1319px){html[lang=en] .lang-long{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}html[lang=en] .lang-short{display:inline}html[lang=en] .saved-button>span:not(.count-badge){display:none}}
@media(min-width:851px) and (max-width:1199px){.lang-long{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.lang-short{display:inline}.saved-button>span:not(.count-badge){display:none}}
/* Up to 850px the header is two rows (brand and languages; the menu, which scrolls sideways) and the first row has no
   room left: the search button ends the menu row, outside the part that scrolls, edge to edge like the menu's line. */
@media(max-width:850px){
  .header-inner{--search-pad:32px;--search-gap:18px}
  /* the menu's basis leaves exactly the button's room, so it never moves up into the first row */
  /* the button's box also covers the flex gap before it (--search-gap, the header's gap), so the line above the row has no break */
  .desktop-nav{box-sizing:border-box;flex:1 1 calc(100% - 48px - var(--search-gap) + var(--search-pad));min-width:0;margin-right:0;padding-right:12px}
  .header-search-toggle{order:4;align-self:stretch;width:calc(48px + var(--search-gap) + var(--search-pad));min-height:45px;margin:0 calc(-1 * var(--search-pad)) 0 calc(-1 * var(--search-gap));padding:0 var(--search-pad) 0 0;border:0;border-top:1px solid var(--line);border-left:1px solid var(--line);border-radius:0;background:#fff}
  .header-search-toggle[aria-expanded=true]{background:var(--blue-soft)}
}
/* The menu's fade (rental2027.css: English up to 850px, Thai up to 419px) keeps the top line whole up to the button. */
@media(max-width:850px){html[lang=en] .desktop-nav{-webkit-mask-image:linear-gradient(#000,#000),linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(#000,#000),linear-gradient(90deg,#000 calc(100% - 40px),transparent);-webkit-mask-size:100% 1px,100% 100%;mask-size:100% 1px,100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0}}
@media(max-width:419px){html[lang=th] .desktop-nav{-webkit-mask-image:linear-gradient(#000,#000),linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(#000,#000),linear-gradient(90deg,#000 calc(100% - 40px),transparent);-webkit-mask-size:100% 1px,100% 100%;mask-size:100% 1px,100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:0 0,0 0;mask-position:0 0,0 0}}
@media(max-width:560px){.header-inner{--search-pad:20px;--search-gap:8px}}
@media(max-width:359px){.header-inner{--search-pad:12px;--search-gap:4px}}
/* A phone: the search covers the screen (above the LINE bar and the assistant), and the page behind does not scroll. */
@media(max-width:850px){
  .header-search{top:0;z-index:1000;background:#fff}
  .header-search-sheet{width:100%;height:100%;max-height:none;padding:12px 12px calc(8px + env(safe-area-inset-bottom));border:0;border-radius:0;box-shadow:none}
  .header-search-field{min-height:48px;padding:0 13px}
  html.header-search-open,html.header-search-open body{overflow:hidden}
}
@media(prefers-reduced-motion:no-preference){.header-search-sheet{animation:header-search-in .16s ease-out}}
@keyframes header-search-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media(max-width:850px) and (prefers-reduced-motion:no-preference){.header-search-sheet{animation:none}}
