

.searchbar-wrapper{
  padding-top:30px;
  width: 100%;
  display:none;
}

.search-bar{
  display: flex;
  align-items: center;       /* vertical center */
  gap: 12px;                 /* spacing between columns */
  padding: 0 12px;           /* optional */
  width:60%;
  margin: 0 auto;            /* center horizontally */
}

.searchpage-wrapper .searchbar-wrapper {
  padding-top: 5px;
  
}

.searchpage-wrapper .search-bar {
  width: 100%;
}

/* left and right: only as wide as their content */
.left-td,
.right-td{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-left:10px;
}

/* middle: takes remaining space */
.middle-td{
  flex: 1 1 auto;
  min-width: 0;              /* IMPORTANT: allows input to shrink instead of overflowing */
  display: flex;
  align-items: center;
}

.middle-inner,
.search-form{
  width: 100%;
   position: relative; /* for suggestions absolute positioning */
}

.search-box{
    font-size: 1.5em;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
    border: 1px solid #dfe1e5;
    border-radius: 20px;
    
    padding-left: 20px;
    background-color: white;
}

.search-box-suggestions-open{
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
/* *{border:1px solid red}; */

/* input area takes ALL available width */
.search-input-wrap{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* input truly full width */
.search-input{
  width: 100%;
  min-width: 0;
  font-size: 18px;
}

/* button stays on the right */
#search-submit{
  flex: 0 0 auto;
  white-space: nowrap;
}


/* Target the old class names, but only inside this wrapper */

.search-box:hover,
.search-box:focus-within {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  border-color: rgba(223, 225, 229, 0);
}

.suggestions{
   box-shadow: 0 4px 6px rgba(32, 33, 36, 0.28);
  border-color: rgba(223, 225, 229, 0);
}

.search-icon {
  font-size: 18px;
  opacity: 0.6;
  margin-right: 6px;
}

.search-input {

  border: none;
  outline: none;

}

.btn {
  border: none;
  background: #f8f9fa;
  color: #3c4043;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 18px;
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: #e8eaed;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}


.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;           /* directly below search-box */
    width: 100%;
  z-index: 1000;
  border-radius: 0, 0, 16px, 16px;
  box-sizing: border-box;
}



.suggestions-list {
  border: 1px solid #dfe1e5;
  background: #fff;
  border-radius: 0 0 8px 8px;
  max-height: 240px;
  overflow-y: auto;
}

.suggestions-list div {
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestions-list div:hover {
    background: #f1f3f4;
}

.suggestions-list a{
  text-decoration: none;
  color: inherit;
  padding-left:20px;
}

.suggestions div {
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestions div:hover {
  background: #f1f3f4;
}

#language-select {
  border: none;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .searchbar-wrapper {
    padding: 12px 8px 0;
  }

  .search-bar {
    padding: 0;
  }

  .left-td,
  .right-td {
    padding-left: 4px;
  }

  .search-box {
    font-size: 1.1em;
    padding-left: 12px;
    border-radius: 16px;
  }

  .search-input {
    font-size: 16px; /* ≥16px prevents iOS zoom on focus */
  }

  .btn {
    font-size: 15px;
    padding: 8px 12px;
    margin-left: 4px;
  }

  .suggestions-list {
    max-height: 50vh;
  }
}
