/* ============================================
   TARWIDI App - Global Styles
   ============================================ */

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body {
  font-family: 'Lexend', 'Noto Sans Arabic', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

/* Splash Screen */
.medical-grid {
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 32px 32px;
}

.light-ray {
  background: conic-gradient(from 180deg at 50% 50%, transparent 0deg, rgba(255,255,255,0.03) 180deg, transparent 360deg);
  filter: blur(40px);
}

.glass-premium {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-glow {
  filter: drop-shadow(0 0 30px rgba(147, 1, 74, 0.25));
}

@keyframes subtle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: subtle-float 6s ease-in-out infinite;
}

@keyframes loading-glow {
  0%, 100% { opacity: 0.5; filter: blur(8px); }
  50% { opacity: 1; filter: blur(12px); }
}

.progress-glow {
  animation: loading-glow 2s ease-in-out infinite;
}

@keyframes progress-fill {
  from { width: 0%; }
  to { width: 100%; }
}

.progress-animate {
  animation: progress-fill 3s ease-in-out forwards;
}

/* Welcome Screen */
.premium-glow {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 102, 0.2), 0 8px 10px -6px rgba(147, 1, 74, 0.1);
}

/* Shared */
.indigo-gradient {
  background: linear-gradient(135deg, #000066 0%, #000044 100%);
}

.glass-header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.shadow-clinical {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 102, 0.05);
}

.bg-brand-gradient {
  background: linear-gradient(135deg, #000066 0%, #93014a 100%);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tonal-shift {
  background-color: #f5f5f8;
}

.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Star Rating */
.star-active {
  font-variation-settings: 'FILL' 1;
  color: #93014a;
  filter: drop-shadow(0 0 8px rgba(147, 1, 74, 0.4));
}

/* Screen Transitions */
.screen-enter {
  animation: screenSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.screen-enter-back {
  animation: screenSlideInBack 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes screenSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes screenSlideInBack {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Splash fade out */
@keyframes splashFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.splash-fade-out {
  animation: splashFadeOut 0.8s ease forwards;
}

/* Rate App background */
.rate-bg-pattern {
  background-color: #f8fafc;
  background-image: radial-gradient(#e2e8f0 0.5px, transparent 0.5px);
  background-size: 20px 20px;
}

/* Toggle fix for RTL */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: #e2e8f0;
  border-radius: 9999px;
  position: relative;
  transition: background 0.2s;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 9999px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-track {
  background: #93014a;
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(-20px);
}
