/* =====================================================
   Features Batch 2 - Styles
   Reviews, Vendor Profiles, Verified Badges, Payouts
   Dark theme with purple accents
   ===================================================== */

/* =====================================================
   1. STAR RATINGS & REVIEWS
   ===================================================== */

/* Star display */
.stars-display {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stars-display .star {
  font-size: 16px;
  color: #333;
  transition: color 0.2s;
}

.stars-display .star.filled {
  color: #FFD700;
}

.stars-display .star.half {
  background: linear-gradient(90deg, #FFD700 50%, #333 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stars-display .rating-text {
  margin-left: 6px;
  font-size: 14px;
  color: #aaa;
}

/* Star rating input */
.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.star-rating-input input[type="radio"] {
  display: none;
}

.star-rating-input label {
  font-size: 28px;
  color: #444;
  cursor: pointer;
  transition: color 0.2s, transform 0.15s;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
  color: #FFD700;
  transform: scale(1.1);
}

/* Review card */
.review-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.3s;
}

.review-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-meta {
  flex: 1;
}

.review-username {
  font-weight: 600;
  color: #e0e0e0;
  font-size: 14px;
}

.review-date {
  font-size: 12px;
  color: #777;
}

.review-title {
  font-weight: 600;
  font-size: 16px;
  color: #e0e0e0;
  margin-bottom: 8px;
}

.review-comment {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
}

/* Vendor response */
.vendor-response {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid #8B5CF6;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin-top: 14px;
}

.vendor-response-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #8B5CF6;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vendor-response-text {
  color: #bbb;
  font-size: 14px;
  line-height: 1.5;
}

/* Review summary / breakdown */
.review-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.review-summary-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.review-avg-score {
  text-align: center;
  min-width: 100px;
}

.review-avg-number {
  font-size: 48px;
  font-weight: 700;
  color: #FFD700;
  line-height: 1;
}

.review-avg-stars {
  margin-top: 6px;
}

.review-avg-count {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

/* Star breakdown bars */
.review-breakdown {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breakdown-label {
  font-size: 13px;
  color: #aaa;
  min-width: 50px;
  text-align: right;
}

.breakdown-bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6, #FFD700);
  border-radius: 5px;
  transition: width 0.5s ease;
  min-width: 0;
}

.breakdown-count {
  font-size: 13px;
  color: #777;
  min-width: 30px;
}

/* Review form */
.review-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.review-form h3 {
  color: #e0e0e0;
  margin-bottom: 16px;
  font-size: 18px;
}

.review-form input[type="text"],
.review-form textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  color: #e0e0e0;
  font-size: 14px;
  margin-bottom: 12px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.review-form input[type="text"]:focus,
.review-form textarea:focus {
  border-color: #8B5CF6;
  outline: none;
}

.review-form textarea {
  min-height: 100px;
  resize: vertical;
}

.review-form .btn-submit-review {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}

.review-form .btn-submit-review:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Product card rating */
.product-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.product-card-rating .star {
  color: #FFD700;
  font-size: 13px;
}

.product-card-rating .rating-value {
  font-size: 13px;
  color: #aaa;
  font-weight: 500;
}

/* =====================================================
   2. VENDOR PROFILE PAGE
   ===================================================== */

.vendor-profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.vendor-profile-header {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 32px;
}

.vendor-profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 36px;
  flex-shrink: 0;
  border: 3px solid rgba(139, 92, 246, 0.4);
  overflow: hidden;
}

.vendor-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vendor-profile-info {
  flex: 1;
}

.vendor-profile-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.vendor-profile-name h1 {
  font-size: 28px;
  font-weight: 700;
  color: #e0e0e0;
  margin: 0;
}

.vendor-profile-bio {
  color: #999;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 600px;
}

.vendor-profile-join-date {
  font-size: 13px;
  color: #666;
}

.vendor-profile-join-date i {
  margin-right: 4px;
}

.vendor-profile-stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.vendor-stat-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 10px;
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
}

.vendor-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #8B5CF6;
}

