/* * استایل‌های ویجت جستجوی محصول رضا
 */

.reza-product-search-wrapper {
    position: relative;
    width: 100%; /* این باعث می‌شود ویجت عرض کامل ستون المنتور را بگیرد */
}

.reza-search-input-wrapper {
    position: relative;
    width: 100%;
}

.reza-search-input {
    width: 100%;
    padding: 12px 20px;
    padding-left: 50px; /* فاصله برای آیکون */
    border: 1px solid #ddd !important;
    border-radius: 8px; /* گوشه‌های گرد */
    font-size: 16px;
    box-sizing: border-box; /* برای محاسبه صحیح padding */
    transition: border-color 0.3s ease;
}

.reza-search-input:focus {
    border-color: #007cba; /* رنگ آبی وردپرس یا رنگ برند شما */
    outline: none;
    box-shadow: 0 0 5px rgba(0,124,186,.3);
}

.reza-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    pointer-events: none; /* اجازه می‌دهد کلیک از روی آن عبور کند */
}

/* لودر (Spinner) */
.reza-search-spinner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3; 
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: reza-spin 1s linear infinite;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.reza-search-spinner.is-loading {
    opacity: 1;
    visibility: visible;
}

@keyframes reza-spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* منوی کشویی نتایج */
.reza-search-results-dropdown {
    display: none; /* در ابتدا مخفی است */
    position: absolute;
    top: 100%; /* دقیقاً زیر کادر جستجو */
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.reza-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reza-result-item a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #eee;
}

.reza-result-item:last-child a {
    border-bottom: none;
}

.reza-result-item a:hover {
    background-color: #f9f9f9;
}

.reza-result-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-left: 15px; /* در فارسی margin-left برای فاصله از متن */
}

.reza-result-details {
    display: flex;
    flex-direction: column;
}

.reza-result-title {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
}

.reza-result-price {
    font-size: 14px;
    color: #008000; /* رنگ سبز برای قیمت */
}

/* پیام "موردی یافت نشد" */
.reza-no-results {
    padding: 20px 15px;
    text-align: center;
    color: #777;
    font-size: 15px;
}