/* ---------------------------------- */
/* Left rating summary styles */
/* ---------------------------------- */
.rating-summary-container {
  gap: 24px;
}

.average-rating-box{
  border: 0px !important;
}

.average-rating-box h2 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  color: #f6ad55;
}

.average-rating-box .ph-fill.ph-star,
.average-rating-box .ph-fill.ph-star-half {
  font-size: 1.5rem;
  margin-right: 4px;
  vertical-align: middle;
  color: #f6ad55;
}

.star-rating-counts .star-bar-row {
  gap: 12px;
  align-items: center;
}

.star-rating-counts .star-label {
  width: 90px;
  display: flex;
  justify-content: flex-start;
  gap: 2px;
}

.star-rating-counts .star-label i.ph-fill.ph-star {
  font-size: 1rem;
  color: #f6ad55;
}

.star-rating-counts .bar-container {
  height: 14px;
  background-color: #f3f3f3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.star-rating-counts .bar-fill {
  height: 100%;
  background-color: #f6ad55;
  border-radius: 8px 0 0 8px;
  transition: width 0.4s ease-in-out;
}

.star-rating-counts .star-count {
  font-weight: 600;
  color: #555;
  user-select: none;
  min-width: 32px;
  text-align: right;
  font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 991.98px) {
  .rating-summary-container {
    flex-direction: column !important;
  }
  .average-rating-box,
  .star-rating-counts {
    max-width: 100% !important;
    min-width: auto !important;
  }
  .average-rating-box {
    padding: 32px !important;
  }
  .star-rating-counts {
    margin-left: 10px !important;
    padding-right: 10px !important;
  }
  .star-rating-counts .star-label {
    width: 80px;
    justify-content: flex-start;
  }
  .star-rating-counts .bar-container {
    height: 12px;
  }
  .star-rating-counts .star-count {
    width: 28px;
    font-size: 0.85rem;
  }
}

@media (max-width: 575.98px) {
  .average-rating-box h2 {
    font-size: 2.5rem;
  }
  .average-rating-box .ph-fill.ph-star,
  .average-rating-box .ph-fill.ph-star-half {
    font-size: 1.25rem;
  }
  .star-rating-counts .star-label i.ph-fill.ph-star {
    font-size: 0.85rem;
  }
  .star-rating-counts .bar-container {
    height: 10px;
  }
  .star-rating-counts .star-count {
    width: 24px;
    font-size: 0.8rem;
  }
}

/* ---------------------------------- */
/* Button styles */
.rating-comp-open-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  background-color: #3498db; 
  border: none;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.rating-comp-open-btn:hover,
.rating-comp-open-btn:focus {
  background-color: #2980b9;
  outline: none;
}

@media (max-width: 479px) {
  .rating-comp-open-btn {
    width: 100%;
    text-align: center;
    padding: 12px 0;
    font-size: 1.1rem;
  }
}

/* ---------------------------------- */
/* Comment blocks */
.d-flex.align-items-start {
  padding-left: 10px;
  padding-right: 10px;
  /* optional: */
  word-break: break-word;
}

.text-gray-700 {
  white-space: pre-wrap;
  /* allow newlines */
}

button.rating-modal-close-btn {
    position: absolute;
    top: 8px;
    right: 16px;
    background-color: transparent;
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    user-select: none;
    transition: color 0.2s ease;
    z-index: 1051;
  }
  button.rating-modal-close-btn:hover,
  button.rating-modal-close-btn:focus {
    color: #aaa;
    outline: none;
  }