/**
 * Consultation Detail Page (Tư Vấn Chi Tiết) Styles
 * Custom styles for the consultation detail page
 * Primary color: Red (#c0392b)
 */

/* Page Wrapper */
.consultation-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Page Header */
.consultation-header {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #ff6b5b 100%);
  color: white;
  padding: 40px 30px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(192, 57, 43, 0.25);
  position: relative;
  overflow: hidden;
}

.consultation-header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.consultation-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.consultation-header .subtitle {
  font-size: 15px;
  opacity: 0.95;
  line-height: 1.7;
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.consultation-header .ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: #c0392b;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  border: none;
  font-size: 15px;
  position: relative;
  z-index: 10;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.consultation-header .ask-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* QA List */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Question Card */
.qa-card {
  background: white;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
  overflow: hidden;
  transition: all 0.3s ease;
}

.qa-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border-color: #d0d0d0;
}

/* Question Section */
.question-section {
  padding: 25px;
  border-bottom: 1px solid #f0f0f0;
}

.question-title {
  color: #c0392b;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 12px;
}

.question-title i {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
}

.question-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.question-meta i {
  color: #c0392b;
}

.question-content {
  color: #444;
  font-size: 15px;
  line-height: 1.7;
  /* Removed left padding - no indentation */
}

/* Answer Section */
.answer-section {
  background: #fdf8f7;
  padding: 25px;
}

.answer-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.doctor-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.doctor-info h4 {
  color: #c0392b;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.doctor-info span {
  color: #888;
  font-size: 13px;
}

.answer-content {
  color: #333;
  font-size: 15px;
  line-height: 1.8;
  max-height: 150px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.answer-content.expanded {
  max-height: none;
}

.answer-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, #fdf8f7);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.answer-content.expanded::after {
  opacity: 0;
}

.toggle-answer-btn {
  background: none;
  border: none;
  color: #c0392b;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 15px;
  padding: 8px 0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.toggle-answer-btn:hover {
  color: #e74c3c;
}

.toggle-answer-btn i {
  transition: transform 0.3s ease;
}

.toggle-answer-btn.expanded i {
  transform: rotate(180deg);
}

/* QA Card Footer */
.qa-card-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 15px 5px 15px;
}

/* Ask Question Button in Card */
.qa-card-ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.25);
  cursor: pointer;
  border: none;
  font-size: 14px;
}

.qa-card-ask-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192, 57, 43, 0.35);
  background: linear-gradient(135deg, #e74c3c, #ff6b5b);
}

.qa-card-ask-btn i {
  font-size: 13px;
}

/* Ask Button Fixed */
.ask-question-fixed {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  border: none;
}

.ask-question-fixed:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(231, 76, 60, 0.5);
}

/* Question Modal */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.question-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.question-modal h3 {
  color: #c0392b;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.question-modal input,
.question-modal textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.question-modal input:focus,
.question-modal textarea:focus {
  border-color: #c0392b;
  outline: none;
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

.question-modal textarea {
  min-height: 120px;
  resize: vertical;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.button-group button {
  flex: 1;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-btn {
  background: #f5f5f5;
  border: none;
  color: #666;
}

.cancel-btn:hover {
  background: #e8e8e8;
}

.submit-btn {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  border: none;
  color: white;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #e74c3c, #ff6b5b);
  box-shadow: 0 4px 15px rgba(192, 57, 43, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.empty-state i {
  font-size: 60px;
  color: #ddd;
  margin-bottom: 20px;
}

.empty-state h3 {
  color: #666;
  font-size: 18px;
  margin-bottom: 10px;
}

.empty-state p {
  color: #999;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .consultation-header {
    padding: 30px 20px;
  }

  .consultation-header h1 {
    font-size: 22px;
  }

  .question-section,
  .answer-section {
    padding: 20px;
  }

  .question-title {
    font-size: 15px;
  }

  .question-meta {
    gap: 12px;
  }

  .ask-question-fixed {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
  }
}
