/**
 * Stili per la barra di ricerca con modale Bootstrap
 */

.rc-fastsearch-modal-bar {
    position: relative;
    width: 100%;
}

.rc-fastsearch-modal-bar-container {
    position: relative;
}

.rc-fastsearch-modal-bar-input-wrapper {
    position: relative;
}

.rc-fastsearch-modal-bar-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.rc-fastsearch-modal-bar-input:focus {
    outline: none;
    border-color: #0073aa;
}


/* Modale Bootstrap custom */

#rc-fastsearch-modal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#rc-fastsearch-modal .modal-header {
    padding: 20px;
}

.rc-fastsearch-modal-searchbox {
    position: relative;
    display: flex;
    align-items: center;
}

.rc-fastsearch-modal-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.rc-fastsearch-modal-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.rc-fastsearch-modal-searchbox .btn-close {
    position: absolute;
    right: 15px;
    z-index: 0;
    opacity: 0.7;
}

.rc-fastsearch-modal-searchbox .btn-close:hover {
    opacity: 1;
}


/* Container suggerimenti */

.rc-fastsearch-suggestions-container {
    max-height: 600px;
    overflow-y: auto;
}

.rc-fastsearch-suggestions-container h6 {
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rc-fastsearch-suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rc-fastsearch-suggestion-item {
    padding: 12px 15px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #333;
}

.rc-fastsearch-suggestion-item:hover,
.rc-fastsearch-suggestion-item:focus {
    background-color: #f8f9fa !important;
    color: #0073aa;
    border-color: #e9ecef !important;
}

.rc-fastsearch-suggestion-item:last-child {
    border-bottom: none !important;
}

.rc-fastsearch-suggestion-item i {
    font-size: 14px;
}


/* Container prodotti */

.rc-fastsearch-products-container {
    max-height: 600px;
    overflow-y: auto;
}

.rc-fastsearch-product-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rc-fastsearch-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.rc-fastsearch-product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f8f9fa;
}

.rc-fastsearch-product-image-placeholder {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.rc-fastsearch-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rc-fastsearch-product-code {
    font-size: 11px;
    color: #666;
    margin: 0;
}

.rc-fastsearch-product-name {
    font-size: 14px;
    color: #333;
    margin: 8px 0;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rc-fastsearch-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #0073aa;
    margin: 0;
}


/* Stato vuoto */

#rc-fastsearch-products-empty {
    color: #666;
}


/* Responsive */

@media (max-width: 991px) {
    #rc-fastsearch-modal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    #rc-fastsearch-modal .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    #rc-fastsearch-modal .modal-body {
        height: calc(100vh - 100px);
        overflow-y: auto;
    }
    .rc-fastsearch-suggestions-container,
    .rc-fastsearch-products-container {
        max-height: none;
        height: 100%;
    }
    .rc-fastsearch-products-container .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 576px) {
    .rc-fastsearch-products-container .col-lg-3,
    .rc-fastsearch-products-container .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

#rc-fastsearch-modal {
    z-index: 99999 !important;
}

#rc-fastsearch-modal .modal-dialog {
    z-index: 100000 !important;
}


/* FIX backdrop Bootstrap (Furnob override) */

.modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.fade.show {
    opacity: 1 !important;
    z-index: 1040 !important;
}

#rc-fastsearch-modal.modal.show {
    display: block;
    z-index: 1050 !important;
}

#rc-fastsearch-modal .modal-content {
    min-height: 600px;
}