.feedback-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-section h3 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  color: #333;
  text-align: center;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: auto auto auto auto auto;
  gap: 15px;
}

.feedback-stars {
  grid-column: 1 / span 5;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-stars label {
  font-weight: 600;
  color: #333;
}

.feedback-name {
  grid-column: 1 / span 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-email {
  grid-column: 3 / span 3;
  grid-row: 2;
  flex-direction: column;
  gap: 8px;
}

.feedback-comment {
  grid-column: 1 / span 5;
  grid-row: 3 / span 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-submit-container {
  grid-column: 2 / span 3;
  grid-row: 5;
  display: flex;
  justify-content: center;
}

.feedback-name label,
.feedback-email label,
.feedback-comment label {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.feedback-name input,
.feedback-email input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-name input:focus,
.feedback-email input:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.star-rating {
  display: flex;
  gap: 8px;
  flex-direction: row-reverse;
  justify-content: left;
}

.star-rating input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.star-rating label {
  cursor: pointer;
  font-size: 2rem;
  color: #ddd;
  transition: color 0.2s ease, transform 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: #ffc107;
}

.star-rating label:hover {
  transform: scale(1.1);
}

.star-rating input:focus + label {
  outline: 2px solid #8B4513;
  outline-offset: 2px;
  border-radius: 4px;
}

.feedback-comment textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feedback-comment textarea:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.char-counter {
  text-align: right;
  font-size: 0.85rem;
  color: #666;
  margin-top: 6px;
}

.char-counter.warning {
  color: #dc3545;
}

.feedback-actions {
  margin-top: 20px;
  text-align: center;
}

.feedback-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  background: #8B4513;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.feedback-submit:hover:not(:disabled) {
  background: #6d3710;
  transform: translateY(-2px);
}

.feedback-submit:active:not(:disabled) {
  transform: translateY(0);
}

.feedback-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.feedback-submit .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.feedback-submit.loading .spinner {
  display: block;
}

.feedback-submit.loading .btn-text {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.feedback-message {
  margin-top: 15px;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.feedback-message.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.feedback-message.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.feedback-submitted {
  text-align: center;
  padding: 30px;
}

.feedback-submitted .check-icon {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 15px;
}

.feedback-submitted h4 {
  margin: 0 0 10px;
  color: #333;
}

.feedback-submitted p {
  margin: 0;
  color: #666;
}

@media (max-width: 768px) {
  .feedback-section {
    margin: 1.5rem 1rem;
    padding: 1.25rem;
    border-radius: 10px;
  }

  .feedback-section h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
  }

  .feedback-grid {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
  }

  .feedback-stars {
    gap: 0.5rem;
  }

  .feedback-stars label {
    font-size: 0.85rem;
  }

  .star-rating {
    justify-content: flex-start;
    gap: 0.375rem;
  }

  .star-rating label {
    font-size: 1.75rem;
    padding: 0;
  }

  .feedback-name,
  .feedback-email,
  .feedback-comment {
    gap: 0.375rem;
  }

  .feedback-name label,
  .feedback-email label,
  .feedback-comment label {
    font-size: 0.85rem;
  }

  .feedback-name input,
  .feedback-email input {
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  .feedback-comment textarea {
    min-height: 90px;
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  .char-counter {
    font-size: 0.75rem;
    margin-top: 0.25rem;
  }

  .feedback-submit-container {
    margin-top: 0.25rem;
  }

  .feedback-submit {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 6px;
  }

  .feedback-message {
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
  }

  .feedback-submitted {
    padding: 1.5rem;
  }

  .feedback-submitted .check-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .feedback-submitted h4 {
    font-size: 1rem;
  }

  .feedback-submitted p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .feedback-section {
    margin: 1rem 0.75rem;
    padding: 1rem;
    border-radius: 8px;
  }

  .feedback-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .feedback-grid {
    gap: 0.75rem;
  }

  .feedback-stars label {
    font-size: 0.8rem;
  }

  .star-rating label {
    font-size: 1.5rem;
  }

  .feedback-name label,
  .feedback-email label,
  .feedback-comment label {
    font-size: 0.8rem;
  }

  .feedback-name input,
  .feedback-email input {
    padding: 0.5rem 0.625rem;
    font-size: 0.85rem;
  }

  .feedback-comment textarea {
    min-height: 80px;
    padding: 0.5rem 0.625rem;
    font-size: 0.85rem;
  }

  .char-counter {
    font-size: 0.7rem;
  }

  .feedback-submit {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }

  .feedback-message {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .feedback-submitted {
    padding: 1.25rem;
  }

  .feedback-submitted .check-icon {
    font-size: 1.75rem;
  }

  .feedback-submitted h4 {
    font-size: 0.9rem;
  }

  .feedback-submitted p {
    font-size: 0.8rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .feedback-section {
    max-width: 700px;
    margin: 30px auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .star-rating label,
  .feedback-submit,
  .feedback-text textarea {
    transition: none;
  }

  .feedback-submit .spinner {
    animation: none;
  }
}
