/**
 * Trust & Safety Module Styles
 * Clean, modern styling for trust & safety components
 */

/* Support Chat Widget */
#support-chat-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand, #1e90ff);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(30, 144, 255, 0.4);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#support-chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(30, 144, 255, 0.5);
}

#support-chat-widget {
  position: fixed;
  bottom: 90px;
  right: 2rem;
  width: 380px;
  max-width: calc(100vw - 4rem);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#support-chat-widget.active {
  display: flex;
}

.support-chat-header {
  background: var(--brand, #1e90ff);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

#support-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

#support-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.support-tabs {
  display: flex;
  border-bottom: 1px solid #e6ecf8;
  background: #f8fbff;
}

.support-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: #6b7a99;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.support-tab.active {
  color: var(--brand, #1e90ff);
  border-bottom-color: var(--brand, #1e90ff);
  background: white;
}

.support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #fafbfc;
}

.support-message {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--brand, #1e90ff);
}

.support-message.resolved {
  border-left-color: #45b26b;
}

.support-message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.support-message-header strong {
  flex: 1;
  font-size: 0.9rem;
}

.support-message-type {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: #eef5ff;
  color: var(--brand, #1e90ff);
  border-radius: 4px;
}

.support-message-date {
  font-size: 0.75rem;
  color: #888;
}

.support-admin-response {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e6ecf8;
  font-size: 0.85rem;
  color: #4a5b79;
}

.support-empty {
  text-align: center;
  color: #888;
  padding: 2rem;
}

.support-form {
  padding: 1rem;
  border-top: 1px solid #e6ecf8;
  background: white;
}

.support-form input,
.support-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d4dcee;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.support-form textarea {
  resize: vertical;
  min-height: 80px;
}

.support-form button {
  width: 100%;
  padding: 0.75rem;
  background: var(--brand, #1e90ff);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.support-form button:hover {
  background: #1873cc;
}

/* Safety Warning Banner */
.safety-warning-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff3cd;
  border-bottom: 2px solid #ffc107;
  color: #856404;
  padding: 1rem 1.5rem;
  text-align: center;
  z-index: 2000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.safety-warning-banner.show {
  transform: translateY(0);
}

/* Rating Display */
.rating-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.rating-average {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--brand, #1e90ff);
}

.rating-stars {
  font-size: 1.5rem;
  color: #f5c150;
  letter-spacing: 2px;
}

.rating-count {
  font-size: 0.9rem;
  color: #6b7a99;
}

/* Review Form */
#review-form {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.rating-stars-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.rating-star {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: transform 0.1s ease;
  background: none;
  border: none;
  padding: 0;
}

.rating-star:hover {
  transform: scale(1.2);
}

.rating-star.active {
  color: #f5c150;
}

#review-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e8f5;
  border-radius: 12px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  margin-bottom: 1rem;
}

#review-form button {
  width: 100%;
  padding: 0.75rem;
  background: var(--brand, #1e90ff);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Review List */
.review-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e6ecf8;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.review-rating {
  color: #f5c150;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.report-review-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.report-review-btn:hover {
  opacity: 1;
}

.review-comment {
  color: #2a3350;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.review-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #888;
}

.no-reviews {
  text-align: center;
  color: #888;
  padding: 2rem;
}

/* Verification Badge */
.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.verification-badge.verified {
  background: #e3f2fd;
  color: #1976d2;
}

.verification-badge.pending {
  background: #fff3e0;
  color: #f57c00;
}

/* Safety Tips Component */
.safety-tips {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid #c8dcff;
}

.safety-tips.compact {
  padding: 1rem;
  background: #f0f7ff;
}

.safety-tips h3 {
  margin-top: 0;
  color: #102542;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.safety-tips ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.safety-tips li {
  padding: 0.5rem 0;
  color: #2a3350;
  display: flex;
  align-items: start;
  gap: 0.5rem;
}

.safety-tips li:before {
  content: "✓";
  color: #45b26b;
  font-weight: bold;
}

/* Admin Panel Styles */
.admin-panel {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e6ecf8;
  margin-bottom: 2rem;
}

.admin-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: #6b7a99;
  transition: all 0.2s ease;
}

.admin-tab.active {
  color: var(--brand, #1e90ff);
  border-bottom-color: var(--brand, #1e90ff);
}

.admin-content {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-review-item {
  border: 1px solid #e6ecf8;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.admin-review-item.reported {
  border-color: #ff6b6b;
  background: #fff5f5;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-btn.approve {
  background: #45b26b;
  color: white;
}

.admin-btn.reject {
  background: #ff6b6b;
  color: white;
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  #support-chat-widget {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 80px;
    height: calc(100vh - 100px);
  }
  
  .rating-summary {
    font-size: 0.9rem;
  }
  
  .rating-average {
    font-size: 2rem;
  }
  
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .admin-tab {
    flex: 1;
    min-width: 120px;
  }
}

