/* verification.css - طراحی اختصاصی و کلاینت محور - نسخه نهایی */

/* استایل تیک تأیید در پروفایل اصلی */
.verified-badge {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
  margin-right: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.verified-badge:active {
  transform: scale(0.95);
}

.verified-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
  border-radius: 0;
}

body:not([dir="rtl"]) .verified-badge {
  margin-right: 0;
  margin-left: 0.4rem;
}

/* استایل‌های مودال تأیید */
.verification-modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.verification-modal-container.active {
  display: block;
}

.verification-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.verification-modal-container.active .verification-overlay {
  opacity: 1;
}

.verification-modal {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 85vh;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-width: 280px;
  box-sizing: border-box;
}

.verification-modal.dragging {
  transition: none;
}

.verification-modal.dragging-down {
  transition: transform 0.2s ease;
}

.verification-modal-container.active .verification-modal {
  transform: translateY(0);
}

/* تغییر 1: پس زمینه هدر ساده و بدون رنگ */
.verification-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff; /* تغییر از گرادیانت رنگی به سفید ساده */
  color: #2d3748; /* تغییر رنگ متن به تیره برای خوانایی بهتر */
  position: relative;
  min-height: 60px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.verification-modal-header:active {
  cursor: grabbing;
}

.verification-drag-handle {
  position: absolute;
  top: 8px;
  right: calc(50% - 20px);
  width: 40px;
  height: 4px;
  background: rgba(0, 0, 0, 0.3); /* تغییر رنگ به تیره برای تطابق با پس زمینه سفید */
  border-radius: 2px;
}

.verification-header-title {
  font-weight: bold;
  font-size: 18px;
  text-align: center;
  margin: 0;
  /* حذف text-shadow زیرا دیگر روی پس زمینه تیره نیست */
}

.verification-modal-close {
  position: absolute;
  left: 20px;
  background: rgba(0, 0, 0, 0.05); /* تغییر به پس زمینه تیره با شفافیت کم */
  border: none;
  font-size: 18px;
  color: #4a5568; /* تغییر رنگ آیکون به تیره */
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 10002;
}

.verification-modal-close:active {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(0.95);
}

@media (hover: hover) {
  .verification-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
  }
}

.verification-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  background: #ffffff;
  box-sizing: border-box;
}

/* تغییر 2: پس زمینه آبی بنفش برای verification-profile-info */
.verification-profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* تغییر به گرادیانت آبی بنفش */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white; /* تغییر رنگ متن به سفید برای خوانایی */
}

.verification-profile-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.verification-profile-image {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  position: relative;
  z-index: 1;
}

.verification-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verification-profile-info {
  width: 100%;
}

.verification-profile-name {
  font-weight: bold;
  font-size: 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
  color: white; /* تغییر رنگ به سفید */
  flex-wrap: wrap;
}

