/* Base Styles - inherit theme font for code/pre in content */
.gazelle-search-container pre,
.gazelle-search-container code,
.gazelle-search-container kbd,
.gazelle-search-container samp {
    font-family: inherit;
}

/* Theme wraps shortcode in <code> - make it neutral (rakip: empty code, we unwrap via JS) */
.gazelle-search-container > code {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    font-family: inherit !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* Desktop: Search Bar Width ayarı (px) kullanılır. Küçük ekranda viewport'a göre küçülür. */
div#gazelle-search-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: var(--max-width, 600px);
    padding: 0 12px;
    box-sizing: border-box;
}

.gazelle-search-container {
    display: block;
    position: relative;
    width: 100%;
    max-width: var(--gazelle-max-width, 600px);
    margin: 0 auto;
    box-sizing: border-box;
}

.gazelle-search-form {
    position: relative;
    width: 100%;
    max-width: var(--gazelle-max-width, 600px);
    margin: 0 auto;
    box-sizing: border-box;
}

.gazelle-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    min-width: 0;
}

.gazelle-search-input.active-search {
    border-color: #333;
    border-radius: 25px 25px 0 0;
}

.gazelle-search-input:focus {
    border-color: #2271b1;
}

.gazelle-search-submit {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gazelle-search-submit:hover {
    opacity: 0.7;
}

.gazelle-search-submit .search-icon {
    width: 24px;
    height: 24px;
    color: #666;
}

.gazelle-voice-btn {
    position: absolute;
    right: 46px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: opacity 0.2s;
}
.gazelle-voice-btn:hover {
    opacity: 0.8;
}
.gazelle-voice-btn.gazelle-voice-active {
    color: #2271b1;
}
.gazelle-style-1 .gazelle-voice-btn,
.gazelle-style-2 .gazelle-voice-btn {
    right: 46px;
}
.gazelle-style-3 .gazelle-voice-btn {
    right: 46px;
}
.gazelle-search-tags, .gazelle-search-brands, .gazelle-search-posts, .gazelle-search-pages {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}
.gazelle-search-tags-title, .gazelle-search-brands-title, .gazelle-search-posts-title, .gazelle-search-pages-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}
.gazelle-search-tags-list, .gazelle-search-brands-list, .gazelle-search-posts-list, .gazelle-search-pages-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gazelle-search-tags-list li, .gazelle-search-brands-list li, .gazelle-search-posts-list li, .gazelle-search-pages-list li {
    margin: 4px 0;
}
.gazelle-search-tags-list a, .gazelle-search-brands-list a, .gazelle-search-posts-list a, .gazelle-search-pages-list a {
    color: inherit;
    text-decoration: none;
}
.gazelle-search-tags-list a:hover, .gazelle-search-brands-list a:hover, .gazelle-search-posts-list a:hover, .gazelle-search-pages-list a:hover {
    text-decoration: underline;
}

#gazelle-search-results {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: -2px;
    border-top: none;
    min-width: 0;
    max-height: 400px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Base results-item styles - will be overridden by more specific selectors */
.results-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.results-item:hover {
    background-color: #f5f5f5;
    color: inherit;
    text-decoration: none;
}

.results-item:last-child {
    border-bottom: none;
}

.product-image {
    flex: 0 0 60px;
    margin-right: 15px;
}

.product-image img {
    max-width: 100%;
    height: auto;
}

/* Base product-info styles */
.product-info {
    flex: 1;
    margin-right: 15px;
}

.product-info > * {
    margin-bottom: 5px;
}

.product-info > *:last-child {
    margin-bottom: 0;
}

.product-title {
    font-weight: 500;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
}

.product-price {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.product-category {
    color: #666;
    font-size: 0.9em;
}

.product-description {
    color: #666;
    font-size: 0.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 8px 0;
}

.product-sku {
    color: #999;
    font-size: 0.85em;
}

.product-stock {
    font-size: 0.9em;
    margin-top: 8px;
}

.product-stock.instock {
    color: #28a745;
}

.product-stock.outofstock {
    color: #dc3545;
}

.view-all {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

.view-all a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
}

.view-all a:hover {
    color: #333;
    text-decoration: none;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #666;
}

.error {
    padding: 15px;
    text-align: center;
    color: #dc3545;
}

/* Hide Details */
.hide-details .gazelle-search-results-detail {
    display: none !important;
}

/* Style 1 - Simple Search: icon on the right (default) */
.gazelle-style-1 .gazelle-search-input,
.style-1 .gazelle-search-input,
.style-1 #gazelle-search-input {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px 48px 12px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
}
.gazelle-style-1 .gazelle-search-input:focus,
.style-1 #gazelle-search-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}
.gazelle-style-1 .gazelle-search-submit {
    right: 8px;
    left: auto;
}

