/* Initial hidden states for JS-toggled elements */
.yorkup-search-bar .search-loader,
.yorkup-search-results,
.yorkup-search-loading,
.yorkup-search-no-results {
    display: none;
}

.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.voice-search-btn.listening {
    animation: speakpulse 1.5s infinite;
}

@keyframes speakpulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.ajax-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
}

.yorkup-header-bottom {
  display: flex;
}

a.trp-language-switcher-container.menu-item.menu-item-type-post_type.menu-item-object-language_switcher {
  background: #e6e6e6;
  color: #000000;
  padding: 5px;
  border-radius: 3px;
  font-weight: 600;
}
.yorkup-header-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.yorkup-logo img {
  height: 43px;
  border: 1px solid #9c9c9c;
  opacity: 1;
}

.yorkup-logo {
  flex: 1;
}

.yorkup-header-icons {
  display: flex;
  align-items: center;
}

span.circle_qty {
  background: #3e9e42;
  border-radius: 50%;
  font-size: 9px;
  color: #fff;
  padding: 3px;
  margin-left: 14px;
  display: flex;
  width: 18px;
  /* position: absolute; */
  justify-content: center;
}

.yorkup-search-bar {
  margin: 0 20px;
  display: flex;
  align-items: center;
  min-width: 600px;
  max-width: 600px;
  position: relative;
  border-radius: 10px;
}

.yorkup-search-bar input {
  width: 100%;
  border-radius: 0.4rem 0rem 0rem 0.4rem;
  height: 37px;
  padding: 9px;
  font-weight: 500;
  outline: none;
  border: none;
  border: 1px solid #f0f0f0;
  text-overflow: ellipsis;
  flex: 1;
  text-indent: 18px;
}

.yorkup-search-bar button {
  background: none;
  color: #000;
  padding: 5px 10px;
  position: relative;
  flex: 0 0 3.8rem;
  background: #ebeef1;
  height: 2.5rem;
  line-height: 18px;
  border: none;
  border-radius: 0rem 0.4rem 0.4rem 0rem;
  outline: none;
  cursor: pointer;
  transition: padding 0.1s linear;
}

.yorkup-header-icons button {
  background: none;
  border: none;
  color: #f44336;
  border-left: 1px solid #ffffff3d;
  padding: 9px 10px 10px 20px;
  cursor: pointer;
  margin-left: 10px;
}

.yorkup-header-icons button i {
  font-size: 18px;
  color: #fefefe;
}

.yorkup-comment-dropdown {
  position: relative;
  display: inline-block;
}

.yorkup-header-toogle {
  display: flex;
  align-items: center;
}

.yorkup-header-bottom .container {
  display: flex;
  flex-direction: row;
  align-content: center;
  align-items: center;
  padding: 0;
  justify-content: space-between;
  width: 100%;
}

#voice-search-button {
  right: 10px;
  top: 0;
  color: #000;
  padding: 5px 10px;
  position: relative;
  flex: 0 0 3.8rem;
  background: #f0f0f0;
  height: 2.5rem;
  border: none;
  border-radius: 0rem 0.4rem 0.4rem 0rem;
  outline: none;
  cursor: pointer;
  transition: padding 0.1s linear;
}

.yorkup-header-bottom {
  transition: top 0.3s ease-in-out;
}

.yorkup-header-bottom.fixed {
  position: fixed;
  top: 0;
  width: 100%;
  background: #05040f;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

#search-input {
  width: 100%;
  padding-right: 40px;
}

#clear-input-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 18px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  display: none;
}

#clear-input-button:hover {
  color: #333;
}

#search-input:not(:placeholder-shown) ~ #clear-input-button,
#search-input:focus ~ #clear-input-button {
  display: block;
}

@media (min-width: 1100px) {
  #search-input {
    width: 100%;
    padding-right: 40px;
    min-width: 470px;
  }
  .yorkup-search-bar form {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
  }
}

/* Language Switcher */
.yorkup-language-switcher {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.yorkup-lang-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.3s;
}

.yorkup-lang-button:hover {
    opacity: 0.8;
}

.yorkup-lang-button svg {
    flex-shrink: 0;
}

.yorkup-lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
    margin-top: 5px;
}

.yorkup-language-switcher:hover .yorkup-lang-menu {
    display: block;
}

.yorkup-lang-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
}

.yorkup-lang-menu a:hover {
    background: #f5f5f5;
}

.yorkup-lang-menu a.active {
    background: #f44336;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .yorkup-language-switcher {
        margin-right: 10px;
    }
    
    .yorkup-lang-button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ===== SEARCH BAR REDESIGN ===== */
.yorkup-search-bar {
    margin: 0 20px;
    display: flex;
    align-items: center;
    min-width: 500px;
    max-width: 600px;
    position: relative;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dddddd;
    overflow: hidden;
}

.yorkup-search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.yorkup-search-bar input {
    flex: 1;
    height: 37px;
    padding: 0 15px;
    font-size: 15px;
    font-weight: 400;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
}

.yorkup-search-bar input::placeholder {
    color: #999;
}

/* Voice Search Button */
.yorkup-search-bar .voice-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #3e9e42;
    transition: color 0.3s, background 0.3s;
    flex-shrink: 0;
}

.yorkup-search-bar .voice-search-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.yorkup-search-bar .voice-search-btn.listening {
    color: #f44336;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Search Submit Button */
.yorkup-search-bar .search-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 37px;
    padding: 0 20px;
    background: #3e9e42;
    background: linear-gradient(-45deg, #3e9e42, #55b759, #38a43c, #3e9e42);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s;
    flex-shrink: 0;
}

.yorkup-search-bar .search-submit-btn:hover {
    background: #43a047;
}

.yorkup-search-bar .search-submit-btn svg {
    color: #fff;
}

/* Search Loader */
.yorkup-search-bar .search-loader {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%);
}

.yorkup-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile adjustments */
@media (max-width: 992px) {
    .yorkup-search-bar {
        min-width: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    
    .yorkup-search-bar .search-submit-btn span {
        display: none;
    }
    
    .yorkup-search-bar .search-submit-btn {
        padding: 0 15px;
    }
}
