/* ===============================================
   VREYA - CSS RECENSIONI COMPLETO
   Sistema recensioni funzionale e responsive
   =============================================== */

/* ===============================================
   STATISTICHE RECENSIONI
   =============================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 24px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 90, 61, 0.1);
}

.stat-item.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-item.pending .stat-number {
    color: #f59e0b;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-secondary);
}

/* ===============================================
   RECENSIONI DA COMPLETARE
   =============================================== */
.pending-count {
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.pending-reviews {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pending-review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pending-review-item:hover {
    background: #fde68a;
    border-color: #d97706;
}

.review-service-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.service-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

.service-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

.service-provider {
    font-size: 14px;
    color: var(--color-secondary);
    margin: 0 0 4px 0;
}

.service-date {
    font-size: 12px;
    color: var(--color-secondary);
    margin: 0;
}

.review-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-review {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.btn-review:hover {
    background: var(--color-dark);
    transform: translateY(-1px);
}

/* ===============================================
   FILTRI RECENSIONI
   =============================================== */
.filters-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.filters-left {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: white;
    color: var(--color-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

/* ===============================================
   LISTA RECENSIONI COMPLETATE
   =============================================== */
.count-badge {
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.review-item {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.review-item:hover {
    box-shadow: 0 4px 12px rgba(45, 90, 61, 0.1);
    border-color: var(--color-primary);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.review-service {
    flex: 1;
}

.review-service h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

.provider-name {
    font-size: 14px;
    color: var(--color-secondary);
    margin: 0 0 8px 0;
}

.review-stars {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #fbbf24;
    font-size: 16px;
    letter-spacing: 2px;
}

.rating-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-secondary);
}

.review-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-secondary);
    white-space: nowrap;
}

.review-content {
    margin-bottom: 16px;
}

.review-content p {
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    padding: 16px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 4px solid var(--color-primary);
}

.review-response {
    margin-top: 16px;
    padding: 16px;
    background: rgba(45, 90, 61, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.response-header strong {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
}

.response-date {
    color: var(--color-secondary);
    font-size: 12px;
}

.review-response p {
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    background: transparent;
    padding: 0;
    border: none;
    font-style: normal;
}

/* ===============================================
   LOAD MORE
   =============================================== */
.load-more {
    text-align: center;
    margin-top: 24px;
}

.btn-load-more {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
}

/* ===============================================
   MODAL RECENSIONE
   =============================================== */
.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-modal.active {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8fafc;
    color: var(--color-text);
}

.modal-body {
    padding: 0 24px 24px 24px;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 24px;
}

.service-info img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.service-info-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

.service-info-details p {
    font-size: 14px;
    color: var(--color-secondary);
    margin: 0;
}

/* ===============================================
   RATING SYSTEM - STELLE INTERATTIVE
   =============================================== */
.rating-section {
    margin-bottom: 24px;
    text-align: center;
}

.rating-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 16px 0;
}

.stars-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    cursor: pointer;
}

.stars-container.large {
    gap: 12px;
}

.star {
    font-size: 24px;
    color: #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.stars-container.large .star {
    font-size: 32px;
}

.star:hover,
.star.active {
    color: #fbbf24;
    transform: scale(1.1);
}

.stars-container[data-rating="1"] .star:nth-child(-n+1),
.stars-container[data-rating="2"] .star:nth-child(-n+2),
.stars-container[data-rating="3"] .star:nth-child(-n+3),
.stars-container[data-rating="4"] .star:nth-child(-n+4),
.stars-container[data-rating="5"] .star:nth-child(-n+5) {
    color: #fbbf24;
}

.rating-text {
    font-size: 14px;
    color: var(--color-secondary);
    margin: 0;
    font-weight: 500;
}

/* ===============================================
   COMMENT SECTION
   =============================================== */
.comment-section {
    margin-bottom: 24px;
}

.comment-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 12px 0;
}

#reviewComment {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    transition: all 0.3s ease;
}

#reviewComment:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.char-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

#charCount {
    font-size: 12px;
    color: var(--color-secondary);
    font-weight: 500;
}

#charCount.warning {
    color: #f59e0b;
}

#charCount.danger {
    color: #ef4444;
}

/* ===============================================
   MODAL ACTIONS
   =============================================== */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.btn-cancel {
    background: transparent;
    color: var(--color-secondary);
    border: 1px solid var(--color-border);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: var(--color-secondary);
}

.btn-submit {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover:not(:disabled) {
    background: var(--color-dark);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: var(--color-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===============================================
   NOTIFICHE SISTEMA
   =============================================== */
#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    max-width: 350px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    border-left-color: #10b981;
}

.notification.error {
    border-left-color: #ef4444;
}

.notification.info {
    border-left-color: #3b82f6;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

.notification-message {
    font-size: 13px;
    color: var(--color-secondary);
    margin: 0;
    line-height: 1.4;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 1024px) {
    .filters-left {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .filters-left {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pending-review-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .review-actions {
        width: 100%;
    }

    .btn-review {
        width: 100%;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .review-item {
        padding: 16px;
    }

    .service-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .stars-container.large .star {
        font-size: 28px;
    }

    #notificationContainer {
        left: 20px;
        right: 20px;
        top: 20px;
    }

    .notification {
        max-width: none;
    }
}