/* Glass Morphism Effects for KPI Cards */

/* تأثيرات الظلال المحسنة */
.shadow-3xl {
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تأثير اللمعة الداخلية */
.glass-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease-in-out;
}

.glass-shine:hover::before {
  left: 100%;
}

/* تأثير الحدود المتوهجة */
.glass-border {
  position: relative;
}

.glass-border::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.3)
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
}

/* تأثير الانعكاس */
.glass-reflection {
  position: relative;
  overflow: hidden;
}

.glass-reflection::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* تأثير التموج عند النقر */
.glass-ripple {
  position: relative;
  overflow: hidden;
}

.glass-ripple::after {
  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 ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
  opacity: 0;
}

.glass-ripple:active::after {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: width 0.1s ease-out, height 0.1s ease-out, opacity 0.1s ease-out;
}

/* تحسينات للخطوط مع الزجاج */
.glass-text {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.8);
}

.glass-text-light {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7);
}

/* تأثير الضوء المتحرك */
@keyframes glass-glow {
  0%, 100% {
    box-shadow: 
      0 25px 50px -12px rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 
      0 25px 50px -12px rgba(0, 0, 0, 0.15),
      0 0 0 1px rgba(255, 255, 255, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 20px rgba(255, 255, 255, 0.1);
  }
}

.glass-glow-animation {
  animation: glass-glow 3s ease-in-out infinite;
}

/* تأثير الضباب المتحرك */
@keyframes glass-mist {
  0%, 100% {
    backdrop-filter: blur(12px) saturate(150%);
  }
  50% {
    backdrop-filter: blur(16px) saturate(180%);
  }
}

.glass-mist-animation {
  animation: glass-mist 4s ease-in-out infinite;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
  .shadow-3xl {
    box-shadow: 
      0 15px 30px -8px rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 255, 255, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  
  .glass-ripple::after {
    max-width: 200px;
    max-height: 200px;
  }
}

/* تأثيرات إضافية للتفاعل */
.glass-card-enhanced {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.glass-card-enhanced:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 100%
  );
  backdrop-filter: blur(24px) saturate(200%);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 
    0 35px 70px -15px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}
