/* Apple Clean Design System - Minimal & Refined */
:root {
   --apple-clean-bg: rgba(255, 255, 255, 0.95);
   --apple-clean-border: rgba(0, 0, 0, 0.08);
   --apple-clean-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
   --apple-clean-blur: blur(24px);
   --apple-radius-xl: 24px;
   --apple-radius-lg: 16px;
   --apple-radius-md: 12px;
   --apple-radius-sm: 8px;
   --apple-radius-xs: 6px;
   --apple-space-2: 2px;
   --apple-space-4: 4px;
   --apple-space-6: 6px;
   --apple-space-8: 8px;
   --apple-space-12: 12px;
   --apple-space-16: 16px;
   --apple-space-20: 20px;
   --apple-space-24: 24px;
   --apple-space-32: 32px;
   --apple-space-40: 40px;
   --apple-space-48: 48px;
   --apple-text-primary: #1d1d1f;
   --apple-text-secondary: #424245;
   --apple-text-tertiary: #6e6e73;
   --apple-text-quaternary: #86868b;
   --apple-accent-blue: #007aff;
   --apple-accent-green: #34c759;
   --apple-accent-orange: #ff9500;
   --apple-accent-red: #ff3b30;
   --apple-accent-purple: #af52de;
   --apple-clean-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.8) 100%);
   --apple-subtle-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   --apple-medium-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
   --apple-strong-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
   --apple-transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
   --apple-transition-slow: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Modal Backdrop */
.reviews-modal {
   display: none;
   position: fixed;
   z-index: 9999;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.4);
   backdrop-filter: var(--apple-clean-blur);
   -webkit-backdrop-filter: var(--apple-clean-blur);
   animation: apple-modal-fade-in 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
   padding: var(--apple-space-24);
   box-sizing: border-box;
}

.reviews-modal.active {
   display: flex;
   align-items: center;
   justify-content: center;
}

@keyframes apple-modal-fade-in {
   from {
      opacity: 0;
      backdrop-filter: blur(0px);
   }
   to {
      opacity: 1;
      backdrop-filter: var(--apple-clean-blur);
   }
}

/* Modal Content */
.reviews-modal-content {
   background: var(--apple-clean-bg);
   backdrop-filter: var(--apple-clean-blur);
   -webkit-backdrop-filter: var(--apple-clean-blur);
   border: 1px solid var(--apple-clean-border);
   border-radius: var(--apple-radius-xl);
   width: 100%;
   max-width: 800px;
   max-height: 85vh;
   overflow: hidden;
   box-shadow: var(--apple-clean-shadow);
   animation: apple-modal-slide-up 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
   position: relative;
   display: flex;
   flex-direction: column;
}

@keyframes apple-modal-slide-up {
   from {
      transform: translateY(50px) scale(0.95);
      opacity: 0;
   }
   to {
      transform: translateY(0) scale(1);
      opacity: 1;
   }
}

/* Header */
.reviews-modal-header {
   background: var(--apple-clean-gradient);
   color: var(--apple-text-primary);
   padding: var(--apple-space-32) var(--apple-space-40);
   position: relative;
   border-radius: var(--apple-radius-xl) var(--apple-radius-xl) 0 0;
   border-bottom: 1px solid var(--apple-clean-border);
}

.reviews-header-content {
   display: flex;
   justify-content: space-between;
   align-items: center;
   gap: var(--apple-space-16);
}

.reviews-modal-header h3 {
   margin: 0;
   font-size: 28px;
   font-weight: 700;
   color: white;
   letter-spacing: -0.02em;
   line-height: 1.2;
}

.verified-educators-badge {
   display: inline-flex;
   align-items: center;
   gap: var(--apple-space-8);
   background: var(--apple-accent-blue);
   color: white;
   padding: var(--apple-space-6) var(--apple-space-12);
   border-radius: var(--apple-radius-sm);
   font-size: 13px;
   font-weight: 600;
   box-shadow: var(--apple-subtle-shadow);
   transition: var(--apple-transition);
}

