/**
 * Stili pubblici del plugin Smart Retail Award
 *
 * @package    Smart_Retail_Award
 * @subpackage Smart_Retail_Award/public/css
 * @since      1.0.0
 */

/* === LINK LEGENDA === */
.sra-legenda-link-container {
    margin-left: auto;
    padding-left: 20px;
}

.sra-legenda-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sra-legenda-link:hover {
    background: #e9ecef;
    border-color: #007cba;
    color: #007cba;
    text-decoration: none;
}

.sra-legenda-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

/* === POPUP LEGENDA === */
.sra-legenda-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.sra-legenda-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sra-legenda-popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sra-legenda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.sra-legenda-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.sra-legenda-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sra-legenda-close:hover {
    background: #e9ecef;
    color: #333;
}

.sra-legenda-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.sra-legenda-section {
    margin-bottom: 30px;
}

.sra-legenda-section:last-child {
    margin-bottom: 0;
}

.sra-legenda-section h4 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
}

.sra-legenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.sra-legenda-item {
    text-align: center;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.sra-legenda-item:hover {
    border-color: #007cba;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.1);
    transform: translateY(-2px);
}

.sra-legenda-item-image {
    margin-bottom: 12px;
}

.sra-legenda-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #eee;
}

.sra-legenda-placeholder {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #666;
    font-size: 24px;
}

.sra-icon-category::before {
    content: "=�";
}

.sra-icon-special-green::before {
    content: "<1";
}

.sra-legenda-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .sra-legenda-link-container {
        margin-left: 0;
        margin-top: 10px;
        padding-left: 0;
    }
    
    .sra-legenda-popup-overlay {
        padding: 10px;
    }
    
    .sra-legenda-popup-content {
        max-height: 95vh;
    }
    
    .sra-legenda-header {
        padding: 16px 20px;
    }
    
    .sra-legenda-header h3 {
        font-size: 18px;
    }
    
    .sra-legenda-body {
        padding: 20px;
    }
    
    .sra-legenda-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }
    
    .sra-legenda-item {
        padding: 12px;
    }
    
    .sra-legenda-item-image img,
    .sra-legenda-placeholder {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .sra-legenda-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .sra-legenda-item {
        padding: 10px;
    }
    
    .sra-legenda-item-image img,
    .sra-legenda-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .sra-legenda-item-name {
        font-size: 12px;
    }
}

/* === INTEGRAZIONE CON FILTRI ESISTENTI === */
.sra-categorie-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.sra-categorie-list {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sra-categoria-item {
    margin: 0;
}

.sra-categoria-link {
    display: inline-block;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sra-categoria-link:hover,
.sra-categoria-item.active .sra-categoria-link {
    background: #007cba;
    border-color: #007cba;
    color: white;
    text-decoration: none;
}