/* Style 2 - Right Icon Search */
.gazelle-style-2 .gazelle-search-input,
.style-2 .gazelle-search-input,
.style-2 #gazelle-search-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 48px 10px 15px;
    font-size: 14px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.gazelle-style-2 .gazelle-search-input:focus,
.style-2 #gazelle-search-input:focus {
    border-color: #666;
}
.gazelle-style-2 .gazelle-search-submit {
    right: 8px;
    left: auto;
}

/* Style 3 - Left Icon Search: icon on the left */
.gazelle-style-3 .search-input-wrapper {
    flex-direction: row;
}
.gazelle-style-3 .gazelle-search-input,
.style-3 .gazelle-search-input,
.style-3 #gazelle-search-input {
    border: none;
    border-bottom: 2px solid #ddd;
    border-radius: 0;
    padding: 10px 15px 10px 48px;
    font-size: 16px;
    transition: all 0.3s ease;
}
.gazelle-style-3 .gazelle-search-input:focus,
.style-3 #gazelle-search-input:focus {
    border-bottom-color: #2196F3;
}
.gazelle-style-3 .gazelle-search-submit {
    left: 8px;
    right: auto;
}

/* Style 4 - Rounded */
.style-4 #gazelle-search-input {
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.style-4 #gazelle-search-input:focus {
    border-color: #9C27B0;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.2);
}

/* Results Container */
div#gazelle-search-results {
    background: #fff;
    display: flex;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gazelle-search-results-list {
    flex: 2;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.gazelle-search-results-detail {
    flex: 1;
    padding: 15px;
    border-left: 1px solid #eee;
    background: #f9f9f9;
}

/* Product Items - More specific styles */
.gazelle-search-results .results-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.gazelle-search-results .results-item:hover {
    background-color: #f5f5f5;
}

.gazelle-search-results .results-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
}

.gazelle-search-results .results-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.gazelle-search-results .results-item a:hover {
    color: #4CAF50;
}

/* Product Details - More specific styles */
.gazelle-search-results-detail .product-info {
    flex: 1;
}

.product-description {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0;
}

.product-price {
    font-weight: bold;
    color: #4CAF50;
}

.product-category {
    font-size: 0.8em;
    color: #888;
}

.product-sku {
    font-size: 0.8em;
    color: #888;
}

.product-stock {
    font-size: 0.9em;
    color: #4CAF50;
}

.onsale {
    background: #ff5722;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 5px;
}

/* Star Rating */
.product-rating {
    color: #ffc107;
    font-size: 0.9em;
}

.star {
    display: inline-block;
}

.star.empty {
    color: #ddd;
}

/* View All Link */
.view-all {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #eee;
}

.view-all a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 500;
}

.view-all a:hover {
    text-decoration: underline;
}

div#gazelle-search-container {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

/* Container specific results-item styles */
#gazelle-search-container .results-item {
    display: flex;
    flex-direction: row;
    width: 100%; 
}

#gazelle-search-container .results-item:hover {
    background: #d8d8d8;
}

input#gazelle-search-input,
.gazelle-search-input {
    padding: 13px 24px 13px 48px;
    line-height: 24px;
    font-size: 17px;
    border: 2px solid transparent;
    height: auto;
    box-sizing: border-box;
    border: 1px solid;
    color: #000;
}

div#gazelle-search-results {
    background: #fff;
    display: block;
    margin-left: 0px;
    width: 100%;
    max-width: 100%;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 5px;
    box-sizing: border-box;
}

.gazelle-search-results-list{
    max-width: 500px;
    width: 30%;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: column;
    color: #000;
}
.gazelle-search-results-list img{
    width: 15%;
}

.gazelle-search-results-list a{
    color: #000;
    text-decoration: unset;
    font-size: 13px;
}

.gazelle-search-results-detail{
    width:70%;
    color: #000;
}

.gazelle-search-results-detail img{
    width:100%;
    max-width: 150px;
}

