/* CSS Variables for theming */


/* Main Container */
.csr-search-container {
    position: relative;
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Search Wrapper */
.csr-search-wrapper {
    display: flex;
    align-items: center;
    /* gap: 8px; */
    background: var(--csr-bg);
    /* border: 2px solid var(--csr-border); */
    /* border-radius: 8px; */
    transition: all 0.2s ease;
    padding: 4px;
}

.csr-search-wrapper:focus-within {
    border-color: var(--csr-primary);
    box-shadow: 0 0 0 3px var(--csr-focus-ring);
}

/* Search Input */
#csr-search-input {
	border-radius: 26px 0px 0px 26px;
}

.csr-search-input {
    flex: 1;
    border: none;
    
    outline: none;
    padding: 10px 20px;
    font-size: 16px;
    color: var(--csr-text);
    background: transparent;
    min-width: 0;
}

.csr-search-input::placeholder {
    color: #6b7280;
}

/* Search Button */
.csr-search-button {
   display: flex;
    align-items: center;
    justify-content: center;
    background: #1c9521;
    color: white;
    border: none;
    border-radius: 0px 26px 26px 0px;
    margin: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    height: 45px;
}

.csr-search-button:hover {
    background: #F6D55C;
}

.csr-search-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--csr-bg), 0 0 0 4px var(--csr-primary);
}

/* Search Icon */
.csr-search-icon {
    width: 20px;
    height: 20px;
}

/* Suggestions Container */
#csr-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--csr-bg);
    border: 1px solid var(--csr-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--csr-shadow);
    z-index: 2;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--csr-primary) transparent;
}

/* Suggestion Items */
.csr-suggestion {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--csr-text);
    font-size: 14px;
    border-bottom: 1px solid var(--csr-border);
	background-color:#F6D55C;
}

.csr-suggestion:last-child {
    border-bottom: none;
}

.csr-suggestion:hover,
.csr-suggestion.selected {
	color:white;
    background-color: green;
}

.csr-suggestion.selected {
    font-weight: 500;
}

/* State Messages */
.csr-loading,
.csr-no-results,
.csr-error {
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
}

.csr-loading {
    color: var(--csr-primary);
}

.csr-no-results {
    color: #6b7280;
}

.csr-error {
    color: #dc2626;
}

/* Custom Scrollbar for Webkit browsers */
#csr-suggestions::-webkit-scrollbar {
    width: 6px;
}

#csr-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

#csr-suggestions::-webkit-scrollbar-thumb {
    background-color: var(--csr-primary);
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 640px) {
    .csr-search-container {
        margin: 0px;
		width:100%;
    }

    .csr-search-wrapper {
        padding: 4px;
    }

    .csr-search-input {
        padding: 8px 12px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.csr-loading {
    animation: pulse 1.5s infinite ease-in-out;
}