/*
 * shared-components.css - Marsool Project Shared Components
 * Version: 1.4.0 (Add Generic Modal)
 * Date: 2025-10-12
 * Description: Added styles for the generic modal system (.modal-backdrop) to be shared across the app.
 */

/* --- LOADER STYLES --- */
.plexus-loader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.plexus-loader-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.loader-logo {
  width: 150px;
  max-width: 40%;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
  position: fixed;
  top: 1.5rem;
  left: 0;
  right: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  padding: 0 1rem;
}
.toast-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  background-color: rgba(20, 20, 40, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  max-width: 100%;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.toast-item.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast-icon-wrapper svg {
  width: 1.25rem;
  height: 1.25rem;
}
.toast-icon-wrapper.success { color: var(--status-success); }
.toast-icon-wrapper.error { color: var(--status-error); }

/* --- GENERIC MODAL STYLES --- */
div#modal-container.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

div#modal-container.modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Animation for the modal content itself */
div#modal-container.modal-backdrop > * {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

div#modal-container.modal-backdrop.is-visible > * {
    transform: scale(1);
}

/* --- [إضافة جديدة] زر الواتساب العائم --- */
.whatsapp-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 99;
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.whatsapp-fab img {
    width: 32px;
    height: 32px;
}

/* تعديل الموضع على شاشات الهاتف ليكون فوق شريط الأدوات */
@media (max-width: 767px) {
    body:has(#mobile-nav) .whatsapp-fab {
        bottom: 6rem; /* 5rem لشريط الأدوات + 1rem مسافة */
    }
}