/*
  سبک‌های اصلی پلاگین کامنت برای ووکامرس - نسخه بهبود یافته
  - رنگ اصلی: #537BFF
  - رنگ تیره: #0A1939
  - پس‌زمینه سفید با گرادیان ملایم
  - سایه‌ها و انیمیشن‌های مدرن
*/

/* متغیرهای CSS برای رنگ‌های سازمانی */
:root {
  --pc-primary: #537BFF;
  --pc-dark: #0A1939;
  --pc-light: #f8faff;
  --pc-border: #e6e9ef;
  --pc-shadow: rgba(83, 123, 255, 0.1);
  --pc-shadow-hover: rgba(83, 123, 255, 0.2);
}

/* نوتیفیکیشن با طراحی مدرن */
.pc-notification-container{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 420px;
}

.pc-notification{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  margin-bottom: 12px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  animation: pc-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

@keyframes pc-slide-in {
  from {
    transform: translateX(450px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

.pc-notification-closing {
  animation: pc-slide-out 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pc-slide-out {
  to {
    transform: translateX(450px) scale(0.9);
    opacity: 0;
  }
}

.pc-notification-info{
  background: linear-gradient(135deg, var(--pc-light) 0%, #e8f2ff 100%);
  color: var(--pc-primary);
  border-right: 4px solid var(--pc-primary);
}

.pc-notification-success{
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  color: #2e7d32;
  border-right: 4px solid #4caf50;
}

.pc-notification-error{
  background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
  color: #c62828;
  border-right: 4px solid #f44336;
}

.pc-notification-warning{
  background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
  color: #ef6c00;
  border-right: 4px solid #ff9800;
}

.pc-notification-close{
  background: rgba(0,0,0,0.1);
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  padding: 6px;
  margin-left: 12px;
  line-height: 1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pc-notification-close:hover{
  opacity: 1;
  background: rgba(0,0,0,0.2);
  transform: scale(1.1);
}

/* کانتینر اصلی کامنت‌ها با طراحی مدرن */
.pc-comments-wrap{
  background: linear-gradient(135deg, #ffffff 0%, var(--pc-light) 100%);
  border: 1px solid var(--pc-border);
  padding: 24px;
  border-radius: 16px;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  color: var(--pc-dark);
  box-shadow: 0 4px 20px var(--pc-shadow);
  position: relative;
  overflow: hidden;
}

.pc-comments-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pc-primary) 0%, #7c3aed 100%);
}

/* فرم کامنت با طراحی جذاب */
.pc-comment-form{ 
  margin-bottom: 24px; 
  background: rgba(255,255,255,0.8);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(83, 123, 255, 0.1);
  backdrop-filter: blur(10px);
}

.pc-form-title{ 
  color: var(--pc-dark); 
  font-size: 20px; 
  margin-bottom: 16px; 
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.pc-form-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--pc-primary), #7c3aed);
  border-radius: 2px;
}

/* فیلدهای نام و نام‌خانوادگی کنار‌هم */
.pc-name-row{
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.pc-name-row input{
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.pc-name-row .pc_phone{
  flex: 0 0 160px;
}

/* استایل‌های مدرن برای فیلدها */
.pc-form-fields input[type="text"], 
.pc-form-fields input[type="email"], 
.pc-form-fields input[type="tel"],
.pc-form-fields textarea{
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255,255,255,0.9);
}

.pc-form-fields input:focus,
.pc-form-fields textarea:focus {
  outline: none;
  border-color: var(--pc-primary);
  box-shadow: 0 0 0 4px rgba(83, 123, 255, 0.1);
  background: #ffffff;
  transform: translateY(-1px);
}

.pc-form-fields textarea{ 
  min-height: 120px; 
  resize: vertical; 
  line-height: 1.6;
}

/* دکمه‌های مدرن با انیمیشن */
.pc-btn{
  background: linear-gradient(135deg, var(--pc-primary) 0%, #6366f1 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  margin-right: 8px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(83, 123, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.pc-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.pc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(83, 123, 255, 0.4);
}

.pc-btn:hover::before {
  left: 100%;
}

.pc-btn:active {
  transform: translateY(0);
}

.pc-comments-list{ 
  margin-top: 20px; 
}

/* کامنت‌ها با طراحی کارتی مدرن */
.pc-comment{ 
  border: 1px solid rgba(83, 123, 255, 0.1); 
  padding: 18px; 
  border-radius: 12px; 
  margin-bottom: 16px; 
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.pc-comment:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(83, 123, 255, 0.15);
  border-color: rgba(83, 123, 255, 0.2);
}

/* سطوح مختلف ریپلای با رنگ‌ها و فاصله‌های متفاوت */
.pc-comment.pc-child{ 
  background: linear-gradient(135deg, var(--pc-light) 0%, rgba(255,255,255,0.95) 100%);
  border-left: 3px solid var(--pc-primary);
}

.pc-comment.pc-level-1 {
  margin-left: 24px;
  border-left-color: var(--pc-primary);
}

.pc-comment.pc-level-2 {
  margin-left: 20px;
  border-left-color: #7c3aed;
  background: linear-gradient(135deg, #f3f4f6 0%, rgba(255,255,255,0.95) 100%);
}

.pc-comment.pc-level-3 {
  margin-left: 16px;
  border-left-color: #06b6d4;
  background: linear-gradient(135deg, #ecfdf5 0%, rgba(255,255,255,0.95) 100%);
}

.pc-comment.pc-level-4 {
  margin-left: 12px;
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, rgba(255,255,255,0.95) 100%);
}

/* کانتینرهای فرزندان با فاصله‌گذاری مناسب */
.pc-children{ 
  margin-top: 16px; 
}

.pc-level-1 {
  border-left: 2px solid rgba(83, 123, 255, 0.2);
  padding-left: 12px;
  margin-left: 8px;
}

.pc-level-2 {
  border-left: 2px solid rgba(124, 58, 237, 0.2);
  padding-left: 10px;
  margin-left: 6px;
}

.pc-level-3 {
  border-left: 2px solid rgba(6, 182, 212, 0.2);
  padding-left: 8px;
  margin-left: 4px;
}

.pc-level-4 {
  border-left: 2px solid rgba(245, 158, 11, 0.2);
  padding-left: 6px;
  margin-left: 2px;
}

/* نشان‌دهندهٔ پاسخ با طراحی جذاب */
.pc-reply-badge{
  background: linear-gradient(135deg, #e3f2fd 0%, var(--pc-light) 100%);
  color: var(--pc-primary);
  padding: 8px 12px;
  border-right: 3px solid var(--pc-primary);
  margin-bottom: 12px;
  font-size: 12px;
  border-radius: 8px;
  font-weight: 500;
  display: inline-block;
}

/* هدر کامنت */
.pc-comment-header{ 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(83, 123, 255, 0.1);
}

.pc-author{ 
  font-weight: 600; 
  color: var(--pc-dark);
  font-size: 15px;
}

.pc-date{ 
  font-size: 12px; 
  color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.pc-comment-body{ 
  color: var(--pc-dark); 
  line-height: 1.6;
  font-size: 14px;
  margin-bottom: 12px;
}

/* اکشن‌های کامنت */
.pc-comment-actions{ 
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.pc-comment-actions button{ 
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(83, 123, 255, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.pc-comment-actions button:hover {
  background: var(--pc-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(83, 123, 255, 0.3);
}

.pc-comment-actions .pc-like{ 
  color: var(--pc-primary);
  font-weight: 500;
}

.pc-comment-actions .pc-like:hover {
  background: #e91e63;
  border-color: #e91e63;
}

/* دکمه ریپلای غیرفعال برای سطوح عمیق */
.pc-comment.pc-level-4 .pc-reply {
  display: none;
}

.pc-children{ 
  margin-top: 16px; 
}

/* کانتینر فرم ریپلای با طراحی مدرن */
.pc-reply-form-container{
  border: 2px solid var(--pc-primary);
  padding: 16px;
  margin: 16px 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pc-light) 0%, rgba(255,255,255,0.95) 100%);
  backdrop-filter: blur(10px);
  animation: pc-reply-form-appear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pc-reply-form-appear {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ریسپانسیو با بهبودهای مدرن */
@media (max-width: 768px){
  .pc-comments-wrap{ 
    padding: 16px; 
    border-radius: 12px;
  }
  
  .pc-form-fields textarea{ 
    min-height: 100px; 
  }
  
  .pc-name-row{
    flex-direction: column;
    gap: 8px;
  }
  
  .pc-name-row input {
    width: 100%;
  }
  
  /* کاهش فاصله‌ها در موبایل */
  .pc-comment.pc-level-1 { margin-left: 16px; }
  .pc-comment.pc-level-2 { margin-left: 12px; }
  .pc-comment.pc-level-3 { margin-left: 8px; }
  .pc-comment.pc-level-4 { margin-left: 4px; }
  
  .pc-level-1 { margin-left: 4px; padding-left: 8px; }
  .pc-level-2 { margin-left: 3px; padding-left: 6px; }
  .pc-level-3 { margin-left: 2px; padding-left: 4px; }
  .pc-level-4 { margin-left: 1px; padding-left: 2px; }
  
  .pc-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .pc-comment {
    padding: 14px;
  }
}

@media (max-width: 480px){
  .pc-comments-wrap {
    padding: 12px;
    margin: 8px;
  }
  
  .pc-comment-form {
    padding: 16px;
  }
  
  .pc-form-title {
    font-size: 18px;
  }
  
  /* در موبایل کوچک، فاصله‌ها را بیشتر کاهش می‌دهیم */
  .pc-comment.pc-level-1 { margin-left: 8px; }
  .pc-comment.pc-level-2 { margin-left: 6px; }
  .pc-comment.pc-level-3 { margin-left: 4px; }
  .pc-comment.pc-level-4 { margin-left: 2px; }
  
  .pc-notification-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  /* کوچک کردن دکمه‌های اکشن در موبایل */
  .pc-comment-actions button {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* انیمیشن‌های اضافی برای تعامل بهتر */
@keyframes pc-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pc-btn:active {
  animation: pc-pulse 0.2s ease;
}

/* اسکرول بار سفارشی */
.pc-comments-wrap::-webkit-scrollbar {
  width: 6px;
}

.pc-comments-wrap::-webkit-scrollbar-track {
  background: rgba(83, 123, 255, 0.1);
  border-radius: 3px;
}

.pc-comments-wrap::-webkit-scrollbar-thumb {
  background: var(--pc-primary);
  border-radius: 3px;
}

.pc-comments-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--pc-dark);
}
