/**
 * Enhanced Reviews CSS for Island Park Idaho Theme
 * UPDATED: Fixed content section star centering and half star rendering
 */

/* ===== REVIEW STARS SHARED - ENHANCED HALF STAR SUPPORT ===== */
.cabin-review-stars__icons,
.cabin-review-card__rating {
  display: flex;
  gap: 2px;
  align-items: center;
}

.star-full,
.star-half,
.star-empty {
  position: relative;
  color: #E8A838;
  font-size: 16px;
  line-height: 1;
}

.star-empty {
  color: #ddd;
}

/* RELIABLE HALF STAR RENDERING - Using pseudo-element overlay */
.star-half {
  color: #ddd; /* Base empty star */
}

.star-half::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #E8A838;
}

/* ===== CABIN CARD STARS - CONTENT SECTION PLACEMENT ===== */
.cabin-review-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px;
}

.cabin-review-stars__icons {
  display: flex;
  gap: 2px;
  align-items: center;
}

.cabin-review-stars .star-full,
.cabin-review-stars .star-half,
.cabin-review-stars .star-empty {
  color: #E8A838;
  font-size: 14px;
  line-height: 1;
}

.cabin-review-stars .star-empty {
  color: #ddd;
}

.cabin-review-stars .star-half {
  color: #ddd;
  position: relative;
}

.cabin-review-stars .star-half::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: #E8A838;
}

.cabin-review-stars__score {
  color: #333;
  font-weight: 600;
  font-size: 14px;
}

.cabin-review-stars__count {
  color: #666;
  font-size: 13px;
}

/* ===== HEADER REVIEWS SUMMARY ===== */
.cabin-header__reviews {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.cabin-reviews__avg {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabin-reviews__avg-stars {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.cabin-reviews__total {
  font-size: 14px;
  color: #666;
  margin-left: 4px;
}

/* ===== REVIEW CARDS ===== */
.cabin-review-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.cabin-review-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #E8A838;
}

.cabin-review-card__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.cabin-review-card__avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #E8A838 0%, #F5C842 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.cabin-review-card__meta {
  flex: 1;
}

.cabin-review-card__name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px 0;
}

.cabin-review-card__date {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

.cabin-review-card__rating {
  margin-bottom: 0;
}

.cabin-review-card__headline {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.cabin-review-card__body {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin: 0;
}

/* ===== SOURCE BADGES ===== */
.cabin-review-card__source {
  position: absolute;
  top: 16px;
  right: 16px;
}

.review-source-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}

.review-source-badge--vrbo {
  background: #004B91;
}

.review-source-badge--airbnb {
  background: #FF5A5F;
}

.review-source-badge--booking {
  background: #003580;
}

.review-source-badge--expedia {
  background: #FFC72C;
  color: #333;
}

.review-source-badge--guesty {
  background: #6C757D;
}

/* ===== REVIEWS HEADER IN TAB ===== */
.cabin-reviews__header {
  background: linear-gradient(135deg, #FDF6E3 0%, #F9F1E1 100%);
  border: 1px solid #E8A838;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.cabin-reviews__header .cabin-reviews__avg {
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.cabin-reviews__header .cabin-reviews__avg-stars {
  font-size: 28px;
  color: #E8A838;
}

.cabin-reviews__header .cabin-review-stars__icons {
  justify-content: center;
  margin: 4px 0;
}

.cabin-reviews__header .cabin-review-stars__icons .star-full,
.cabin-reviews__header .cabin-review-stars__icons .star-half {
  font-size: 20px;
}

.cabin-reviews__header .cabin-reviews__total {
  font-size: 16px;
  color: #666;
  margin: 8px 0 0 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cabin-review-card {
    padding: 16px;
  }
  
  .cabin-review-card__avatar {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }
  
  .cabin-review-card__name {
    font-size: 15px;
  }
  
  .cabin-review-card__headline {
    font-size: 15px;
  }
  
  .cabin-review-card__body {
    font-size: 13px;
  }
  
  .cabin-reviews__header {
    padding: 16px;
  }
  
  .cabin-reviews__header .cabin-reviews__avg-stars {
    font-size: 24px;
  }
  
  .cabin-review-stars {
    padding: 6px;
    margin-bottom: 8px;
    gap: 4px;
  }
  
  .cabin-review-stars .star-full,
  .cabin-review-stars .star-half,
  .cabin-review-stars .star-empty {
    font-size: 12px;
  }
}