.verified-educators-badge:hover {
   transform: translateY(-1px);
   box-shadow: var(--apple-medium-shadow);
}

.verified-educators-badge i {
   font-size: 16px;
}

.reviews-close {
   position: absolute;
   top: var(--apple-space-24);
   right: var(--apple-space-24);
   background: transparent;
   color: var(--apple-text-tertiary);
   font-size: 18px;
   font-weight: 400;
   cursor: pointer;
   width: 40px;
   height: 40px;
   border-radius: var(--apple-radius-md);
   display: flex;
   align-items: center;
   justify-content: center;
   transition: var(--apple-transition);
   line-height: 1;
}

.reviews-close:hover {
   background: rgba(0, 0, 0, 0.05);
   color: var(--apple-text-secondary);
   transform: scale(1.05);
}

/* Body */
.reviews-modal-body {
   padding: var(--apple-space-32);
   overflow-y: auto;
   flex: 1;
   scrollbar-width: thin;
   scrollbar-color: var(--apple-text-tertiary) transparent;
}

.reviews-modal-body::-webkit-scrollbar {
   width: 6px;
}

.reviews-modal-body::-webkit-scrollbar-track {
   background: transparent;
}

.reviews-modal-body::-webkit-scrollbar-thumb {
   background: var(--apple-text-tertiary);
   border-radius: 3px;
}

.reviews-modal-body::-webkit-scrollbar-thumb:hover {
   background: var(--apple-text-secondary);
}

/* Review Items */
.review-item {
   background: rgba(255, 255, 255, 0.8);
   border: 1px solid var(--apple-clean-border);
   border-radius: var(--apple-radius-lg);
   padding: var(--apple-space-24);
   margin-bottom: var(--apple-space-24);
   transition: var(--apple-transition);
   box-shadow: var(--apple-medium-shadow);
   position: relative;
   overflow: hidden;
}

.review-item:last-child {
   margin-bottom: 0;
}

.review-item:hover {
   transform: translateY(-1px);
   box-shadow: var(--apple-strong-shadow);
   border-color: rgba(0, 0, 0, 0.12);
}

.review-item::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 3px;
   background: var(--apple-gradient-primary);
   opacity: 0.8;
}