.gazelle-search-results-list .results-item {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.gazelle-search-results-list .product-image {
    width: 80px;
    min-width: 80px;
    margin-right: 15px;
}

.gazelle-search-results-list .product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.gazelle-search-results-list .product-info {
    flex: 1;
}

.gazelle-search-add-to-cart {
    flex: 0 0 auto;
    margin-left: auto;
}

.gazelle-search-add-to-cart .button {
    padding: 8px 15px;
    white-space: nowrap;
}

/* Search Results Page Styles */
.gazelle-search-results-page {
    padding: 40px 0;
}

.gazelle-search-results-page .page-header {
    margin-bottom: 30px;
    text-align: center;
}

.gazelle-search-results-page .page-title {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px;
}

.gazelle-search-results-page .page-title span {
    color: #666;
    font-weight: normal;
}

.gazelle-search-results-page .products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.gazelle-search-results-page .product-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.gazelle-search-results-page .product-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gazelle-search-results-page .product-image {
    position: relative;
    padding-top: 100%;
}

.gazelle-search-results-page .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gazelle-search-results-page .product-details {
    padding: 15px;
}

.gazelle-search-results-page .product-title {
    font-size: 16px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.gazelle-search-results-page .product-title a {
    color: #333;
    text-decoration: none;
}

.gazelle-search-results-page .product-price {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.gazelle-search-results-page .product-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.gazelle-search-results-page .product-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

.gazelle-search-results-page .no-results {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Pagination Styles */
.gazelle-search-results-page .pagination {
    text-align: center;
    margin-top: 30px;
}

.gazelle-search-results-page .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.gazelle-search-results-page .page-numbers.current {
    background: #333;
    color: #fff;
    border-color: #333;
}

.gazelle-search-results-page .page-numbers:hover {
    background: #f5f5f5;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .gazelle-search-results-page .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Ekran küçüldükçe viewport'a göre küçül, taşma olmasın */
    div#gazelle-search-container,
    .gazelle-search-container,
    .gazelle-search-form {
        max-width: min(var(--gazelle-max-width, 600px), calc(100vw - 16px));
    }
    
    div#gazelle-search-container {
        padding: 0 8px;
    }
    
    .gazelle-search-results-page .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Mobile: stack search results list and detail vertically */
    div#gazelle-search-results {
        flex-direction: column;
        max-height: 70vh;
    }
    
    .gazelle-search-results-list {
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: column;
    }
    
    .gazelle-search-results-detail {
        width: 100% !important;
        border-left: none;
        border-top: 1px solid #eee;
    }
    
    .gazelle-search-results-list .results-item {
        flex-direction: row;
    }
    
    .gazelle-search-add-to-cart .button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gazelle-search-results-page .products {
        grid-template-columns: 1fr;
    }
    
    div#gazelle-search-container {
        padding: 0 6px;
    }
    
    .gazelle-search-form .search-input-wrapper {
        margin-bottom: 8px;
    }
    
    .gazelle-search-input {
        padding: 12px 40px 12px 16px;
        font-size: 16px;
    }
    
    .gazelle-search-results .gazelle-search-item {
        padding: 8px 10px;
    }
    
    .gazelle-search-results .product-image {
        width: 50px;
        min-width: 50px;
    }
}

.gazelle-search-add-to-cart {
    margin-top: 10px;
}

.gazelle-search-add-to-cart .button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.3s;
}

.gazelle-search-add-to-cart .button:hover {
    background-color: #0056b3;
}

.gazelle-search-add-to-cart .button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Common Styles */
.gazelle-search-form {
    position: relative;
    width: 100%;
}

.gazelle-search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.gazelle-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 5px;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.gazelle-search-results-inner {
    padding: 10px;
    overflow: visible;
}

