/* Petrach Modern Search Styles */

.petrach-search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.petrach-search-form {
    position: relative;
}

.petrach-search-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.petrach-search-input-wrapper:focus-within {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.petrach-search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
}

.petrach-search-input::placeholder {
    color: #999;
}

.petrach-search-submit {
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #0073aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.petrach-search-submit:hover {
    color: #005177;
}

.petrach-search-submit svg {
    width: 20px;
    height: 20px;
}

.petrach-search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

.petrach-search-loading,
.petrach-search-error,
.petrach-search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

.petrach-search-results {
    padding: 8px 0;
}

.petrach-search-result-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

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

.petrach-search-result-item:hover,
.petrach-search-result-item.highlighted {
    background-color: #f8f8f8;
}

.petrach-search-result-item a {
    display: flex;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
}

.petrach-search-result-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.petrach-search-result-content {
    flex: 1;
    min-width: 0;
}

.petrach-search-result-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.petrach-search-result-title mark {
    background-color: #fff3cd;
    padding: 0 2px;
    font-weight: 700;
}

.petrach-search-result-description {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.petrach-search-result-description mark {
    background-color: #fff3cd;
    padding: 0 2px;
    font-weight: 600;
}

.petrach-search-result-price {
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 4px;
}

.petrach-search-result-price .price-regular {
    color: #333;
}

.petrach-search-result-price .price-sale {
    color: #d63638;
    margin-right: 8px;
}

.petrach-search-result-price .price-strikethrough {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

.petrach-search-result-rating {
    margin-top: 4px;
}

.petrach-search-stars {
    font-size: 12px;
    color: #ffb900;
}

.petrach-search-stars .star {
    display: inline-block;
}

.petrach-search-stars .star-empty {
    color: #ddd;
}

.petrach-search-see-all {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background-color: #f8f8f8;
}

.petrach-search-see-all a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.petrach-search-see-all a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .petrach-search-container {
        max-width: 100%;
    }
    
    .petrach-search-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
    
    .petrach-search-result-image {
        width: 50px;
        height: 50px;
    }
}

/* Scrollbar Styling */
.petrach-search-autocomplete::-webkit-scrollbar {
    width: 8px;
}

.petrach-search-autocomplete::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.petrach-search-autocomplete::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.petrach-search-autocomplete::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
