/* Enhanced Review System Styles */

/* Review Button Styles */
.review-btn {
  margin-top: 10px;
  padding: 8px 15px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.review-btn:hover {
  background: linear-gradient(135deg, #3f37c9, #6a2c91);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.review-btn.hidden {
  display: none;
}

/* Purchased Services Container */
.purchased-services-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.purchased-services-container.hidden {
  display: none;
}

.purchased-services-container h3 {
  color: #1e293b;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
}

.purchased-services-list {
  display: grid;
  gap: 12px;
}

.purchased-service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.service-info h4 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.purchase-date {
  color: #64748b;
  font-size: 0.85rem;
}

.review-service-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.review-service-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

/* Enhanced Review Form Styles */
.review-form-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 60px 0;
  margin: 40px 0;
}

.review-form-container-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.review-header-section {
  text-align: center;
  margin-bottom: 40px;
}

.form-title-main {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-description {
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 30px;
}

/* Review Form Container */
#reviewFormContainer {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  transition: all 0.3s ease;
}

#reviewFormContainer.review-form-hidden {
  display: none;
}

.form-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 25px;
  text-align: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

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

.form-group-main {
  display: flex;
  flex-direction: column;
}

.form-label-main {
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input-main {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-input-main:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea-main {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* Rating Input Styles */
.rating-group {
  display: flex;
  flex-direction: column;
}

.rating-input-main {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.rating-star-main {
  font-size: 1.5rem;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rating-star-main:hover,
.rating-star-main.hover {
  color: #fbbf24;
  transform: scale(1.1);
}

.rating-star-main.active {
  color: #f59e0b;
}

/* Form Buttons */
.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cancel-btn-main {
  padding: 12px 24px;
  background: #f3f4f6;
  color: #6b7280;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn-main:hover {
  background: #e5e7eb;
  color: #4b5563;
}

.submit-btn-main {
  padding: 12px 30px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  justify-content: center;
}

.submit-btn-main:hover:not(:disabled) {
  background: linear-gradient(135deg, #3f37c9, #6a2c91);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.submit-btn-main:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

#submitSpinnerMain {
  animation: spin 1s linear infinite;
}

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

/* Message Styles */
#messageContainerMain {
  margin-bottom: 20px;
}

.message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: 500;
}

.message-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.message-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.message-info {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Enhanced Testimonials Styles */
.testimonials-container {
  padding: 60px 0;
  background: white;
  overflow: hidden;
}

.testimonials-carousel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 20px;
}

.testimonial-card {
  flex: 0 0 350px;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.testimonial-card .stars {
  display: flex;
  gap: 3px;
  margin-bottom: 15px;
}

.testimonial-card .stars i {
  color: #d1d5db;
  font-size: 1.1rem;
}

.testimonial-card .stars i.active {
  color: #f59e0b;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 20px;
  font-style: italic;
}

.customer-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.customer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  flex-shrink: 0;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-letter {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
}

.customer-details h4 {
  margin: 0 0 5px 0;
  color: #1e293b;
  font-size: 1rem;
  font-weight: 600;
}

.service-tag {
  display: inline-block;
  background: #e0e7ff;
  color: #4338ca;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.verified-badge {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.no-reviews-message {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-reviews-message p {
  font-size: 1.1rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-title-main {
    font-size: 2rem;
  }
  
  #reviewFormContainer {
    padding: 25px;
    margin: 20px 10px;
  }
  
  .testimonial-card {
    flex: 0 0 280px;
  }
  
  .purchased-service-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .review-service-btn {
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .form-buttons {
    flex-direction: column;
  }
  
  .cancel-btn-main,
  .submit-btn-main {
    width: 100%;
    justify-content: center;
  }
}

/* Modal Styles */
.review-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.review-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.7) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.close-modal:hover {
  background: #f3f4f6;
  color: #374151;
}

.review-form {
  padding: 0 30px 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 0.85rem;
}

/* Star Rating Styles */
.star-rating {
  display: flex;
  gap: 5px;
  margin: 10px 0;
}

.star-rating .star {
  font-size: 1.8rem;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.star-rating .star:hover {
  color: #fbbf24;
  transform: scale(1.1);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cancel-btn {
  padding: 12px 24px;
  background: #f3f4f6;
  color: #6b7280;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn:hover {
  background: #e5e7eb;
  color: #4b5563;
}

.submit-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
}

.submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3f37c9, #6a2c91);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Profile Page Review Modal Specific Styles */
#profileReviewModalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Profile Review Form Enhancement */
.profile-review-modal .review-modal {
  transform: translateY(0);
  animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Write Review Button in Purchase History */
.write-review-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

.write-review-btn:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3) !important;
}

.write-review-btn:disabled {
  background: #9ca3af !important;
  cursor: not-allowed !important;
  transform: none !important;
  opacity: 0.6 !important;
}

.write-review-btn i {
  color: inherit !important;
}

/* Mobile Responsive Modal */
@media (max-width: 768px) {
  .review-modal {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header,
  .review-form {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .cancel-btn,
  .submit-btn {
    width: 100%;
    justify-content: center;
  }
  
  .star-rating .star {
    font-size: 1.5rem;
  }
  
  /* Mobile adjustments for purchase history buttons */
  .write-review-btn {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
  }
}
