/* === بدنه مودال === */
/* بدنه مودال */
.psgd-modal-body {
  padding: 20px;
  direction: rtl;
  text-align: right;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* محتوای مودال (باکس سفید) */
.psgd-modal-content {
  background: #fff;
  border-radius: 10px;
  width: 95%;
  max-width: 720px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

/* فقط برای دسکتاپ / ویندوز */
@media (min-width: 1024px) {
  .psgd-modal-content {
    max-width: 820px;
  }
  
  /* حذف margin منفی و width اضافی که باعث تداخل می‌شد */
  .psgd-modal-body {
    width: 100%;
    margin: 0;
    padding: 25px;
  }
}

/* === ریسپانسیو برای موبایل === */
@media (max-width: 768px) {
  .psgd-modal-body {
    padding: 15px;
    max-height: 80vh;
  }
  
  .psgd-modal-content {
    width: 100%;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .psgd-modal-body {
    padding: 10px;
    max-height: 70vh;
  }
  
  .psgd-modal-content {
    border-radius: 6px;
  }
}

/* === استایل‌های حرفه‌ای برای جداول === */
.psgd-size-content {
  width: 100%;
  overflow-x: auto;
}

.psgd-size-content table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  margin: 15px 0;
  font-family: inherit;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.psgd-size-content table th {
  background: #1565C0;
  color: white;
  padding: 12px 15px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  border: none;
}

.psgd-size-content table td {
  padding: 10px 15px;
  text-align: center;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  transition: background-color 0.2s;
}

.psgd-size-content table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.psgd-size-content table tr:hover {
  background-color: #f0f7ff;
}

.psgd-size-content table tr:hover td {
  background-color: #f0f7ff;
}

/* === ریسپانسیو برای جداول === */
@media (max-width: 768px) {
  .psgd-size-content table {
    min-width: 400px;
    font-size: 13px;
  }
  
  .psgd-size-content table th,
  .psgd-size-content table td {
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .psgd-size-content table {
    min-width: 300px;
    font-size: 12px;
  }
  
  .psgd-size-content table th,
  .psgd-size-content table td {
    padding: 6px 8px;
  }
}

/* === استایل برای محتوای متنی طولانی === */
.psgd-size-content p {
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.psgd-size-content ul,
.psgd-size-content ol {
  margin-right: 20px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.psgd-size-content li {
  margin-bottom: 8px;
}

/* === اسکرول بار زیبا === */
.psgd-modal-body::-webkit-scrollbar {
  width: 8px;
}

.psgd-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.psgd-modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.psgd-modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.psgd-size-content::-webkit-scrollbar {
  height: 8px;
}

.psgd-size-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.psgd-size-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.psgd-size-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* === انیمیشن‌های ظریف === */
.psgd-modal-body {
  scroll-behavior: smooth;
}

.psgd-size-content table {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === استایل برای تصاویر در محتوا === */
.psgd-size-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 10px 0;
}

/* === استایل برای لینک‌ها === */
.psgd-size-content a {
  color: #1565C0;
  text-decoration: none;
  transition: color 0.2s;
}

.psgd-size-content a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

/* === استایل برای تیترها === */
.psgd-size-content h1,
.psgd-size-content h2,
.psgd-size-content h3,
.psgd-size-content h4,
.psgd-size-content h5,
.psgd-size-content h6 {
  color: #1565C0;
  margin: 20px 0 15px 0;
  font-weight: 600;
  line-height: 1.3;
}

.psgd-size-content h1 { font-size: 24px; }
.psgd-size-content h2 { font-size: 22px; }
.psgd-size-content h3 { font-size: 20px; }
.psgd-size-content h4 { font-size: 18px; }
.psgd-size-content h5 { font-size: 16px; }
.psgd-size-content h6 { font-size: 14px; }

/* === ریسپانسیو برای تیترها === */
@media (max-width: 768px) {
  .psgd-size-content h1 { font-size: 22px; }
  .psgd-size-content h2 { font-size: 20px; }
  .psgd-size-content h3 { font-size: 18px; }
  .psgd-size-content h4 { font-size: 16px; }
  .psgd-size-content h5 { font-size: 15px; }
  .psgd-size-content h6 { font-size: 14px; }
}

@media (max-width: 480px) {
  .psgd-size-content h1 { font-size: 20px; }
  .psgd-size-content h2 { font-size: 18px; }
  .psgd-size-content h3 { font-size: 17px; }
  .psgd-size-content h4 { font-size: 16px; }
  .psgd-size-content h5 { font-size: 15px; }
  .psgd-size-content h6 { font-size: 14px; }
}

.psgd-btn {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #1565C0;
  border-radius: 7px;
  background: transparent;
  color: #1565C0;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.psgd-btn:hover {
  background-color: #1565C0;
  color: #fff;
}

.card.psgd-full-width {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

.psgd-modal {
  position: fixed;
  z-index: 9999;
  inset: 0 !important;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px;
  box-sizing: border-box;
}

.psgd-modal.show {
  display: flex !important;
}

/* === هدر مودال === */
.psgd-header {
  background: #1565C0;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.psgd-header h2 {
  margin: 0;
  font-size: 16px;
}
#psgd-close {
  font-size: 22px;
  cursor: pointer;
  color: #fff;
  font-weight: bold;
}

/* === Progress Bar === */
.psgd-progress {
  margin-bottom: 15px;
}
.psgd-progress p {
  margin: 0 0 5px;
  font-weight: bold;
  font-size: 14px;
}
.psgd-progress-bar {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}
.psgd-progress-bar .bar {
  height: 100%;
  background: #4caf50;
}

/* === انتخاب جنسیت === */
.psgd-gender-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.psgd-gender {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.psgd-gender img {
  width: 40px;
  height: auto;
}
.psgd-gender p {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #1565C0;
}
.psgd-gender:hover {
  background: #f5f5f5;
  border-color: #1565C0;
}

/* === دسته‌بندی‌ها === */
.psgd-category-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.psgd-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.psgd-category img {
  width: 50px;
  height: auto;
  margin-bottom: 10px;
}

.psgd-category p {
  margin: 0;
  font-size: 15px;
  font-weight: bold;
  color: #1565C0;
}

.psgd-category:hover {
  background: #f5f5f5;
  border-color: #1565C0;
}

.psgd-topbar {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.psgd-back-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.psgd-back-btn:hover {
  background: #e0e0e0;
  border-color: #bbb;
}

/* موبایل */
@media (max-width: 768px) {
  .psgd-category-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .psgd-category {
    padding: 12px 6px;
  }
  .psgd-category img {
    width: 36px;
    margin-bottom: 6px;
  }
  .psgd-category p {
    font-size: 13px;
  }
  
  .psgd-gender {
    padding: 10px;
  }
  .psgd-gender img {
    width: 32px;
  }
  .psgd-gender p {
    font-size: 14px;
  }
  
  .psgd-header {
    border-radius: 8px 8px 0 0;
  }
}