/* Updated CSS for better mobile support */
.review-summary-container {
    position: relative;
    display: inline-block;
}

.review-summary-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.review-summary-trigger:hover {
    background-color: #f5f5f5;
}

.review-summary-trigger .stars {
    color: #ff9800;
}

.review-summary-trigger .rating-text {
    font-weight: bold;
    color: #333;
}

.review-summary-trigger .review-count {
    color: #666;
}

.review-summary-trigger .toggle-icon {
    color: #666;
    font-size: 12px;
    transition: transform 0.3s;
}

.review-summary-trigger.active .toggle-icon {
    transform: rotate(180deg);
}

.review-summary-box {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background: #fff;
    width: 300px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .review-summary-box {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        width: 90vw !important;
        max-width: 400px !important;
        margin: 0 !important;
        padding: 20px !important;
        border: none !important;
        border-radius: 12px !important;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
        transform: translate(-50%, -50%) scale(0.9);
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
        z-index: 9999 !important;
        box-sizing: border-box;
        opacity: 0;
    }
    
    .review-summary-box.show {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    
    /* Full-screen backdrop */
    .review-summary-container.mobile-active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        z-index: 9998;
        backdrop-filter: blur(2px);
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    
    .review-summary-container.mobile-active.show::before {
        opacity: 1;
    }
    
    /* Ensure container doesn't constrain the modal */
    .review-summary-container {
        position: static;
    }
    
    .review-summary-container.mobile-active {
        position: relative;
        z-index: 10000;
    }
    
    /* Override any parent container constraints */
    body.modal-open {
        overflow: hidden;
    }
}

/* Alternative mobile layout - dropdown style */
@media (max-width: 480px) {
    .review-summary-box {
        width: 95vw !important;
        max-width: none !important;
        max-height: 85vh;
    }
}

.review-summary-header {
    margin-bottom: 20px;
}

.average-rating {
    margin-bottom: 5px;
}

.average-rating .stars {
    color: #ff9800;
    margin-right: 10px;
}

.average-rating .stars .filled {
    color: #ff9800;
}

.average-rating .stars i {
    font-size: 14px;
}

.rating-text {
    font-size: 18px;
    font-weight: bold;
}

.total-ratings {
    color: #666;
    font-size: 14px;
}

.rating-distribution {
    margin-bottom: 15px;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.star-label {
    width: 50px;
    color: #0066c0;
    text-decoration: none;
}

.bar-container {
    flex: 1;
    height: 18px;
    background: #f0f0f0;
    margin: 0 10px;
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #ff9800;
    transition: width 0.3s ease;
}

.percentage {
    width: 40px;
    text-align: right;
    color: #666;
}

.review-link {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.see-reviews {
    color: #0066c0;
    text-decoration: none;
    font-size: 14px;
}

.see-reviews:hover {
    text-decoration: underline;
}


.review-controls {
	background: #f9f9f9;
	padding: 20px;
	border-radius: 4px;
	margin-bottom: 20px;
  }
  
  .review-item {
	margin-bottom: 20px;
  }
  
  .review-header {
	margin-bottom: 15px;
  }
  
  .reviewer-info .stars {
	margin-bottom: 5px;
  }
  
  .reviewer-info .stars i {
	color: #ff9800;
  }
  
  .reviewer-name {
	margin: 5px 0;
	font-size: 16px;
	font-weight: bold;
  }
  
  .review-content {
	margin: 15px 0;
	line-height: 1.6;
  }
  
  .review-actions {
	border-top: 1px solid #eee;
	padding-top: 15px;
  }
  
  .review-date {
	font-size: 12px;
  }
  
  .label-success {
	background-color: #5cb85c;
  }
  
  @media (max-width: 768px) {
	.review-controls .form-inline .form-group {
	  margin-bottom: 10px;
	}
	
	.review-controls .text-right {
	  text-align: left !important;
	  margin-top: 10px;
	}
	
	.review-actions .text-right {
	  text-align: left !important;
	  margin-top: 10px;
	}
	
	.review-actions .btn-group {
	  display: block;
	  width: 100%;
	}
	
	.review-actions .btn {
	  display: inline-block;
	  margin-right: 5px;
	  margin-bottom: 5px;
	}
  }


  