/* استایل‌های مودال تماس‌ها */
.contact-modal-body {
  padding: 16px;
  background: #f9fafb;
  height: 100%;
  overflow-y: auto;
  min-height: 200px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: right;
  min-height: 60px;
}

.contact-item:hover {
  background: #f8f9fa;
  border-color: #0095f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  min-width: 36px;
}

.contact-icon.telegram { background: #0088cc; }
.contact-icon.whatsapp { background: #25D366; }
.contact-icon.instagram { background: #E4405F; }
.contact-icon.eitaa { background: #00A0E3; }
.contact-icon.rubika { background: #00C2FF; }
.contact-icon.phone { background: #10b981; }
.contact-icon.sms { background: #8b5cf6; }
.contact-icon.email { background: #ef4444; }

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 3px;
  line-height: 1.3;
}

.contact-detail {
  font-size: 11px;
  color: #6b7280;
  direction: ltr;
  text-align: right;
  line-height: 1.3;
  word-break: break-all;
}

/* استایل‌های جدید Bottom Sheet */
.loopi-modal.draggable {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
  max-height: 90%;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  touch-action: none;
  transition: transform 0s;
  z-index: 1000;
  cursor: grab;
}

.loopi-modal.draggable.open {
  transform: translateY(0);
}

.loopi-modal.draggable:active {
  cursor: grabbing;
}

.loopi-modal.draggable .loopi-modal-header {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  min-height: 60px;
  padding: 12px 16px;
  position: relative;
  touch-action: none;
}

/* بهبود استایل Drag Handle */
.drag-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #9ca3af;
  border-radius: 3px;
  transition: all 0.2s ease;
}

/* حالت‌های مختلف محتوای مودال بر اساس وضعیت */
.loopi-modal.draggable .loopi-body-wrapper {
  max-height: calc(90vh - 70px);
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y; /* اجازه اسکرول به محتوا */
}

/* وقتی در حال drag هستیم، اسکرول را غیرفعال می‌کنیم */
.loopi-modal.draggable.dragging .loopi-body-wrapper {
  touch-action: none;
  overflow: hidden;
}

/* بهبودهای سازگاری برای مرورگرهای مختلف */
.loopi-modal.draggable {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.loopi-body-wrapper {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* رسپانسیو برای مودال تماس‌ها */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .contact-item {
    padding: 10px;
    min-height: 55px;
  }
  
  .contact-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
    min-width: 32px;
  }
  
  .contact-name {
    font-size: 12px;
  }
  
  .contact-detail {
    font-size: 10px;
  }
  
  .loopi-modal.draggable .loopi-modal-header {
    min-height: 55px;
    padding: 10px 14px;
  }
  
  .drag-handle {
    width: 35px;
    height: 3px;
    top: 7px;
  }
}

@media (max-width: 480px) {
  .contact-modal-body {
    padding: 12px;
  }
  
  .contact-item {
    padding: 8px;
    min-height: 50px;
    gap: 8px;
  }
  
  .contact-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
    min-width: 30px;
  }
  
  .contact-name {
    font-size: 11px;
  }
  
  .contact-detail {
    font-size: 9px;
  }
  
  .drag-handle {
    width: 30px;
    height: 3px;
  }
}
