/*
 * Reviews Page Styles
 * These styles are specific to the reviews page and use variables from global.css.
 */

.reviews {
  grid-template-columns: repeat(2, 1fr);
  place-items: start;
  gap: 1rem;
  padding: 2rem 0;
}

/* Review Page Container */
.reviews-page {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

textarea {
  resize: vertical;
}

/* Review Section Header */
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  gap: 1rem;
}

.rating-summary .rating-value {
  color: #fbbc04;
  font-weight: var(--fw-bold);
}

.review-header .rating-summary {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-header .star-rating {
  color: #fbbc04; /* Google star color */
  margin-bottom: -2rem;
}

.review-header .star-rating .fa-star,
.review-header .star-rating .fa-star-half-alt {
  font-size: var(--fs-sm);
}

.review-list {
  gap: 1rem;
}

.review-header .review-count {
  font-size: var(--fs-base);
  color: var(--dark-grey);
  font-weight: var(--fw-medium);
}

.review-card .review-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.review-card .review-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: var(--fs-sm);
}

.review-card .review-meta .star-rating {
  color: #fbbc04;
}

.review-card .review-meta .reviewer-name {
  font-weight: var(--fw-semibold);
}

.review-card .review-meta .review-date {
  color: var(--light-grey);
}

.review-card .review-text {
  line-height: 1.6;
  color: var(--text-primary);
}

/* Pagination/Navigation */
.review-nav {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.review-nav .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dialog and Form Styles */
dialog {
  border: none;
  padding: 2rem;
  background-color: var(--secondary-color);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  top: 50%;
  left: 50%; /* Added for horizontal centering */
  transform: translate(-50%, -50%); /* Updated to center both axes */
  position: fixed; /* Ensures it stays in place */
  z-index: 1000;
}

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.review-form .form-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.review-form .form-header h2 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--dark-grey);
}

.review-form .close-dialog-btn {
  background: none;
  border: none;
  font-size: var(--fs-2xl);
  cursor: pointer;
  color: var(--light-grey);
  transition: var(--transition-base);
}

.review-form .close-dialog-btn:hover {
  color: var(--dark-grey);
  transform: rotate(90deg);
}

.review-form .form-group {
  margin-bottom: 0.5rem;
}

.review-form label {
  font-weight: var(--fw-semibold);
  margin-bottom: 0.5rem;
  display: block;
  color: var(--dark-grey);
}

.review-form .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-grey);
  border-radius: 6px;
  font-size: var(--fs-base);
}

.review-form .form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.review-form .star-rating-input {
  display: flex;
  gap: 0.5rem;
  font-size: var(--fs-3xl);
  color: #ccc;
  cursor: pointer;
}

.review-form .star-rating-input .fas.hover,
.review-form .star-rating-input .fas.active {
  color: #fbbc04;
}

.review-form .char-count {
  display: block;
  text-align: right;
  font-size: var(--fs-sm);
  color: var(--light-grey);
  margin-top: 0.25rem;
}

.review-form .form-consent {
  gap: 0.5rem;
}

.review-form .form-consent label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: 1.4;
}

.review-form .btn-block {
  width: 100%;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .reviews {
    grid-template-columns: 1fr;
  }
  
}
