/**
 * Wine Review Styles
 * Logically structured CSS for wine reviews display
 */

/* ===== Base Containers ===== */
.wine-review-details {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
}

.wine-stats-container {
    display: flex;
    flex-wrap: wrap;
}

/* ===== Typography ===== */
.wine-review-details h4,
.wine-stats-section-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.label {
    font-weight: bold;
    min-width: 100px;
    display: inline-block;
}

/* ===== Layout Structure ===== */
/* Row Layout */
.wine-stats-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
	width: 100%;
}

.wine-stats-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Column Layout */
.wine-stats-col {
    padding: 10px;
}

.wine-stats-col-left {
    flex: 1;
    min-width: 200px;
    border-right: 1px solid #eee;
    padding: 20px;
}

.wine-stats-col-right {
    flex: 2;
    min-width: 300px;
    padding: 20px 40px;
}

/* ===== Sections ===== */
.wine-criteria, 
.wine-characteristics, 
.wine-taxonomy,
.wine-stats-section,
.wine-stats-taxonomy,
.wine-stats-characteristic {
    margin-bottom: 15px;
}

.wine-stats-section:last-child,
.wine-stats-taxonomy:last-child,
.wine-stats-characteristic:last-child {
    margin-bottom: 0;
}

.criterion, 
.characteristic {
    margin-bottom: 5px;
}

/* ===== Overall Rating Styles ===== */
.wine-stats-overall,
.wine-stats-rating {
    text-align: center;
}

.wine-stats-rating {
    flex: 1;
    min-width: 200px;
    padding: 10px;
}

.wine-stats-average,
.wine-stats-rating-number {
    font-size: 2.5em;
    font-weight: bold;
}

.wine-stats-rating-number {
    font-size: 3em;
}

.wine-stats-scale,
.wine-stats-rating-number span {
    font-size: 0.5em;
    color: #666;
}

.wine-stats-count {
    font-size: 14px;
    color: #777;
}

/* Star Rating Display */
.wine-stats-stars,
.stars {
    font-size: 24px;
    color: #fbbf24;
    margin: 10px 0;
}

.wine-stats-star-empty,
.wine-stats-stars .empty {
    opacity: 0.3;
}

.wine-stats-stars .filled {
    color: #fbbf24;
}

/* ===== Criteria Rating Styles ===== */
.wine-stats-criteria {
    flex: 2;
    min-width: 300px;
    padding: 10px;
}

.wine-stats-criterion {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.wine-stats-criterion:last-child {
    margin-bottom: 0;
}

.wine-stats-criterion-label {
    width: 100px;
    font-weight: 500;
}

.wine-stats-criterion-bar,
.wine-stats-criterion-bar-container {
    flex-grow: 1;
    margin: 0 10px;
}

.wine-stats-criterion-bar-container {
    margin: 0 15px;
}

.wine-stats-criterion-bar progress,
.wine-stats-criterion-bar-container progress {
    width: 100%;
    height: 10px;
}

.wine-stats-criterion-value {
    width: 50px;
    text-align: right;
    font-weight: 500;
}

/* ===== Wine Characteristics Scale ===== */
.wine-stats-characteristic-label,
.wine-stats-taxonomy-label {
    font-weight: 500;
    margin-bottom: 5px;
}

.wine-stats-characteristic-scale,
.scale-container {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.scale-start, 
.scale-end {
    font-size: 14px;
    color: #666;
    width: 85px;
    flex-shrink: 0;
}

.scale-end {
    text-align: right;
}

.scale-bar {
    flex-grow: 1;
    height: 10px;
    background: #eee;
    margin: 0 10px;
    border-radius: 4px;
    overflow: hidden;
}

.scale-value {
    height: 100%;
    background: #8c1812;
	border-radius: 4px;
}

.wine-stats-criterion-bar progress {
	background: #eee;
	border-radius: 4px;
	border: 0 none;
}

/* Style the progress bar value (Chrome, Safari, Opera) */
.wine-stats-criterion-bar progress::-webkit-progress-value {
  background-color: #fbbf24; /* Change this to your desired color */
  border-radius: 4px; /* Match the main element's border-radius */
}

/* Style the progress bar value (Firefox) */
.wine-stats-criterion-bar progress::-moz-progress-bar {
  background-color: #fbbf24; /* Change this to your desired color */
  border-radius: 4px;
}

/* For IE10 */
.wine-stats-criterion-bar progress {
  color: #fbbf24; /* Change this to your desired color */
}

div.wine-stats-section.wine-stats-evaluation h4.wine-stats-section-title {
	margin-bottom: 25px;
}

/* ===== Taxonomy Styles ===== */
.wine-stats-taxonomy-terms,
.wine-terms-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.wine-terms-container {
    margin-top: 20px;
    gap: 0;
}

.wine-stats-term {
    display: inline-block;
    background: #f6e8e6;
    color: #8c1812;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
}

.wine-terms-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.wine-terms-section:first-child {
    margin-right: 20px;
}

.wine-terms-heading {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.wine-terms-list {
    margin: 0;
    padding-left: 20px;
}

.wine-terms-list li {
    margin-bottom: 5px;
}

/* ===== Review Image ===== */
.review-image {
    margin-top: 15px;
}

.review-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* ===== Responsive Behavior ===== */
@media screen and (max-width: 768px) {
    .wine-stats-row {
        flex-direction: column;
    }
    
    .wine-stats-col-left {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 10px;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    
    .wine-stats-col-right {
        padding-left: 10px;
    }
}