/* Dora AJAX Search Block Styles */

.dora-ajax-search-wrapper {
    position: relative;
    width: 100%;
}

.dora-search-box {
    position: relative;
    display: flex;
    height: 36px;
    align-items: center;
    background: #fff;
    border: 2px solid #E5E7EB;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.dora-search-box:focus-within {
    border-color: #999;
}

.dora-search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
}

.dora-search-input::placeholder {
    color: #000000;
}

.dora-search-icon {
    padding: 12px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s ease;
}

.dora-search-icon:hover {
    color: #000;
}

.dora-search-loading {
    padding: 12px 15px;
    background: transparent;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    color: #666;
}

.dora-spinner {
    animation: spin 0.8s linear infinite;
}

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

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

.dora-search-results-inner {
    padding: 0;
}

.dora-search-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dora-search-item {
    border-bottom: 1px solid #f0f0f0;
}

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

.dora-search-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.dora-search-link:hover {
    background-color: #f9f9f9;
}

.dora-search-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.dora-search-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    flex: 1;
    line-height: 1.4;
}

.dora-search-type {
    font-size: 11px;
    color: #fff;
    background: #666;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.dora-search-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-top: 5px;
}

.dora-search-price {
    margin-top: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dora-search-no-results,
.dora-search-error {
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.dora-search-error {
    color: #d32f2f;
}

/* Scrollbar styles */
.dora-search-results::-webkit-scrollbar {
    width: 6px;
}

.dora-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dora-search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.dora-search-results::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Editor view styles */
.dora-editor-view .dora-search-input {
    cursor: not-allowed;
    background: #f9f9f9;
}

/* Responsive */
@media (max-width: 768px) {
    .dora-ajax-search-wrapper {
        max-width: 100%;
    }
    
    .dora-search-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .dora-search-icon {
        padding: 10px 12px;
    }
    
    .dora-search-results {
        max-height: 300px;
    }
}