/**
 * أنماط CSS للتحسينات الجديدة في واجهة المستخدم
 * يدعم الأدوات التفاعلية ولوحات التشخيص والإشعارات
 */

/* لوحة التشخيص */
.debug-panel {
  font-family: 'Courier New', monospace;
  line-height: 1.5;
}

.debug-panel hr {
  border-color: #555;
  margin: 10px 0;
}

.debug-panel .text-success {
  color: #28a745 !important;
}

.debug-panel .text-warning {
  color: #ffc107 !important;
}

.debug-panel .text-danger {
  color: #dc3545 !important;
}

/* زر أداة التشخيص */
.debug-tool-btn {
  transition: all 0.3s ease;
}

.debug-tool-btn:hover {
  background-color: #0056b3 !important;
  transform: scale(1.1);
}

/* ملخص إرسال الرسائل */
#message-sending-summary {
  transition: all 0.3s ease;
  opacity: 0.9;
}

#message-sending-summary:hover {
  opacity: 1;
}

#message-sending-summary .alert {
  margin-bottom: 0;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* معلومات أرقام جهات الاتصال */
#contacts-numbers-debug {
  font-size: 0.85rem;
  max-height: 200px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

/* تحسينات الإشعارات */
.toast {
  min-width: 250px;
}

.toast .btn-close-white {
  filter: brightness(0) invert(1);
}

/* تحسينات جدول الرسائل */
#send .table tbody tr {
  transition: background-color 0.3s ease;
}

#send .table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.message-preview {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* إشعارات محسنة */
.custom-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInOut 5s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(20px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* تعديلات عامة لتحسين المظهر */
.form-group {
  margin-bottom: 1rem;
}

.contact-item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.contact-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* تحسين مظهر زر الإرسال */
#send-btn {
  position: relative;
  overflow: hidden;
}

#send-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

#send-btn:focus::after {
  animation: ripple 0.8s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}