.verification-badge-icon {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.verification-profile-type {
  color: rgba(255, 255, 255, 0.9); /* تغییر رنگ به سفید با شفافیت */
  font-size: 15px;
  word-break: break-word;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* بخش verification-status حذف شد */

/* طراحی گرید اطلاعات */
.verification-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.verification-grid-item {
  background: white;
  padding: 18px 15px;
  border-radius: 12px;
  text-align: center;
  min-width: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 90px;
  box-sizing: border-box;
}

.verification-grid-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #667eea, #764ba2);
}

.verification-grid-label {
  font-size: 13px;
  color: #718096;
  margin-bottom: 8px;
  word-break: break-word;
  font-weight: 500;
  line-height: 1.3;
}

.verification-grid-value {
  font-weight: bold;
  font-size: 18px;
  word-break: break-word;
  color: #2d3748;
  line-height: 1.2;
}

.verification-grid-icon {
  font-size: 24px;
  margin-bottom: 10px;
  color: #667eea;
}

/* طراحی آکاردئون‌ها */
.verification-accordion {
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.verification-accordion-header {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #2d3748;
  transition: all 0.3s ease;
  min-height: 60px;
  box-sizing: border-box;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.verification-accordion-header.active {
  background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
}

.verification-accordion-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: #667eea;
}

.verification-accordion-header.active .verification-accordion-icon {
  transform: rotate(180deg);
}

.verification-accordion-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.verification-accordion-content.active {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.verification-license-info {
  font-size: 14px;
  line-height: 1.6;
}

.verification-license-detail {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e2e8f0;
  flex-wrap: wrap;
  gap: 5px;
}

.verification-license-label {
  color: #718096;
  margin-bottom: 4px;
  font-weight: 500;
  flex: 1;
  min-width: 120px;
}

.verification-license-value {
  font-weight: 600;
  margin-bottom: 4px;
  color: #2d3748;
  flex: 2;
  min-width: 140px;
  text-align: left;
}

/* طراحی بخش اقدامات */
.verification-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.verification-action-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
  flex: 1 1 120px;
  -webkit-tap-highlight-color: transparent;
}

.verification-action-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.verification-action-btn.secondary {
  background: #f7fafc;
  color: #4a5568;
  border: 1px solid #e2e8f0;
}

.verification-action-btn.trusted {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.verification-action-btn:active {
  transform: scale(0.98);
}

@media (hover: hover) {
  .verification-action-btn.primary:hover {
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.4);
  }
  
  .verification-action-btn.secondary:hover {
    background: #edf2f7;
  }
}

.verification-legal-notice {
  background: #fff8e1;
  border-left: 4px solid #f6ad55;
  padding: 16px;
  margin-top: 20px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
}

.verification-legal-notice i {
  color: #f6ad55;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.verification-footer {
  padding: 18px 20px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  background: #f7fafc;
  font-size: 12px;
  color: #718096;
  word-break: break-word;
  box-sizing: border-box;
}

/* طراحی ریسپانسیو - بهبود برای تمام دستگاه‌ها */
@media (max-width: 480px) {
  .verification-modal {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
  }
  
  .verification-modal-body {
    padding: 15px;
  }
  
  .verification-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
  }
  
  .verification-grid-item {
    padding: 15px 10px;
    min-height: 85px;
  }
  
  .verification-grid-value {
    font-size: 16px;
  }
  
  .verification-grid-label {
    font-size: 12px;
  }
  
  .verification-actions {
    gap: 10px;
  }
  
  .verification-action-btn {
    padding: 12px 10px;
    font-size: 13px;
    flex: 1 1 140px;
  }
  
  .verified-badge {
    width: 20px;
    height: 20px;
  }
  
  .verification-profile-section {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .verification-profile-image {
    width: 75px;
    height: 75px;
    margin-bottom: 12px;
  }
  
  .verification-profile-name {
    font-size: 18px;
  }
  
  .verification-badge-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }
  
  .verification-profile-type {
    font-size: 14px;
  }
  
  .verification-accordion-header {
    padding: 16px 15px;
    min-height: 55px;
    font-size: 14px;
  }
  
  .verification-accordion-content.active {
    padding: 15px;
    max-height: 350px;
  }
  
  .verification-license-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .verification-license-label,
  .verification-license-value {
    flex: none;
    width: 100%;
    text-align: right;
  }
  
  .verification-modal-header {
    padding: 18px 15px;
    min-height: 58px;
  }
  
  .verification-header-title {
    font-size: 17px;
  }
  
  .verification-modal-close {
    left: 15px;
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 360px) {
  .verified-badge {
    width: 18px;
    height: 18px;
  }
  
  .verification-modal {
    min-width: 280px;
  }
  
  .verification-modal-body {
    padding: 12px;
  }
  
  .verification-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .verification-grid-item {
    padding: 12px 10px;
    min-height: 80px;
  }
  
  .verification-actions {
    flex-direction: column;
  }
  
  .verification-action-btn {
    width: 100%;
    flex: 1 1 auto;
  }
  
  .verification-profile-image {
    width: 70px;
    height: 70px;
  }
  
  .verification-profile-name {
    font-size: 17px;
  }
}

@media (max-width: 320px) {
  .verification-modal {
    max-height: 95vh;
    border-radius: 18px 18px 0 0;
  }
  
  .verification-modal-body {
    padding: 12px 10px;
  }
  
  .verification-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .verification-grid-item {
    padding: 12px 8px;
    min-height: 75px;
  }
  
  .verification-profile-name {
    font-size: 16px;
  }
  
  .verification-profile-type {
    font-size: 13px;
  }
  
  .verification-actions {
    flex-direction: column;
  }
  
  .verification-action-btn {
    flex: 1 1 auto;
    width: 100%;
  }
  
  .verification-accordion-header {
    padding: 14px 12px;
    font-size: 13px;
  }
  
  .verification-accordion-content.active {
    padding: 12px;
  }
}

@media (max-width: 280px) {
  .verification-modal {
    min-width: 240px;
    max-height: 98vh;
    border-radius: 15px 15px 0 0;
  }
  
  .verification-modal-body {
    padding: 10px 8px;
  }
  
  .verification-profile-section {
    padding: 12px 8px;
  }
  
  .verification-profile-image {
    width: 65px;
    height: 65px;
  }
  
  .verification-grid-value {
    font-size: 15px;
  }
  
  .verification-grid-label {
    font-size: 11px;
  }
  
  .verification-accordion-header {
    padding: 12px 10px;
    font-size: 13px;
    min-height: 50px;
  }
  
  .verification-header-title {
    font-size: 16px;
  }
  
  .verification-modal-close {
    width: 32px;
    height: 32px;
    left: 10px;
    padding: 6px;
  }
  
  .verification-footer {
    padding: 15px 10px;
    font-size: 11px;
  }
}

/* بهبودهای لمسی برای دستگاه‌های موبایل */
@media (hover: none) and (pointer: coarse) {
  .verification-action-btn,
  .verification-accordion-header,
  .verification-modal-close {
    min-height: 44px;
  }
  
  .verification-grid-item {
    padding: 15px 10px;
  }
  
  .verification-accordion-header {
    padding: 18px 15px;
  }
}

/* پشتیبانی از safe-area-inset برای دستگاه‌های ناچ دار */
@supports (padding: max(0px)) {
  .verification-modal-body {
    padding-left: max(15px, env(safe-area-inset-left));
    padding-right: max(15px, env(safe-area-inset-right));
    padding-bottom: max(15px, env(safe-area-inset-bottom));
  }
  
  .verification-modal-header {
    padding-top: max(20px, env(safe-area-inset-top));
  }
}

/* بهبود performance */
.verification-modal-container * {
  box-sizing: border-box;
}

.verification-modal,
.verification-overlay,
.verification-accordion-content {
  will-change: transform, opacity;
}

/* جلوگیری از overflow در المان‌های داخلی */
.verification-modal-body > * {
  max-width: 100%;
}

/* تضمین قابلیت کلیک مناسب در موبایل */
.verification-modal-close,
.verification-action-btn,
.verification-accordion-header {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* پشتیبانی از مرورگرهای قدیمی */
@supports not (backdrop-filter: blur(10px)) {
  .verification-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
}

@supports not (display: grid) {
  .verification-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .verification-grid-item {
    width: calc(50% - 8px);
    margin-bottom: 15px;
  }
  
  @media (max-width: 480px) {
    .verification-grid-item {
      width: 100%;
    }
  }
}
