/* Layout 2 cột */
.cmr-rating-box {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
  }
  .cmr-left {
    width: 160px;
    text-align: center;
  }
  .cmr-title {
    font-weight: bold;
    margin-bottom: 8px;
  }
  .cmr-average {
    font-size: 48px;
    font-weight: bold;
    color: #f59e0b;
  }
  .cmr-average span {
    font-size: 24px;
  }
  .cmr-label {
    margin: 5px 0 10px;
    font-size: 16px;
    font-weight: 500;
  }
  .cmr-open-popup {
    padding: 8px 16px;
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  /* Bar chart */
  .cmr-right {
    width: 334px;
  }
  .cmr-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
  }
  .cmr-bar span {
    width: 50px;
    font-size: 14px;
  }
  .cmr-bar-track {
    flex: 1;
    height: 20px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
  }
  .cmr-bar-fill {
    height: 100%;
    background: #f59e0b;
    transition: width 0.3s ease;
  }
  .cmr-count {
    width: 24px;
    text-align: right;
  }
  
  /* Popup */
  .cmr-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  .cmr-popup-inner {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
  }
  .cmr-popup-inner h3 {
    margin-bottom: 16px;
    font-size: 18px;
  }
  .cmr-popup-inner input,
  .cmr-popup-inner textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
  }
  .cmr-popup-inner textarea {
    height: 100px;
    resize: vertical;
  }
  .cmr-popup-inner button[type="submit"] {
    background: linear-gradient(to right, #1e88e5, #42a5f5);
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 15px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
  }
  
  /* Stars input */
  .cmr-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
  }
  .cmr-stars input {
    display: none;
  }
  .cmr-stars label {
    font-size: 30px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
  }
  .cmr-stars input:checked ~ label,
  .cmr-stars label:hover,
  .cmr-stars label:hover ~ label {
    color: #f59e0b;
  }
  .cmr-star-label {
    text-align: center;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 500;
  }
  
  /* Thông báo */
  .cmr-message {
    margin-top: 10px;
    font-size: 14px;
    color: green;
  }
  
  /* Danh sách đánh giá */
  .cmr-review-list {
    margin-top: 20px;
  }
  .cmr-review-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
  }
  .cmr-stars-static {
    color: #f59e0b;
    font-size: 16px;
    margin: 4px 0;
  }
  .cmr-stars-static span {
    margin-right: 2px;
  }
  .cmr-stars-static .filled {
    color: #f59e0b;
  }
  .cmr-content {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .cmr-date {
    font-size: 12px;
    color: #777;
  }
  .cmr-star-label {
    display: block;
    min-height: 20px;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #f59e0b;
    transition: opacity 0.2s ease-in-out;
  }
  .cmr-stars input[type="radio"] {
    display: none;
  }
  #cmr-success-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    z-index: 999999 !important;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  #cmr-success-popup img {
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
  }
  
  #cmr-success-popup h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  #cmr-success-popup p {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
  }
  
  #cmr-success-popup button {
    background-color: #1e88e5;
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    width: 100%;
  }
  
  #cmr-close-success {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
  }
    
  .cmr-avatar-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
  }
  
  .cmr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ccc;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #999;
    flex-shrink: 0;
    text-transform: uppercase;
  }
  .cmr-comment-level {
    margin-left: 0;
  }
  
  .cmr-depth-1 {
    margin-left: 20px;
    border-left: 2px solid #ddd;
    padding-left: 10px;
  }
  
  .cmr-depth-2 {
    margin-left: 40px;
    border-left: 2px solid #ccc;
    padding-left: 10px;
  }
  
  .cmr-depth-3 {
    margin-left: 60px;
    border-left: 2px solid #bbb;
    padding-left: 10px;
  }
  
  /* Có thể thêm .cmr-depth-4... nếu cần sâu hơn */
  .cmr-depth-1 {
    margin-left: 20px;
    border-left: 3px solid #ccc;
    background: #f9f9f9;
    padding-left: 12px;
    border-radius: 4px;
  }
  .cmr-depth-2 {
    margin-left: 40px;
    border-left: 3px solid #bbb;
    background: #f5f5f5;
    padding-left: 12px;
    border-radius: 4px;
  }
  /* Tăng dần nếu cần */
  .cmr-role-admin strong {
    color: #d9534f;
  }
  .cmr-role-reply strong {
    color: #5bc0de;
  }
  .cmr-role-customer strong {
    color: #333;
  }
    
.cmr-hidden {
  display: none;
}
.cmr-toggle-comments {
  margin-top: 10px;
  padding: 8px 16px;
  border: none;
  background: #0073aa;
  color: white;
  cursor: pointer;
  border-radius: 4px;
}
.cmr-toggle-comments:hover {
  background: #005f8d;
}
.cmr-stars-static {
  color: #ccc; /* màu sao rỗng */
  font-size: 18px;
}
.cmr-stars-static .filled {
  color: #ffc107; /* vàng sáng */
}
.cmr-star-preview {
  display: inline-block;
  min-width: 90px;
  font-size: 16px;
  color: #ccc;
  margin-right: 8px;
}
.cmr-star-preview .filled,
.cmr-stars-static .filled {
  color: #ffc107;
}
/*sửa ảnh bình luận bé hơnhơn
*/
.cmr-media {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmr-media .cmr-thumb {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.cmr-media video.cmr-thumb {
  width: 120px;
  height: auto;
}
.cmr-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cmr-preview-item {
  position: relative;
}

.cmr-preview-item img,
.cmr-preview-item video {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.cmr-preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4d4f;
  color: #fff;
  font-size: 14px;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
}
.cmr-upload-ui {
  margin-top: 10px;
}

.cmr-upload-label {
  display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #f0f2f5;
      padding: 10px 15px;
      border-radius: 6px;
      cursor: pointer;
      border: 1px dashed #ccc;
      transition: all 0.3s ease;
      border: 1px dashed #ddd;
      border-radius: 5px;
      padding: 30px 20px;
      text-align: center;
      width: 100%;
}

.cmr-upload-label:hover {
  background-color: #e6f7ff;
  border-color: #1890ff;
}

.cmr-upload-label img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.cm-custom-rating-summary .star-rating {
  float: none;
  margin: 0;
}
.cm-review-count {
  font-size: 14px;
  color: #555;
}
