.tmd-review-module {
  position: relative;
  clear: both;
  font-size: 14px;
  color: #444;
}

.tmd-review-header {
  margin: 12px 0 18px;
  overflow: visible;
}

.tmd-review-score {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
    margin: 0;
}

.tmd-review-header .tmd-review-score {
    align-items: flex-start;
    text-align: left;
    justify-content: start;
}

.tmd-review-header .tmd-review-score .tmd-review-average {
    font-size: 15px;
    line-height: inherit;
}

.tmd-review-average {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #222;
}

.tmd-review-score-large .tmd-review-average {
  font-size: 28px;
}

.tmd-review-stars {
  color: #f5a623;
  letter-spacing: 1px;
  white-space: nowrap;
}

.tmd-review-stars .fa-star-o {
  color: #c5c5c5;
}

.tmd-review-count,
.tmd-filter-toggle,
.tmd-write-review,
.tmd-review-submit {
  border: 0;
  cursor: pointer;
}

.tmd-review-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0;
    min-height: inherit;
    color: #333;
    font-size: 15px;
}

.tmd-review-count.is-open,
.tmd-filter-toggle.is-open {
  border-color: #1a73e8;
}

.tmd-rating-popup,
.tmd-filter-menu {
  position: absolute;
  z-index: 30;
  background: #fff;
  border: 1px solid #e3e3e3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tmd-rating-popup {
  top: calc(100% + 8px);
  left: 0;
  width: 280px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border-radius: 6px;
}

.tmd-rating-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 16px;
}

.tmd-rating-popup-row {
  display: grid;
  grid-template-columns: 80px 20px 1fr 45px;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  font-size: 13px;
}

.tmd-rating-bar {
  display: block;
  height: 8px;
  background: #ececec;
  border-radius: 8px;
  overflow: hidden;
}

.tmd-rating-bar > span {
  display: block;
  height: 100%;
  background: #1a73e8;
}

.tmd-rating-popup-pct,
.tmd-rating-popup-num {
  text-align: right;
  color: #666;
}

.tmd-review-section {
  margin: 24px 0 10px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
}

.tmd-review-summary {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.tmd-review-metrics {
	flex: 1 1 50%;
	min-width: 0;
	border: 1px solid #ddd;
	padding: 12px;
	border-radius: 4px;
	background: #fff;
}

.tmd-review-invite {
  flex: 0 0 500px;
  max-width: 500px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.tmd-review-metrics h3,
.tmd-review-invite h3,
.tmd-review-form-title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  color: #222;
}

.tmd-review-invite p {
  margin: 0 0 16px;
  color: #666;
}

.tmd-write-review,
.tmd-review-submit {
  display: inline-block;
  background: #1a73e8;
  color: #fff;
  border-radius: 4px;
  padding: 10px 45px;
  font-weight: 600;
}

.tmd-write-review {
  width: auto;
  float: right;
}

.tmd-write-review:hover,
.tmd-review-submit:hover,
.tmd-write-review:focus,
.tmd-review-submit:focus {
  background: #1558b0;
  color: #fff;
}

.tmd-review-form-wrap {
	margin-top: 18px;
	padding: 12px;
	border: 1px solid #ddd;
	max-width: 100%;
	background: #fff;
	border-radius: 4px;
}

.tmd-review-form-wrap .form-group .form-control {
    max-width: 100%;
}

.tmd-review-form .form-group {
  margin-bottom: 14px;
}

.tmd-review-form .control-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.tmd-rating-choice {
  margin-bottom: 8px;
}

.tmd-rating-type {
  display: block;
  margin-bottom: 4px;
}

.tmd-rating-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tmd-rating-scale input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tmd-rating-scale label {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 50%;
  background: #f3f3f3;
  color: #666;
  text-align: center;
  line-height: 28px;
  font-weight: 700;
  cursor: pointer;
}

.tmd-rating-scale input:checked + label,
.tmd-rating-scale label:hover {
  background: #f5a623;
  color: #fff;
}

.tmd-review-actions {
  text-align: right;
}

.tmd-review-feedback .alert {
  margin-top: 12px;
}

.tmd-review-list-head {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.tmd-review-filter {
  position: relative;
  margin-bottom: 10px;
}

.tmd-filter-toggle {
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  padding: 6px 12px;
  color: #333;
}

.tmd-filter-menu {
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-radius: 4px;
}

.tmd-filter-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 14px;
  color: #333;
}

.tmd-filter-menu button:hover,
.tmd-filter-menu button.is-active {
  background: #f3f8ff;
  color: #1a73e8;
}

.tmd-review-item {
	padding: 10px;
	border: 1px solid #ddd;
	background: #fff;
	margin: 0 0 10px;
}

.tmd-review-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding: 0 0 8px;
    margin: 0 0 8px;
}
.tmd-review-author {
  color: #222;
}

.tmd-review-title {
  margin: 8px 0 4px;
  font-size: 14px;
}

.tmd-review-text {
  margin-top: 6px;
  line-height: 1.5;
}

.tmd-review-pagination {
	margin-top: 8px;
	padding: 10px;
	border: 1px solid #ddd;
	background: #fff;
}

@media (max-width: 767px) {
  .tmd-review-summary,
  .tmd-review-invite {
    display: block;
    flex: none;
    max-width: none;
    padding: 0;
    border: 0;
  }

  .tmd-review-invite {
    margin-top: 18px;
  }

  .tmd-rating-popup {
    left: 0;
    right: auto;
  }

  .tmd-rating-popup-row {
    grid-template-columns: 78px 20px 1fr 36px;
    gap: 6px;
  }

  .tmd-review-section {
    padding: 14px;
  }
}
