/**
 * أنماط الميزات التفاعلية
 * Interactive Features Styles
 */

/* ========================================
   Pull to Refresh
   ======================================== */

.pull-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  padding: 12px 20px;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0 0 16px 16px;
  color: white;
  font-size: 14px;
  z-index: 9998;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pull-indicator.visible {
  transform: translateX(-50%) translateY(0);
}

.pull-indicator i {
  color: #8b5cf6;
}

/* ========================================
   Ripple Effect
   ======================================== */

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========================================
   Long Press
   ======================================== */

.long-press-active {
  transform: scale(0.95);
  opacity: 0.8;
}

/* ========================================
   Scroll Reveal
   ======================================== */

.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-hidden.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal variants */
[data-reveal="fade"] {
  opacity: 0;
}

[data-reveal="slide-up"] {
  transform: translateY(50px);
}

[data-reveal="slide-down"] {
  transform: translateY(-50px);
}

[data-reveal="slide-right"] {
  transform: translateX(-50px);
}

[data-reveal="slide-left"] {
  transform: translateX(50px);
}

[data-reveal="zoom"] {
  transform: scale(0.8);
}

.revealed[data-reveal] {
  opacity: 1;
  transform: none;
}

/* ========================================
   Tilt Effect
   ======================================== */

.tilt {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.tilt:hover {
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

/* ========================================
   Action Toast
   ======================================== */

.action-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.action-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-actions {
  display: flex;
  gap: 8px;
}

.toast-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.toast-actions button.primary {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

.toast-actions button:hover {
  transform: scale(1.05);
}

/* ========================================
   Swipe Card
   ======================================== */

.swipe-card {
  position: relative;
  transition: transform 0.3s ease;
  touch-action: pan-y;
}

.swipe-card-actions {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: -1;
}

.swipe-action-left,
.swipe-action-right {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 20px;
}

.swipe-action-left {
  background: #10b981;
  justify-content: flex-start;
}

.swipe-action-right {
  background: #ef4444;
  justify-content: flex-end;
}

/* ========================================
   Infinite Scroll
   ======================================== */

.infinite-scroll-loader {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.infinite-scroll-end {
  text-align: center;
  padding: 20px;
  color: #64748b;
  font-size: 14px;
}

/* ========================================
   Floating Action Button
   ======================================== */

.fab-btn {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.fab-btn:hover {
  transform: scale(1.1);
}

.fab-btn:active {
  transform: scale(0.95);
}

.fab-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.fab-btn.active .fab-menu {
  opacity: 1;
  pointer-events: auto;
}

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  color: white;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transform: translateX(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.fab-btn.active .fab-menu-item {
  transform: translateX(0);
  opacity: 1;
}

.fab-btn.active .fab-menu-item:nth-child(1) {
  transition-delay: 0.05s;
}
.fab-btn.active .fab-menu-item:nth-child(2) {
  transition-delay: 0.1s;
}
.fab-btn.active .fab-menu-item:nth-child(3) {
  transition-delay: 0.15s;
}
.fab-btn.active .fab-menu-item:nth-child(4) {
  transition-delay: 0.2s;
}

/* ========================================
   Parallax
   ======================================== */

[data-parallax] {
  will-change: transform;
}

/* ========================================
   Smooth Scroll Indicator
   ======================================== */

.scroll-indicator {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 999;
}

.scroll-indicator-value {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  width: 0;
  transition: width 0.1s linear;
}

/* ========================================
   Card Hover Effects
   ======================================== */

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.hover-border:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

/* ========================================
   Pulse Notification Toast
   ======================================== */
.pulse-toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 320px;
  background: rgba(15, 23, 42, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  color: white;
  z-index: 10001;
  transform: translateX(-120%);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.pulse-toast.show {
  transform: translateX(0);
}

.pulse-toast-content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  cursor: pointer;
}

.pulse-toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.pulse-toast-text strong {
  display: block;
  font-size: 14px;
  color: #c084fc;
  margin-bottom: 4px;
}

.pulse-toast-text p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
