/* ========================================
   FEATURES BUNDLE - برای UI Enhancements
   Generated: Phase 2 CSS Bundling
   ======================================== */

/* Color system - without design-tokens (already in core) */
@import url("../css/color-system.css");

/* UI Enhancements - content only without @import (design-tokens already in core.bundle.css) */
/* ===== 1. Theme Toggle Button ===== */
.theme-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  padding: 0;
  overflow: hidden;
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle-icon {
  font-size: 1.5rem;
  transition: transform var(--transition-base);
}

.theme-toggle:hover .theme-toggle-icon {
  transform: rotate(15deg);
}

/* ===== 2. Glassmorphism Cards ===== */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-accent-blue);
}

/* ===== 3. Gradient Backgrounds ===== */
.gradient-bg-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-green {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.gradient-bg-purple {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-bg-sunset {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-bg-ocean {
  background: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
}

/* ===== 4. Enhanced Buttons ===== */
.btn-modern {
  position: relative;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-xl);
  font-weight: 600;
  cursor: pointer;
  border: none;
  overflow: hidden;
  transition: all var(--transition-base);
  background: var(--color-accent-blue);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
  width: 300px;
  height: 300px;
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-modern:active {
  transform: translateY(0);
}

/* ===== 5. Loading Skeleton ===== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 0%,
    var(--color-border) 50%,
    var(--color-bg-tertiary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 2rem;
  width: 60%;
  margin-bottom: var(--space-4);
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius-2xl);
}

/* ===== 6. Tooltips ===== */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  z-index: 1000;
  transition: all var(--transition-base);
  pointer-events: none;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-bg-secondary);
}

.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 7. Progress Indicators ===== */
.progress-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-accent-blue) calc(var(--progress) * 1%),
    var(--color-border) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-circle::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
}

.progress-circle-text {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text-primary);
}

/* ===== 8. Wave Animation ===== */
@keyframes wave {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-25%) translateY(-10px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

.wave-container {
  position: relative;
  width: 100%;
  height: 100px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: wave 3s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
}

.wave::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 20px;
  background: var(--color-bg-primary);
  border-radius: 50%;
}

/* ===== 9. Focus States (Accessibility) ===== */
*:focus-visible {
  outline: 3px solid var(--color-accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== 10. Floating Action Button ===== */
.fab {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-purple));
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all var(--transition-base);
  z-index: 9998;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* FAB Menu */
.fab-menu {
  position: fixed;
  bottom: 6rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all var(--transition-base);
  z-index: 9997;
}

.fab-menu.active {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
}

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  color: var(--color-text-primary);
  text-decoration: none;
}

.fab-menu-item:hover {
  transform: translateX(-8px);
  box-shadow: var(--shadow-xl);
  background: var(--color-accent-blue);
  color: white;
}

/* ===== 11. Ripple Effect ===== */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* ===== 12. Smooth Transitions ===== */
body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

.card,
.dash-card {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  transition: all var(--transition-base);
}

/* ===== 13. Enhanced Input Fields ===== */
input:not([type="range"]),
select,
textarea {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  transition: all var(--transition-base);
}

input:not([type="range"]):hover,
select:hover,
textarea:hover {
  border-color: var(--color-border-hover);
}

input:not([type="range"]):focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== 14. Responsive Design ===== */
@media (max-width: 768px) {
  .theme-toggle {
    top: 0.5rem;
    left: 0.5rem;
    width: 3rem;
    height: 3rem;
  }

  .fab {
    bottom: 1rem;
    left: 1rem;
    width: 3rem;
    height: 3rem;
  }

  .fab-menu {
    bottom: 4.5rem;
    left: 1rem;
  }
}

/* ===== 15. Stagger Animation ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===== 16. Glow Effects ===== */
.glow {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.glow-hover:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  transition: box-shadow var(--transition-base);
}

/* ===== 17. Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent-blue);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-purple);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent-blue) var(--color-bg-tertiary);
}
