/* Custom additions — Tailwind handles the heavy lifting */

/* Smooth HTMX transitions */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: inline-flex;
}
.htmx-request.htmx-indicator {
  display: inline-flex;
}

/* Fade in for dynamically loaded content */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.2s ease-out;
}

/* Media thumbnails */
.media-thumb {
  position: relative;
  display: inline-block;
  border-radius: 0.5rem;
  overflow: hidden;
}
.media-thumb:hover .media-overlay {
  opacity: 1;
}
.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.18s;
}

/* Reply card copy flash */
@keyframes flashGreen {
  0%   { background-color: #d1fae5; }
  100% { background-color: transparent; }
}
.copy-flash {
  animation: flashGreen 0.7s ease-out;
}

/* Loading spinner */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(99,102,241,0.2);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Dialog backdrop */
.dialog-backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}

/* Sticky bottom action bar on mobile */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Arabic font improvement */
body {
  font-family: 'Cairo', 'Segoe UI', system-ui, sans-serif;
}

/* Available badge pulse */
.badge-available {
  animation: none;
}
.badge-unavailable {
  opacity: 0.85;
}

/* Card shadow */
.product-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s;
}
.product-card:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

/* Scrollbar thin */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
