/* Google Programmable Search - Frontend Styles */

.gps-search-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Search box styling */
.gcse-search {
    width: 100%;
}

.gsc-control-cse {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.gsc-search-box {
    margin-bottom: 0 !important;
}

.gsc-input-box {
    border-radius: 4px !important;
    border: 2px solid #e0e0e0 !important;
    transition: border-color 0.3s ease;
}

.gsc-input-box:focus-within {
    border-color: #4285f4 !important;
}

.gsc-input {
    padding: 10px !important;
    font-size: 16px !important;
}

.gsc-search-button {
    border-radius: 4px !important;
    background-color: #4285f4 !important;
    border: none !important;
    padding: 10px 20px !important;
    transition: background-color 0.3s ease;
}

.gsc-search-button:hover {
    background-color: #357ae8 !important;
}

/* Results styling */
.gsc-results-wrapper-overlay {
    border-radius: 8px;
    margin-top: 15px;
}

.gsc-result {
    padding: 15px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.gsc-result:last-child {
    border-bottom: none !important;
}

.gs-title {
    font-size: 18px !important;
    line-height: 1.4 !important;
}

.gs-snippet {
    line-height: 1.6 !important;
    color: #5f6368 !important;
}

/* Widget styling */
.widget .gps-search-wrapper {
    padding: 15px;
    margin: 0;
}

.widget .gcse-search {
    font-size: 14px;
}

/* Error message */
.gps-error {
    background: #fef7f1;
    border-left: 4px solid #dc3232;
    padding: 12px 15px;
    margin: 20px 0;
    color: #dc3232;
    border-radius: 4px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .gps-search-wrapper {
        padding: 15px;
    }
    
    .gsc-input {
        font-size: 14px !important;
    }
    
    .gs-title {
        font-size: 16px !important;
    }
}

/* WooCommerce specific adjustments */
.woocommerce .gps-search-wrapper {
    margin: 30px 0;
}

.woocommerce-page .gps-search-wrapper {
    clear: both;
}

/* Loading state */
.gsc-loading-animation {
    opacity: 0.6;
}

/* Autocomplete dropdown */
.gsc-completion-container {
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

.gsc-completion-item {
    padding: 10px !important;
    transition: background-color 0.2s ease;
}

.gsc-completion-item:hover {
    background-color: #f8f9fa !important;
}

/* No results message */
.gs-no-results-result {
    padding: 20px !important;
    text-align: center !important;
    color: #5f6368 !important;
}
