/**
 * CSS per Widget Recensioni
 * Stili responsive e temi personalizzabili
 */

/* Assicura che i Dashicons siano caricati correttamente */
.dashicons {
    font-family: dashicons !important;
    display: inline-block;
    line-height: 1;
    font-weight: normal;
    font-style: normal;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 20px;
    height: 20px;
    font-size: 20px;
    vertical-align: top;
    text-align: center;
    transition: color 0.1s ease-in;
}

/* ===== STILI BASE ===== */
.widget-recensioni-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.widget-recensioni-container * {
    box-sizing: border-box;
}

/* ===== HEADER DEL WIDGET ===== */
.widget-recensioni-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
}

.widget-recensioni-nome {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.widget-recensioni-rating-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.widget-recensioni-stars {
    display: flex;
    gap: 2px;
}

.stella {
    font-size: 18px;
    display: inline-block;
    line-height: 1;
    color: #ddd;
    transition: color 0.2s ease;
    /* Fallback per browser che non supportano unicode */
    font-family: serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.stella-piena {
    color: #ffc107;
}

.stella-mezza {
    background: linear-gradient(90deg, #ffc107 50%, #ddd 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.widget-recensioni-rating-numero {
    font-weight: 600;
    color: #666;
    font-size: 0.95em;
}

.widget-recensioni-indirizzo {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.9em;
    margin-top: 8px;
}

.widget-recensioni-indirizzo .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===== LISTA RECENSIONI ===== */
.widget-recensioni-lista {
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.widget-recensioni-lista::-webkit-scrollbar {
    width: 6px;
}

.widget-recensioni-lista::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.widget-recensioni-lista::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.widget-recensioni-lista::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.widget-recensione-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.widget-recensione-item:last-child {
    border-bottom: none;
}

.widget-recensione-item:hover {
    background-color: #fafafa;
}

/* ===== HEADER RECENSIONE ===== */
.widget-recensione-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.widget-recensione-autore {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.widget-recensione-foto {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.widget-recensione-foto-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #9E8585;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.widget-recensione-info {
    min-width: 0;
    flex: 1;
}

.widget-recensione-nome {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-recensione-rating {
    display: flex;
    gap: 1px;
}

.widget-recensione-rating .stella {
    font-size: 14px;
}

.widget-recensione-data {
    color: #666;
    font-size: 0.85em;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===== TESTO RECENSIONE ===== */
.widget-recensione-testo {
    color: #333;
    line-height: 1.5;
    margin: 12px 0;
    word-wrap: break-word;
}

.widget-recensione-link {
    margin-top: 10px;
}

.widget-recensione-link a {
    color: #9E8585;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

.widget-recensione-link a:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.widget-recensioni-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.widget-recensioni-google-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9E8585;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.widget-recensioni-google-link:hover {
    color: #7A6666;
    text-decoration: none;
}

.widget-recensioni-google-link .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===== STATI SPECIALI ===== */
.widget-recensioni-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.widget-recensioni-nessuna {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.widget-recensioni-nessuna p {
    margin: 0;
    font-style: italic;
}

/* ===== LOADING ===== */
.widget-recensioni-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.widget-recensioni-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #9E8585;
    border-radius: 50%;
    animation: widget-recensioni-spin 1s linear infinite;
}

@keyframes widget-recensioni-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.widget-recensioni-loading p {
    margin: 0;
    color: #666;
    font-weight: 500;
}

/* ===== TEMA SCURO ===== */
.widget-recensioni-container[data-tema="scuro"] {
    background: #2c2c2c;
    border-color: #404040;
    color: #ffffff;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-header {
    background: #333333;
    border-bottom-color: #404040;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-nome {
    color: #ffffff;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-rating-numero,
.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-indirizzo {
    color: #cccccc;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensione-item {
    border-bottom-color: #404040;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensione-item:hover {
    background-color: #383838;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensione-nome {
    color: #ffffff;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensione-data {
    color: #cccccc;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensione-testo {
    color: #e0e0e0;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-footer {
    background: #333333;
    border-top-color: #404040;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-lista::-webkit-scrollbar-track {
    background: #404040;
}

.widget-recensioni-container[data-tema="scuro"] .widget-recensioni-lista::-webkit-scrollbar-thumb {
    background: #666666;
}

/* ===== TEMA MINIMAL ===== */
.widget-recensioni-container[data-tema="minimal"] {
    border: none;
    box-shadow: none;
    background: transparent;
}

.widget-recensioni-container[data-tema="minimal"] .widget-recensioni-header {
    background: transparent;
    border-bottom: 2px solid #e1e1e1;
    padding: 15px 0;
}

.widget-recensioni-container[data-tema="minimal"] .widget-recensione-item {
    padding: 15px 0;
}

.widget-recensioni-container[data-tema="minimal"] .widget-recensioni-footer {
    background: transparent;
    border-top: 1px solid #e1e1e1;
    padding: 15px 0;
}

/* ===== RECENSIONI GLOBALI ===== */

/* Container principale */
.widget-recensioni-globali-container {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

/* Header globale */
.widget-recensioni-globali-header {
    background: linear-gradient(135deg, #9E8585, #7A6666);
    color: white;
    padding: 25px;
    text-align: center;
}

.widget-recensioni-globali-titolo {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

/* Lista globale */
.widget-recensioni-globali-lista {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.widget-recensione-globale-item {
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.widget-recensione-globale-item:hover {
    box-shadow: 0 4px 15px rgba(158, 133, 133, 0.15);
    transform: translateY(-2px);
}

.widget-recensione-globale-item:last-child {
    margin-bottom: 0;
}

/* Badge appartamento */
.widget-appartamento-badge {
    background: #9E8585;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 15px;
}

.widget-appartamento-badge .badge-icon {
    font-size: 1.1em;
}

.widget-appartamento-badge .badge-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.widget-appartamento-badge .stella-mini {
    font-size: 12px;
    color: #ffc107;
}

.widget-appartamento-badge .rating-num {
    font-size: 0.9em;
    font-weight: 700;
}

/* Header recensione globale */
.widget-recensione-globale-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

/* Grid globale */
.widget-recensioni-globali-grid-container {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

.widget-recensioni-globali-grid-header {
    background: linear-gradient(135deg, #9E8585, #7A6666);
    color: white;
    padding: 25px;
    text-align: center;
}

.widget-recensioni-globali-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

.widget-recensione-globale-card {
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.widget-recensione-globale-card:hover {
    box-shadow: 0 6px 20px rgba(158, 133, 133, 0.15);
    transform: translateY(-3px);
}

.widget-appartamento-badge-top {
    background: #9E8585;
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    font-weight: 600;
}

.widget-recensione-globale-content {
    padding: 15px;
}

.widget-recensione-header-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.widget-recensione-foto-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.widget-recensione-foto-placeholder-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #9E8585;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.widget-recensione-info-compact {
    flex: 1;
    min-width: 0;
}

.widget-recensione-nome-small {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    display: block;
    margin-bottom: 3px;
}

.widget-recensione-rating-small {
    display: flex;
    gap: 1px;
}

.widget-recensione-rating-small .stella-mini {
    font-size: 12px;
    color: #ffc107;
}

.widget-recensione-testo-preview {
    margin-bottom: 12px;
}

.widget-recensione-testo-preview p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #555;
}

.widget-recensione-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-expand-btn {
    background: #9E8585;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.widget-expand-btn:hover {
    background: #7A6666;
    transform: scale(1.05);
}

.widget-expand-btn .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.widget-recensione-date-small {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

/* Footer globale */
.widget-recensioni-globali-footer {
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    padding: 15px 25px;
    text-align: center;
}

/* Modal per recensioni globali */
.widget-review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.widget-review-modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* Assicuriamoci che sia perfettamente centrato */
    box-sizing: border-box;
}

.widget-review-modal .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* Centraggio perfetto */
    margin: auto;
    position: relative;
}

.widget-review-modal.active .modal-content {
    transform: scale(1);
}

.widget-review-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e1e1;
    background: #9E8585;
    color: white;
    border-radius: 12px 12px 0 0;
}

.widget-review-modal .modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.widget-review-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.widget-review-modal .modal-body {
    padding: 25px;
}

.modal-appartamento-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

body.modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .widget-recensioni-globali-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .widget-recensione-globale-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Fix per mobile - assicuriamoci che gli elementi non escano */
    .widget-appartamento-badge {
        max-width: 100%;
        font-size: 0.8em;
        padding: 6px 12px;
        flex-wrap: wrap;
    }
    
    .widget-appartamento-badge .badge-text {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .widget-recensione-autore {
        width: 100%;
        max-width: 100%;
    }
    
    .widget-recensione-info {
        flex: 1;
        min-width: 0; /* Importante per il text-overflow */
    }
    
    .widget-recensione-nome {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
@media (max-width: 768px) {
    .widget-recensioni-container {
        border-radius: 6px;
    }
    
    .widget-recensioni-header {
        padding: 15px;
    }
    
    .widget-recensioni-nome {
        font-size: 1.3em;
    }
    
    .widget-recensione-item {
        padding: 15px;
    }
    
    .widget-recensione-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .widget-recensione-autore {
        width: 100%;
    }
    
    .widget-recensione-data {
        align-self: flex-end;
        white-space: normal;
    }
    
    .widget-recensioni-footer {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .widget-recensioni-header {
        padding: 12px;
    }
    
    .widget-recensioni-nome {
        font-size: 1.2em;
    }
    
    .widget-recensione-item {
        padding: 12px;
    }
    
    .widget-recensioni-rating-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .widget-recensioni-footer {
        padding: 10px 12px;
    }
    
    .widget-recensioni-google-link {
        font-size: 0.85em;
    }
}

/* ===== ACCESSIBILITÀ ===== */
@media (prefers-reduced-motion: reduce) {
    .widget-recensioni-spinner {
        animation: none;
    }
    
    .widget-recensione-item,
    .stella,
    .widget-recensioni-google-link {
        transition: none;
    }
}

/* ===== MOBILE EXTRA PICCOLO ===== */
@media (max-width: 480px) {
    .widget-appartamento-badge {
        font-size: 0.75em;
        padding: 4px 8px;
        border-radius: 15px;
    }
    
    .widget-appartamento-badge .badge-text {
        max-width: 120px;
    }
    
    .widget-recensione-nome {
        font-size: 0.9em;
        max-width: 150px;
    }
    
    .widget-recensione-data {
        font-size: 0.8em;
    }
    
    .widget-recensione-globale-header {
        gap: 8px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .widget-recensioni-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .widget-recensioni-google-link {
        color: #000 !important;
    }
    
    .widget-recensioni-loading {
        display: none !important;
    }
}

/* ===== LAYOUT SLIDER ===== */
.widget-recensioni-slider-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* ===== HEADER SLIDER ===== */
.widget-recensioni-slider-header {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.widget-recensioni-header-content {
    flex: 1;
    min-width: 250px;
}

.widget-recensioni-slider-header .widget-recensioni-nome {
    margin: 0 0 12px 0;
    font-size: 1.6em;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.widget-recensioni-total-reviews {
    color: #666;
    font-size: 0.9em;
    margin-left: 8px;
}

/* ===== CONTROLLI SLIDER ===== */
.widget-slider-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.widget-slider-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #9E8585;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #9E8585;
}

.widget-slider-btn:hover {
    background: #9E8585;
    color: white;
    transform: scale(1.1);
}

.widget-slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.widget-slider-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.widget-slider-dots {
    display: flex;
    gap: 8px;
}

.widget-slider-dot {
    width: 12px;
    height: 12px;
    border: none;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-slider-dot.active {
    background: #9E8585;
    transform: scale(1.2);
}

.widget-slider-dot:hover {
    background: #7A6666;
}

/* ===== SLIDER PRINCIPALE ===== */
.widget-recensioni-slider {
    overflow: hidden;
    position: relative;
}

.widget-recensioni-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

.widget-recensione-slide {
    min-width: 100%;
    padding: 0;
}

/* ===== BOX RECENSIONE ===== */
.widget-recensione-box {
    margin: 25px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.widget-recensione-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.widget-recensione-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #9E8585, #34a853, #fbbc05, #ea4335);
}

/* ===== HEADER RECENSIONE SLIDER ===== */
.widget-recensione-box .widget-recensione-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.widget-recensione-box .widget-recensione-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e1e1e1;
}

.widget-recensione-box .widget-recensione-foto-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9E8585, #34a853);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 3px solid #e1e1e1;
}

.widget-recensione-box .widget-recensione-info {
    flex: 1;
}

.widget-recensione-box .widget-recensione-nome {
    font-weight: 600;
    font-size: 1.1em;
    color: #1a1a1a;
    margin: 0 0 6px 0;
}

.widget-recensione-box .widget-recensione-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
}

.widget-recensione-box .widget-recensione-rating .stella {
    font-size: 16px;
}

.widget-recensione-box .widget-recensione-data {
    color: #666;
    font-size: 0.9em;
}

/* ===== TESTO RECENSIONE SLIDER ===== */
.widget-recensione-quote {
    position: relative;
    padding: 20px 0;
    text-align: center;
}

.widget-recensione-quote p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
    margin: 0;
    font-style: italic;
    position: relative;
    z-index: 2;
}

.quote-icon {
    font-size: 3em;
    color: #e1e1e1;
    font-family: serif;
    position: absolute;
    z-index: 1;
}

.quote-icon:first-child {
    top: 0;
    left: 0;
}

.quote-icon.quote-close {
    bottom: 0;
    right: 0;
    transform: rotate(180deg);
}

/* ===== BADGE VERIFICATO ===== */
.widget-recensione-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
    padding: 8px 12px;
    background: #f0f8ff;
    border-radius: 20px;
    font-size: 0.85em;
    color: #4285f4;
    font-weight: 500;
    justify-content: center;
}

.widget-recensione-badge .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===== INDICATORE TOUCH ===== */
.widget-slider-touch-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(158, 133, 133, 0.1);
    color: #9E8585;
    font-size: 0.85em;
}

.widget-slider-touch-indicator .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===== AUTOPLAY CONTROLS ===== */
.widget-slider-autoplay {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
}

.widget-autoplay-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #9E8585;
    color: #9E8585;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

.widget-autoplay-toggle:hover {
    background: #9E8585;
    color: white;
}

.widget-autoplay-toggle .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.widget-autoplay-progress {
    flex: 1;
    height: 4px;
    background: #e1e1e1;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #9E8585;
    width: 0%;
    transition: width 0.1s linear;
}

/* ===== FOOTER SLIDER ===== */
.widget-recensioni-slider-container .widget-recensioni-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.widget-recensioni-slider-container .widget-recensioni-indirizzo {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #666;
    font-size: 0.9em;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state .dashicons {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty-state p {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.empty-state small {
    color: #999;
}

/* ===== TEMI SLIDER ===== */

/* Tema Scuro */
.widget-recensioni-slider-container[data-tema="scuro"] {
    background: #2c2c2c;
    border-color: #404040;
    color: #ffffff;
}

.widget-recensioni-slider-container[data-tema="scuro"] .widget-recensioni-slider-header {
    background: linear-gradient(135deg, #333333, #404040);
    border-bottom-color: #404040;
}

.widget-recensioni-slider-container[data-tema="scuro"] .widget-recensioni-nome {
    color: #ffffff;
}

.widget-recensioni-slider-container[data-tema="scuro"] .widget-recensione-box {
    background: #383838;
    border-color: #505050;
}

.widget-recensioni-slider-container[data-tema="scuro"] .widget-recensione-quote p {
    color: #e0e0e0;
}

.widget-recensioni-slider-container[data-tema="scuro"] .widget-recensioni-footer {
    background: #333333;
    border-top-color: #404040;
}

/* Tema Minimal */
.widget-recensioni-slider-container[data-tema="minimal"] {
    border: none;
    box-shadow: none;
    background: transparent;
}

.widget-recensioni-slider-container[data-tema="minimal"] .widget-recensioni-slider-header {
    background: transparent;
    border-bottom: 2px solid #e1e1e1;
}

.widget-recensioni-slider-container[data-tema="minimal"] .widget-recensione-box {
    border: 1px solid #e1e1e1;
    box-shadow: none;
}

.widget-recensioni-slider-container[data-tema="minimal"] .widget-recensioni-footer {
    background: transparent;
    border-top: 1px solid #e1e1e1;
}

/* ===== RESPONSIVE SLIDER ===== */
@media (max-width: 768px) {
    .widget-recensioni-slider-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 20px;
    }
    
    .widget-slider-controls {
        justify-content: center;
    }
    
    .widget-slider-btn {
        width: 36px;
        height: 36px;
    }
    
    .widget-recensione-box {
        margin: 15px;
        padding: 20px;
    }
    
    .widget-recensione-box .widget-recensione-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .widget-slider-touch-indicator {
        display: flex;
    }
    
    .widget-slider-autoplay {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .widget-recensioni-slider-header {
        padding: 15px;
    }
    
    .widget-recensioni-nome {
        font-size: 1.3em;
    }
    
    .widget-recensione-box {
        margin: 10px;
        padding: 15px;
    }
    
    .widget-slider-controls {
        gap: 10px;
    }
    
    .widget-slider-btn {
        width: 32px;
        height: 32px;
    }
    
    .widget-slider-dot {
        width: 10px;
        height: 10px;
    }
    
    .quote-icon {
        font-size: 2em;
    }
}

/* ===== ANIMAZIONI SLIDER ===== */
@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.widget-recensione-slide.slide-in-right {
    animation: slide-in-right 0.5s ease;
}

.widget-recensione-slide.slide-in-left {
    animation: slide-in-left 0.5s ease;
}

/* ===== ACCESSIBILITY SLIDER ===== */
@media (prefers-reduced-motion: reduce) {
    .widget-recensioni-track {
        transition: none;
    }
    
    .widget-recensione-slide {
        animation: none !important;
    }
    
    .widget-slider-btn,
    .widget-slider-dot,
    .widget-recensione-box {
        transition: none;
    }
}

/* ===== FOCUS STYLES ===== */
.widget-slider-btn:focus,
.widget-slider-dot:focus,
.widget-autoplay-toggle:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* ===== TOUCH GESTURES ===== */
@media (hover: none) and (pointer: coarse) {
    .widget-recensioni-slider {
        touch-action: pan-x;
    }
    
    .widget-slider-touch-indicator {
        display: flex;
    }
}

/* ===== HIGH CONTRAST ===== */
@media (prefers-contrast: high) {
    .widget-recensione-box {
        border: 2px solid #000;
    }
    
    .widget-slider-btn {
        border: 2px solid #000;
    }
    
    .stella-piena {
        color: #000;
    }
}

/* ===== LAYOUT GRID (3 BOX AFFIANCATI) ===== */
.widget-recensioni-grid-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* ===== HEADER GRID ===== */
.widget-recensioni-grid-header {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e1e1e1;
    text-align: center;
}

.widget-recensioni-grid-header .widget-recensioni-nome {
    margin: 0 0 15px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.widget-recensioni-grid-header .widget-recensioni-rating-container {
    justify-content: center;
    margin-bottom: 15px;
}

/* ===== GRID PRINCIPALE ===== */
.widget-recensioni-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 25px;
    overflow-y: auto;
}

.widget-recensione-grid-item {
    position: relative;
    height: 280px;
    transition: transform 0.3s ease;
}

.widget-recensione-grid-item:hover {
    transform: translateY(-5px);
}

/* ===== CARD RECENSIONE ===== */
.widget-recensione-card {
    height: 100%;
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget-recensione-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #4285f4;
}

.widget-recensione-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4285f4, #34a853);
}

/* ===== HEADER CARD ===== */
.widget-recensione-card .widget-recensione-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.widget-recensione-card .widget-recensione-autore {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.widget-recensione-card .widget-recensione-foto {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.widget-recensione-card .widget-recensione-foto-placeholder {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.widget-recensione-card .widget-recensione-info {
    min-width: 0;
    flex: 1;
}

.widget-recensione-card .widget-recensione-nome {
    font-weight: 600;
    font-size: 0.9em;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-recensione-card .widget-recensione-rating {
    display: flex;
    gap: 1px;
}

.widget-recensione-card .widget-recensione-rating .stella {
    font-size: 12px;
}

.widget-recensione-card .widget-recensione-data {
    color: #666;
    font-size: 0.8em;
    white-space: nowrap;
}

/* ===== CONTENUTO CARD ===== */
.widget-recensione-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.widget-recensione-content p {
    color: #333;
    line-height: 1.5;
    margin: 0 0 10px 0;
    font-size: 0.9em;
    flex: 1;
}

.widget-leggi-tutto {
    background: none;
    border: none;
    color: #4285f4;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    padding: 0;
    text-decoration: underline;
    align-self: flex-start;
}

.widget-leggi-tutto:hover {
    color: #3367d6;
}

/* ===== BADGE RATING ===== */
.widget-recensione-rating-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4285f4;
    color: white;
    border-radius: 20px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.3);
}

.rating-score {
    font-size: 1.1em;
}

.rating-stars-mini {
    display: flex;
    gap: 1px;
}

.stella-mini {
    font-size: 10px;
    color: #ffffff;
}

/* ===== CARD "VEDI ALTRE" ===== */
.widget-more-reviews .more-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-more-reviews .more-card:hover {
    background: linear-gradient(135deg, #4285f4, #3367d6);
    color: white;
    border-color: #3367d6;
}

.more-content .dashicons {
    font-size: 32px;
    color: #4285f4;
    margin-bottom: 10px;
}

.widget-more-reviews .more-card:hover .more-content .dashicons {
    color: white;
}

.more-content h4 {
    margin: 0 0 5px 0;
    color: #1a1a1a;
    font-size: 1.1em;
}

.widget-more-reviews .more-card:hover .more-content h4 {
    color: white;
}

.more-content p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
}

.widget-more-reviews .more-card:hover .more-content p {
    color: rgba(255, 255, 255, 0.9);
}

.widget-view-all-btn {
    background: #4285f4;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.widget-more-reviews .more-card:hover .widget-view-all-btn {
    background: white;
    color: #4285f4;
}

/* ===== FOOTER GRID ===== */
.widget-recensioni-grid-container .widget-recensioni-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ===== RESPONSIVE GRID ===== */
@media (max-width: 992px) {
    .widget-recensioni-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }
    
    .widget-recensione-grid-item {
        height: 260px;
    }
    
    .footer-stats {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .widget-recensioni-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .widget-recensione-grid-item {
        height: 220px;
    }
    
    .widget-recensioni-grid-header {
        padding: 20px;
    }
    
    .widget-recensioni-grid-header .widget-recensioni-nome {
        font-size: 1.5em;
    }
    
    .widget-recensioni-footer {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .widget-recensioni-grid {
        padding: 10px;
    }
    
    .widget-recensione-card {
        padding: 15px;
    }
    
    .widget-recensioni-grid-header {
        padding: 15px;
    }
    
    .widget-recensioni-grid-header .widget-recensioni-nome {
        font-size: 1.3em;
    }
}

/* ===== TEMI GRID ===== */

/* Tema Scuro */
.widget-recensioni-grid-container[data-tema="scuro"] {
    background: #2c2c2c;
    border-color: #404040;
    color: #ffffff;
}

.widget-recensioni-grid-container[data-tema="scuro"] .widget-recensioni-grid-header {
    background: linear-gradient(135deg, #333333, #404040);
    border-bottom-color: #404040;
}

.widget-recensioni-grid-container[data-tema="scuro"] .widget-recensioni-nome {
    color: #ffffff;
}

.widget-recensioni-grid-container[data-tema="scuro"] .widget-recensione-card {
    background: #383838;
    border-color: #505050;
}

.widget-recensioni-grid-container[data-tema="scuro"] .widget-recensione-content p {
    color: #e0e0e0;
}

.widget-recensioni-grid-container[data-tema="scuro"] .widget-recensioni-footer {
    background: #333333;
    border-top-color: #404040;
}

/* Tema Minimal */
.widget-recensioni-grid-container[data-tema="minimal"] {
    border: none;
    box-shadow: none;
    background: transparent;
}

.widget-recensioni-grid-container[data-tema="minimal"] .widget-recensioni-grid-header {
    background: transparent;
    border-bottom: 2px solid #e1e1e1;
}

.widget-recensioni-grid-container[data-tema="minimal"] .widget-recensione-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget-recensioni-grid-container[data-tema="minimal"] .widget-recensioni-footer {
    background: transparent;
    border-top: 1px solid #e1e1e1;
}

/* ===== ANIMAZIONI GRID ===== */
@keyframes grid-item-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget-recensione-grid-item {
    animation: grid-item-in 0.5s ease forwards;
}

.widget-recensione-grid-item:nth-child(1) { animation-delay: 0.1s; }
.widget-recensione-grid-item:nth-child(2) { animation-delay: 0.2s; }
.widget-recensione-grid-item:nth-child(3) { animation-delay: 0.3s; }
.widget-recensione-grid-item:nth-child(4) { animation-delay: 0.4s; }
.widget-recensione-grid-item:nth-child(5) { animation-delay: 0.5s; }
.widget-recensione-grid-item:nth-child(6) { animation-delay: 0.6s; }

/* ===== ACCESSIBILITY GRID ===== */
@media (prefers-reduced-motion: reduce) {
    .widget-recensione-grid-item {
        animation: none;
    }
    
    .widget-recensione-card,
    .action-btn,
    .widget-more-reviews .more-card {
        transition: none;
    }
}

.action-btn:focus,
.widget-leggi-tutto:focus,
.modal-close:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* ===== MODAL STYLES ===== */
.modal-review-content {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.modal-review-content::before {
    display: none;
}

body.modal-open {
    overflow: hidden;
}