.gazelle-search-banner {
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.gazelle-search-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.gazelle-search-banner a {
    display: block;
}

.gazelle-search-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.gazelle-search-item:last-child {
    border-bottom: none;
}

.gazelle-search-item:hover {
    background-color: #f5f5f5;
}

.product-image {
    position: relative;
    width: 56px;
    height: 56px;
    margin-right: 12px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.onsale {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e83e8c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.product-info {
    flex: 1;
}
.product-info > * {
    margin-bottom: 2px;
}
.product-info > *:last-child {
    margin-bottom: 0;
}

.product-title {
    color: #333;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 3px;
    display: block;
    font-size: 13px;
}

.product-rating {
    margin: 2px 0;
    font-size: 11px;
}

.product-price {
    color: #e83e8c;
    font-weight: 500;
    margin: 2px 0;
    font-size: 13px;
}

.product-sku {
    color: #666;
    font-size: 11px;
    margin: 2px 0;
}

.product-categories {
    color: #666;
    font-size: 11px;
    margin: 2px 0;
}

.product-description {
    color: #666;
    font-size: 11px;
    margin: 4px 0;
    line-height: 1.35;
}

.product-stock {
    color: #28a745;
    font-size: 11px;
    margin: 2px 0;
}

.product-variations {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
}

.variation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}

.variation-attributes {
    font-size: 11px;
    color: #666;
}

.variation-price {
    font-size: 12px;
    color: #e83e8c;
    margin: 0 10px;
}

.add-to-cart-button {
    display: inline-block;
    padding: 5px 12px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.add-to-cart-button:hover {
    background: #0056b3;
    color: #fff;
}

.add-to-cart-button.loading {
    opacity: 0.7;
    cursor: wait;
}

.add-to-cart-button.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: button-spin 0.8s linear infinite;
}

.add-to-cart-button.added {
    background: #28a745;
}

.add-to-cart-button.added::after {
    content: "✓";
    margin-left: 5px;
}

@keyframes button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #666;
}

.error-message {
    padding: 15px;
    text-align: center;
    color: #dc3545;
}

.view-all-results {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
}

.view-all-results a {
    display: inline-block;
    padding: 8px 20px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.view-all-results a:hover {
    background: #0056b3;
}

.gazelle-search-categories {
    padding: 12px 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}
.gazelle-search-results-inner > .gazelle-search-categories:first-child {
    border-top: none;
}
.gazelle-search-categories-title {
    font-weight: 600;
    margin: 0 0 8px;
    font-size: 13px;
    color: #333;
}
.gazelle-search-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gazelle-search-categories-list li {
    margin: 4px 0;
}
.gazelle-search-categories-list a {
    color: #2271b1;
    text-decoration: none;
}
.gazelle-search-categories-list a:hover {
    text-decoration: underline;
}

.gazelle-search-products {
    padding: 0;
    border-top: 1px solid #eee;
    background: #fff;
}
.gazelle-search-results-inner > .gazelle-search-products:first-child {
    border-top: none;
}
.gazelle-search-products-title {
    font-weight: 600;
    margin: 0 0 8px;
    font-size: 13px;
    color: #333;
}

.gazelle-loader {
    display: none;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    gap: 8px;
    z-index: 10;
}

/* Hide icons during search loading so "Searching..." is visible */
.gazelle-search-form.gazelle-search-loading .gazelle-voice-btn,
.gazelle-search-form.gazelle-search-loading .gazelle-search-submit,
.gazelle-search-form.gazelle-search-loading .gazelle-overlay-close,
.gazelle-search-form.gazelle-search-loading .gazelle-overlay-close:hover,
.gazelle-search-form.gazelle-search-loading .gazelle-overlay-close:focus {
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

.gazelle-loader::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.gazelle-loader-text {
    display: none; /* Only show loader icon, no "Searching..." text */
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* ========== Mobile Overlay (full-screen search) ========== */
.gazelle-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: #fff;
    flex-direction: column;
    overflow: hidden;
}

.gazelle-mobile-overlay.gazelle-overlay-open {
    display: flex !important;
}

.gazelle-mobile-overlay .gazelle-overlay-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    gap: 12px;
}

.gazelle-mobile-overlay .gazelle-overlay-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

.gazelle-mobile-overlay .gazelle-overlay-close .gazelle-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.gazelle-mobile-overlay .gazelle-overlay-close:hover,
.gazelle-mobile-overlay .gazelle-overlay-close:focus {
    color: #2271b1;
}

.gazelle-mobile-overlay .gazelle-search-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.gazelle-mobile-overlay .gazelle-overlay-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 16px 16px;
}

.gazelle-mobile-overlay .gazelle-overlay-header .search-input-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.gazelle-mobile-overlay .gazelle-overlay-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: none;
    outline: none;
    background: #f5f5f5;
    border-radius: 8px;
}

.gazelle-mobile-overlay .gazelle-search-results,
.gazelle-mobile-overlay .gazelle-overlay-results {
    position: relative !important;
    top: 0 !important;
    flex: 1;
    min-height: 0;
    max-height: none;
    margin-top: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile: icon-only layout - hide full bar, show icon trigger */
.gazelle-mobile-icon-only .gazelle-search-form {
    display: none;
}

.gazelle-mobile-icon-only .gazelle-mobile-icon-trigger {
    display: flex !important;
}

.gazelle-mobile-icon-trigger {
    display: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}

.gazelle-mobile-icon-trigger:hover,
.gazelle-mobile-icon-trigger:focus {
    color: #2271b1;
}

.gazelle-mobile-icon-trigger .search-icon {
    width: 24px;
    height: 24px;
}

/* Desktop: hide mobile icon trigger */
@media (min-width: 769px) {
    .gazelle-mobile-icon-trigger {
        display: none !important;
    }
    
    .gazelle-mobile-icon-only .gazelle-search-form {
        display: block !important;
    }
}