/* ============================
   CBC SEARCH (Trigger + Overlay)
   Paste this whole block (clean)
   ============================ */

/* ---- Trigger bar ---- */
.cbc-search-trigger{
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  cursor: text;
}

.cbc-search-icon{
  display: flex;
  align-items: center;
  opacity: 0.85;
  flex-shrink: 0;
}

.cbc-search-icon img{
  width: 18px;
  height: 18px;
  display: block;
}

.cbc-search-trigger input{
  flex: 1;
  width: 100%;
  border: none !important;
  background: transparent !important;
  color: #f2f2f0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.cbc-search-trigger input::placeholder{
  color: rgba(242,242,240,.6);
}

/* ---- Overlay ---- */
.cbc-search-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 9999;
}

.cbc-search-overlay.active{
  display: block;
}

/* Panel container */
.cbc-search-panel{
  width: calc(100% - 24px);
  max-width: 720px;
  margin: 8vh auto;
  background: #31302f;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
  overflow: hidden;
}

/* Header row */
.cbc-search-header{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #b7b6b2;
}

/* Slot that receives the moved input */
#cbcSearchInputSlot{
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}

#cbcSearchInputSlot:hover{
  background: rgba(0,0,0,.32);
}

#cbcSearchInputSlot:focus-within{
  box-shadow: 0 0 0 1px rgba(238,172,72,.4);
}

/* When input is inside the overlay slot */
#cbcSearchInputSlot input{
  flex: 1;
  width: 100%;
  border: none !important;
  background: transparent !important;
  color: #f2f2f0 !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#cbcSearchInputSlot input::placeholder{
  color: rgba(242,242,240,.6);
}

/* Close button */
.cbc-search-header button{
  background: none;
  border: none;
  color: #b7b6b2;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
}

/* ---- Results list ---- */
.cbc-search-results{
  max-height: 60vh;
  overflow-y: auto;
}

/* Result row MUST be grid on the link itself */
a.cbc-result{
  display: grid !important;
  grid-template-columns: 45px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.cbc-result:hover{
  background: rgba(255,255,255,.05);
}

/* Thumbnail */
.cbc-thumb{
  width: 45px;
  height: 45px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
}

.cbc-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Text */
.cbc-result-title{
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
}

.cbc-result-variant{
  font-size: 13px;
  font-weight: 600;
  color: #eeac48;
  line-height: 1.15;
  margin-top: 2px;
}

.cbc-result-meta{
  font-size: 12px;
  color: #b7b6b2;
  line-height: 1.2;
  margin-top: 2px;
}

/* "No matches" / loading message */
.cbc-search-results > .cbc-result{
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}


/* Home search row: input + Advanced Search pill */
.cbc-search-row{
  display:flex;
  align-items:stretch;
  gap:10px;
}

.cbc-search-row .cbc-search-trigger{
  flex:1 1 auto;
}

/* Advanced Search pill */
.cbc-search-row .pill.cbc-adv-search{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#b7b6b2;
  text-decoration:none;
  white-space:nowrap;
  font-size:12px;
  line-height:1;
}

.cbc-search-row .pill.cbc-adv-search:hover{
  background:rgba(255,255,255,.09);
  color:#f2f2f0;
}

/* Mobile: stack */
@media (max-width:720px){
  .cbc-search-row{
    flex-direction:column;
  }
  .cbc-search-row .pill.cbc-adv-search{
    height:40px;
  }
}

/* Keep Advanced Search tight to the search bar on wide screens */
.cbc-search-row{
  display:flex;
  align-items:stretch;
  gap:10px;
}

.cbc-search-row .cbc-search-trigger{
  flex:1 1 auto;
  width:auto !important;
  max-width:none !important;
  margin:0 !important;         /* kills any centering rules */
}

.cbc-search-row .pill.cbc-adv-search{
  flex:0 0 auto;
}


/* Search bar + Advanced Search button row */
.cbc-search-row{
  display:flex;
  align-items:stretch;   /* key: make children match tallest item */
  gap:12px;
}

/* Let the search bar take the remaining width */
.cbc-search-row .cbc-search-trigger{
  flex:1 1 auto;
  min-width:0;
}

/* Make the button the same height as the search trigger */
.cbc-adv-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;

  padding:0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  font-size:12px;
  line-height:1;
  text-decoration:none;
  color:#b7b6b2;
}

.cbc-adv-pill:hover{
  background:rgba(255,255,255,.09);
}