/* Desire Gym Custom Header Search Bar CSS */

.cws-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
}
.cws-form {
    display: flex;
    align-items: center;
    background-color: #f4f4f4; 
    border-radius: 50px;
    padding: 10px 0px 10px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: 36px;
}
.cws-input {
    flex-grow: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 10px 10px 15px !important;
    font-size: 13px;
    line-height: 40px;
    font-weight: 400;
    font-family: 'Open Sans', sans-serif;
    color: #b5b5b5;
    box-shadow: none !important;
    outline: none !important;
}
.cws-input::placeholder {
    color: #b5b5b5;
    font-family: 'Open Sans', sans-serif;
}
.cws-divider {
    width: 1px;
    height: 36px;
    background-color: #fff;
}

.cws-select {
    width: 130px;
    border: none !important;
    background: transparent !important;
    padding: 10px 15px 10px 10px !important;
    font-size: 13px;
    color: #b5b5b5;
    cursor: pointer;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 14px auto !important;
}

.cws-btn {
    background: transparent !important;
    border: none !important;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cws-btn svg {
    width: 16px;
    height: 16px;
    color: #333;
}

.cws-loading {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: #d32f2f;
    border-left-color: #d32f2f;
    border-radius: 50%;
    animation: cws-spin 0.8s linear infinite;
    display: none;
}
@keyframes cws-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cws-results {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}
.cws-result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.cws-result-item:last-child {
    border-bottom: none;
}
.cws-result-item:hover {
    background-color: #fff;
}
.cws-item-img {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    max-width: 50px !important;
    max-height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    background: #fff;
    margin-right: 10px;
    flex-shrink: 0;
    overflow: hidden; 
}
.cws-item-info {
    flex-grow: 1;
}
.cws-item-title {
    font-size: 14px;
    font-weight: 400;
    font-family: 'Open Sans', sans-serif;
    color: #b5b5b5; 
    margin: 0 0 4px 0;
    padding: 0 5px 0 5px;
    line-height: 1.2;
}
.cws-highlight {
    color: #9d9d9d;
    font-weight: bold;
}
.cws-item-tags {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}
.cws-item-price {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    margin-left: 15px;
}
.cws-no-results {
    padding: 15px;
    text-align: center;
    color: #999;
}

.cws-custom-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.cws-custom-select-trigger {
    user-select: none;
    white-space: nowrap;
    overflow: hidden;         
    text-overflow: ellipsis;  
}
.cws-custom-options-list {
    position: absolute;
    top: calc(100% + 15px); 
    width: 240px; 
    max-height: 240px;
    overflow-y: auto; 
    background-color: #f4f4f4; 
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 10001;
    display: none;
}
.cws-custom-options-list::-webkit-scrollbar {
    width: 6px;
}
.cws-custom-options-list::-webkit-scrollbar-thumb {
    background-color: #b5b5b5;
    border-radius: 10px;
}
.cws-custom-option-item {
    padding: 8px 15px;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: #8D8D8D;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1.4;
}
.cws-custom-option-item:hover {
    background-color: #e5e5e5;
    color: #666;
}
.cws-custom-option-item.cws-active {
    background-color: #e0e0e0;
    color: #666;
}

.cws-simple-mode .cws-divider,
.cws-simple-mode .cws-custom-select-wrapper,
.cws-simple-mode .cws-select {
    display: none !important; 
}
.cws-simple-mode .cws-form {
    background-color: #1a1a1a; 
    padding: 8px 5px 8px 15px; 
}
.cws-simple-mode .cws-input {
    color: #ffffff !important; 
}
.cws-simple-mode .cws-input::placeholder {
    color: #888888; 
}
.cws-simple-mode .cws-btn svg {
    color: #ffffff; 
}

@media (max-width: 1024px) {
    .cws-wrapper:not(.cws-simple-mode) {
        display: none !important;
    }
}
@media (min-width: 1025px) {
    .cws-wrapper.cws-simple-mode {
        display: none !important;
    }
}