.vendor-stat-label {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.vendor-profile-actions {
  margin-top: 18px;
}

.btn-contact-vendor {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-contact-vendor:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.vendor-products-section {
  margin-top: 32px;
}

.vendor-products-section h2 {
  color: #e0e0e0;
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.vendor-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .vendor-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .vendor-profile-bio {
    max-width: 100%;
  }

  .vendor-profile-stats {
    justify-content: center;
  }

  .review-summary-header {
    flex-direction: column;
    align-items: center;
  }
}

/* =====================================================
   3. VERIFIED VENDOR BADGE
   ===================================================== */

.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
  position: relative;
}

.verified-badge::after {
  content: '\2713';
  font-weight: 700;
}

.verified-badge-lg {
  width: 28px;
  height: 28px;
  font-size: 15px;
}

.verified-badge-sm {
  width: 16px;
  height: 16px;
  font-size: 9px;
}

.verified-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.verified-badge:hover .verified-tooltip {
  opacity: 1;
}

/* Vendor name with badge inline */
.vendor-name-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Admin panel verify button */
.btn-verify-vendor {
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #8B5CF6;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-verify-vendor:hover {
  background: rgba(139, 92, 246, 0.15);
}

.btn-verify-vendor.verified {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED);
  color: #fff;
  border-color: transparent;
}

/* =====================================================
   4. PAYOUT SYSTEM
   ===================================================== */

/* Payout dashboard */
.payout-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.payout-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.payout-stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: #8B5CF6;
}

.payout-stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #e0e0e0;
}

.payout-stat-card .stat-value.text-green {
  color: #22C55E;
}

.payout-stat-card .stat-value.text-yellow {
  color: #EAB308;
}

.payout-stat-card .stat-value.text-purple {
  color: #8B5CF6;
}

.payout-stat-card .stat-label {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Payout request form */
.payout-request-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
}

.payout-request-form h3 {
  color: #e0e0e0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payout-method-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.payout-method-tab {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 8px;
  color: #aaa;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.payout-method-tab:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.payout-method-tab.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: #8B5CF6;
  color: #e0e0e0;
}

.payout-method-tab i {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
  color: #8B5CF6;
}

.payout-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payout-form-fields input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  color: #e0e0e0;
  font-size: 14px;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.payout-form-fields input:focus {
  border-color: #8B5CF6;
  outline: none;
}

.payout-form-fields label {
  font-size: 13px;
  color: #aaa;
  margin-bottom: -6px;
}

.payout-min-info {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

.btn-request-payout {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.2s, box-shadow 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-request-payout:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-request-payout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Payout history table */
.payout-history {
  margin-top: 28px;
}

.payout-history h3 {
  color: #e0e0e0;
  margin-bottom: 16px;
}

.payout-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

.payout-table th {
  background: rgba(139, 92, 246, 0.1);
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.payout-table td {
  padding: 14px 16px;
  color: #ccc;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payout-table tr:hover td {
  background: rgba(139, 92, 246, 0.05);
}

/* Payout status badges */
.payout-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.payout-status.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #EAB308;
}

.payout-status.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.payout-status.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.payout-status.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

/* Admin payout actions */
.payout-admin-actions {
  display: flex;
  gap: 6px;
}

.btn-payout-approve {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22C55E;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-payout-approve:hover {
  background: rgba(34, 197, 94, 0.25);
}

.btn-payout-reject {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-payout-reject:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-payout-paid {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3B82F6;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-payout-paid:hover {
  background: rgba(59, 130, 246, 0.25);
}

/* Payout details expand */
.payout-details-toggle {
  background: none;
  border: none;
  color: #8B5CF6;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.payout-details-toggle:hover {
  background: rgba(139, 92, 246, 0.1);
}

.payout-details-expand {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #aaa;
}

.payout-details-expand dt {
  color: #777;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.payout-details-expand dt:first-child {
  margin-top: 0;
}

.payout-details-expand dd {
  color: #ccc;
  margin: 2px 0 0 0;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.text-muted-b2 {
  color: #777;
}

.text-purple-b2 {
  color: #8B5CF6;
}

.text-gold-b2 {
  color: #FFD700;
}

.mt-sm-b2 { margin-top: 8px; }
.mt-md-b2 { margin-top: 16px; }
.mt-lg-b2 { margin-top: 24px; }
.mb-sm-b2 { margin-bottom: 8px; }
.mb-md-b2 { margin-bottom: 16px; }

.flex-center-b2 {
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-b2 {
  text-align: center;
  padding: 48px 20px;
  color: #666;
}

.empty-state-b2 i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #444;
}

.empty-state-b2 p {
  font-size: 15px;
}

/* Responsive payout table */
@media (max-width: 768px) {
  .payout-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .payout-table {
    display: block;
    overflow-x: auto;
  }

  .payout-method-tabs {
    flex-direction: column;
  }

  .vendor-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .payout-dashboard {
    grid-template-columns: 1fr;
  }

  .vendor-profile-stats {
    flex-direction: column;
    align-items: stretch;
  }
}