/* Review Header */
.review-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: var(--apple-space-20);
   padding-bottom: var(--apple-space-16);
   border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.review-stars {
   color: #ff9500;
   font-size: 18px;
   letter-spacing: 2px;
   filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.review-date {
   color: var(--apple-text-secondary);
   font-size: 14px;
   font-weight: 500;
   background: rgba(0, 0, 0, 0.05);
   padding: var(--apple-space-4) var(--apple-space-12);
   border-radius: var(--apple-radius-xs);
}

/* User Info */
.review-user-info {
   display: flex;
   align-items: flex-start;
   gap: var(--apple-space-16);
   margin-bottom: var(--apple-space-20);
}

.review-avatar {
   flex-shrink: 0;
}

.avatar-initials {
   width: 56px;
   height: 56px;
   border-radius: 50%;
   background: var(--apple-gradient-secondary);
   color: white;
   display: flex;
   align-items: center;
   justify-content: center;
   font-weight: 700;
   font-size: 18px;
   box-shadow: var(--apple-shadow-medium);
   border: 2px solid rgba(255, 255, 255, 0.8);
   transition: var(--apple-transition);
}

.review-user-details {
   flex: 1;
   min-width: 0;
}

.review-author-info {
   margin-bottom: var(--apple-space-8);
}

.review-author {
   color: var(--apple-text-primary);
   font-weight: 600;
   font-size: 18px;
   display: block;
   margin-bottom: var(--apple-space-4);
   line-height: 1.3;
}

/* Review Meta */
.review-meta {
   display: flex;
   align-items: center;
   gap: var(--apple-space-12);
   font-size: 14px;
   flex-wrap: wrap;
}

.review-plan {
   padding: var(--apple-space-6) var(--apple-space-12);
   border-radius: var(--apple-radius-xs);
   font-weight: 600;
   font-size: 12px;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   box-shadow: var(--apple-shadow-subtle);
}

/* Plan-specific styling */
.review-plan.plan-enterprise {
   background: linear-gradient(135deg, #6366f1, #8b5cf6);
   color: white;
   border: 1px solid rgba(139, 92, 246, 0.3);
}

.review-plan.plan-educator {
   background: linear-gradient(135deg, #059669, #10b981);
   color: white;
   border: 1px solid rgba(16, 185, 129, 0.3);
}

.review-plan.plan-professional {
   background: linear-gradient(135deg, #dc2626, #ef4444);
   color: white;
   border: 1px solid rgba(239, 68, 68, 0.3);
}

.review-location {
   color: var(--apple-text-secondary);
   font-weight: 500;
   display: flex;
   align-items: center;
   gap: var(--apple-space-4);
}

.post-purchase {
   display: inline-flex;
   align-items: center;
   gap: var(--apple-space-6);
   background: linear-gradient(135deg, #fef3c7, #fde68a);
   color: #92400e;
   padding: var(--apple-space-6) var(--apple-space-12);
   border-radius: var(--apple-radius-xs);
   font-size: 12px;
   font-weight: 600;
   border: 1px solid #f59e0b;
   box-shadow: var(--apple-shadow-subtle);
   transition: var(--apple-transition);
}

.post-purchase:hover {
   transform: translateY(-1px);
   box-shadow: var(--apple-shadow-medium);
}

.post-purchase i {
   font-size: 14px;
}

/* Review Text */
.review-text {
   color: var(--apple-text-primary);
   font-size: 16px;
   line-height: 1.6;
   margin: 0;
   font-weight: 400;
   opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
   .reviews-modal {
      padding: var(--apple-space-16);
   }

   .reviews-modal-content {
      max-width: 100%;
      max-height: 95vh;
   }

   .reviews-modal-header {
      padding: var(--apple-space-20);
   }

   .reviews-header-content {
      flex-direction: column;
      align-items: flex-start;
      gap: var(--apple-space-12);
   }

   .reviews-modal-header h3 {
      font-size: 24px;
   }

   .verified-educators-badge {
      font-size: 13px;
      padding: var(--apple-space-6) var(--apple-space-12);
   }

   .reviews-close {
      top: var(--apple-space-16);
      right: var(--apple-space-16);
      width: 40px;
      height: 40px;
      font-size: 18px;
   }

   .reviews-modal-body {
      padding: var(--apple-space-20);
   }

   .review-item {
      padding: var(--apple-space-20);
      margin-bottom: var(--apple-space-16);
   }

   .review-header {
      margin-bottom: var(--apple-space-16);
      padding-bottom: var(--apple-space-12);
   }

   .review-stars {
      font-size: 16px;
   }

   .review-date {
      font-size: 13px;
      padding: var(--apple-space-4) var(--apple-space-8);
   }

   .review-user-info {
      gap: var(--apple-space-12);
      margin-bottom: var(--apple-space-16);
   }

   .avatar-initials {
      width: 48px;
      height: 48px;
      font-size: 16px;
   }

   .review-author {
      font-size: 16px;
   }

   .review-meta {
      gap: var(--apple-space-8);
      font-size: 13px;
   }

   .review-plan,
   .post-purchase {
      font-size: 11px;
      padding: var(--apple-space-4) var(--apple-space-8);
   }

   .review-text {
      font-size: 15px;
      line-height: 1.5;
   }
}

@media (max-width: 480px) {
   .reviews-modal {
      padding: var(--apple-space-8);
   }

   .reviews-modal-header {
      padding: var(--apple-space-16);
   }

   .reviews-modal-header h3 {
      font-size: 20px;
   }

   .review-item {
      padding: var(--apple-space-16);
   }

   .avatar-initials {
      width: 44px;
      height: 44px;
      font-size: 14px;
   }

   .review-author {
      font-size: 15px;
   }
}

