/* File: assets/css/reviews.css
   Purpose: Page-specific styles for reviews.php
*/

/* (1) Overall page background and container */
body {
  background-color: #f9f6e8; /* Light cream, matching site theme */
  font-family: 'Karla', sans-serif;
  margin: 0;
  padding: 0;
}

.review-page-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* (2) Submission Form Card */
.review-form-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease-out;
}
.review-form-card h2 {
  text-align: center;
  color: #800000; /* Maroon heading */
  font-size: 2rem;
  margin-bottom: 1px; /* Slightly closer to stars */
}

/* (3) Alert Messages */
.message-alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin: 1rem 0;
  font-size: 0.95rem;
  text-align: center;
}
.message-alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.message-alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* (4) ★★★★★ Radio-Based Star Rating ★★★★★ */
.star-rating {
  direction: rtl;             /* Flip order so CSS sibling rules work */
  display: inline-flex;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem auto;  /* Center horizontally, space below */
}
.star-rating input {
  display: none;              /* Hide actual radio inputs */
}
.star-rating label {
  cursor: pointer;
  color: #ccc;                /* Gray by default */
  padding: 0 5px;
  transition: color 0.2s ease;
}
/* On hover: fill hovered star and all to its left */
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #FF9933;             /* Orange */
}
/* When a radio is checked: fill that star + all to its left */
.star-rating input:checked ~ label {
  color: #FF9933;
}

/* (5) Textarea Styling */
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-height: 120px;
  font-size: 1rem;
  margin-bottom: 1rem;
  resize: vertical;
}

/* (6) Submit Button */
button.submit-review {
  background: #FF9933;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  display: block;
  margin: 0 auto;           /* Center the button */
}
button.submit-review:hover {
  background: #e68a00;
  transform: translateY(-2px);
}

/* (7) Existing Reviews List */
.reviews-list h2 {
  font-size: 1.75rem;
  color: #800000;            /* Maroon heading */
  text-align: center;
  margin-bottom: 1rem;
}
.review-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.6s ease-out;
}
.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.review-header .author {
  font-weight: 700;
  color: #333;
  margin-right: 1rem;
}
.review-header .stars {
  display: flex;
}
.review-header .stars i {
  color: #FF9933;
  margin-right: 4px;
  font-size: 1.25rem;
}
.review-header .date {
  margin-left: auto;
  font-size: 0.9rem;
  color: #777;
}
.review-comment {
  color: #555;
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* (8) Fade-In Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* (9) Responsive Adjustments */
@media (max-width: 600px) {
  .star-rating label {
    font-size: 1.75rem;
  }
  .review-header .author {
    font-size: 0.9rem;
  }
  .review-header .stars i {
    font-size: 1rem;
  }
  .review-header .date {
    font-size: 0.8rem;
  }
}
