/* ==============================================================================
   HALAL-AMR ENTERPRISE - COOKIE CONSENT & VERCEL TELEMETRY MODAL
   Aesthetic: Pak-LLM Obsidian (#030708) & Emerald (#10b981) Glassmorphism
   Fully Responsive (Desktop, Tablet, Mobile) • Accessible (ARIA Dialog)
   ============================================================================== */

@keyframes cookieSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cookie-consent-wrap {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
  max-width: 480px !important;
  width: calc(100vw - 48px) !important;
  pointer-events: auto !important;
  animation: cookieSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-card {
  background: rgba(3, 7, 8, 0.96) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
  border-radius: 18px !important;
  padding: 24px !important;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.95),
    0 0 35px rgba(16, 185, 129, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  color: #f1f5f9 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  position: relative !important;
  overflow: hidden !important;
}

.cookie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, #34d399, transparent);
  pointer-events: none;
}

.cookie-card-header {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  margin-bottom: 14px !important;
}

.cookie-badge-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3) !important;
}

.cookie-header-text {
  flex: 1 !important;
}

.cookie-title {
  font-family: 'Outfit', 'Inter', sans-serif !important;
  font-size: 1.12rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  margin: 0 0 3px 0 !important;
  letter-spacing: -0.01em !important;
}

.cookie-meta {
  display: block !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.72rem !important;
  color: #10b981 !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

.cookie-btn-close {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
}

.cookie-btn-close:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.cookie-desc {
  font-size: 0.86rem !important;
  line-height: 1.55 !important;
  color: #cbd5e1 !important;
  margin: 0 0 16px 0 !important;
}

.cookie-desc strong {
  color: #34d399 !important;
  font-weight: 600 !important;
}

/* Preferences Accordion Drawer */
.cookie-preferences-drawer {
  background: rgba(0, 0, 0, 0.45) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.cookie-pref-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.cookie-pref-item:last-child {
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

.cookie-pref-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.cookie-pref-name {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
}

.cookie-pref-detail {
  font-size: 0.74rem !important;
  color: #94a3b8 !important;
  line-height: 1.4 !important;
}

.cookie-pref-badge {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  padding: 3px 8px !important;
  border-radius: 9999px !important;
  white-space: nowrap !important;
}

/* Custom Emerald Toggle Switch */
.cookie-toggle-switch {
  position: relative !important;
  display: inline-block !important;
  width: 40px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}

.cookie-toggle-switch input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.cookie-slider {
  position: absolute !important;
  cursor: pointer !important;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155 !important;
  transition: 0.25s !important;
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.cookie-slider:before {
  position: absolute !important;
  content: "" !important;
  height: 16px !important;
  width: 16px !important;
  left: 2px !important;
  bottom: 2px !important;
  background-color: #ffffff !important;
  transition: 0.25s !important;
  border-radius: 50% !important;
}

.cookie-toggle-switch input:checked + .cookie-slider {
  background-color: #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6) !important;
}

.cookie-toggle-switch input:checked + .cookie-slider:before {
  transform: translateX(18px) !important;
}

/* Action Buttons */
.cookie-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.cookie-actions-row {
  display: flex !important;
  gap: 8px !important;
}

.btn-cookie-primary {
  flex: 1 !important;
  background: #10b981 !important;
  color: #030708 !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  padding: 11px 16px !important;
  border-radius: 10px !important;
  border: 1px solid #10b981 !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.4) !important;
}

.btn-cookie-primary:hover {
  background: #34d399 !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.6) !important;
  transform: translateY(-1px) !important;
}

.btn-cookie-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #e2e8f0 !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
}

.btn-cookie-secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #ffffff !important;
}

.btn-cookie-link {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 0.78rem !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  padding: 4px !important;
  text-align: center !important;
  transition: color 0.2s ease !important;
}

.btn-cookie-link:hover {
  color: #34d399 !important;
}

/* Toast confirmation on choice */
.cookie-toast {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
  background: rgba(3, 7, 8, 0.95) !important;
  border: 1.5px solid #10b981 !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(16, 185, 129, 0.3) !important;
  color: #ffffff !important;
  font-size: 0.82rem !important;
  animation: cookieSlideIn 0.3s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .cookie-consent-wrap {
    bottom: 12px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
  }
  .cookie-card {
    padding: 18px !important;
  }
  .cookie-actions-row {
    flex-direction: column !important;
  }
}
