/* ===================================
   Liquid Glass Effects CSS
   Design System v1.1 - DRY Approach
   =================================== */

/* ===================================
   BASE GLASS PANELS
   =================================== */

/* Standard Glass Panel - für dunkle Hintergründe */
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Dark Glass Panel - für helle Hintergründe */
.glass-panel-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(0, 0, 0, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Light Glass Panel - sehr hell/transluzent für Content-Bereiche */
.glass-panel-light {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.9),
    0 0 24px rgba(255, 255, 255, 0.4),
    0 12px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

/* Ultra Light Glass Panel - fast weiß */
.glass-panel-ultra-light {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px) saturate(120%);
  -webkit-backdrop-filter: blur(15px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 1),
    0 8px 32px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

/* Glass Panel - Slate 900 variant */
.glass-panel-slate-900 {
  background: rgba(15, 23, 42, 0.7); /* 40% opacity of slate-900 */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(71, 85, 105, 0.5); /* slate-600 for border */
  box-shadow:
    inset 0 1px 0px rgba(100, 116, 139, 0.5), /* slate-500 highlight */
    0 0 20px rgba(0, 0, 0, 0.3),
    0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

/* Light reflection for slate panel */
.glass-panel-slate-900::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(71, 85, 105, 0.3) 0%, /* slate-600 reflection */
    transparent 40%);
  pointer-events: none;
  opacity: 0.6;
}

/* Glass Panel Warning - für Warnungen */
.glass-panel-warning {
  background: rgba(251, 191, 36, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(251, 191, 36, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Glass Panel Success - für Erfolgsmeldungen */
.glass-panel-success {
  background: rgba(34, 197, 94, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.3),
    0 0 20px rgba(34, 197, 94, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* Light Reflections für alle Panels (außer ultra-light) */
.glass-panel::before,
.glass-panel-dark::before,
.glass-panel-light::before,
.glass-panel-warning::before,
.glass-panel-success::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 40%);
  pointer-events: none;
  opacity: 0.8;
}

.glass-panel::after,
.glass-panel-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(225deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 30%);
  pointer-events: none;
  opacity: 0.6;
}

/* Subtle reflection for light panels */
.glass-panel-light::before {
  opacity: 0.6;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.5) 0%,
    transparent 30%);
}

/* ===================================
   GLASS HEADERS & SECTIONS
   =================================== */

/* Glass Header Bar - Optional für Header mit Background */
.glass-header-bar {
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Glass Section Header - für Überschriften in Panels */
.glass-header {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}

.glass-header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  background: linear-gradient(135deg,
    rgba(23, 190, 187, 0.15) 0%,
    transparent 50%);
  pointer-events: none;
}

/* ===================================
   GLASS BUTTONS - Size Variants
   =================================== */

/* Base Glass Button */
.glass-button {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.5),
    0 0 12px rgba(0, 0, 0, 0.1),
    0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-radius: 0.5rem;
}

/* Small Glass Button */
.glass-button-sm {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  border-radius: 0.375rem;
}

/* Large Glass Button */
.glass-button-lg {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.6),
    0 0 16px rgba(0, 0, 0, 0.12),
    0 6px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  border-radius: 0.625rem;
}

/* Light Glass Button - für helle Hintergründe */
.glass-button-light {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border-radius: 0.5rem;
}

/* Dark Glass Button - für dunkle UI */
.glass-button-dark {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border-radius: 0.5rem;
}

/* Warning Glass Button - für Warnungen */
.glass-button-warning {
  background: rgba(251, 191, 36, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.3),
    0 4px 12px rgba(251, 191, 36, 0.2);
  transition: all 0.3s ease;
  border-radius: 0.5rem;
}

/* Button Hover States */
.glass-button:hover:not(:disabled),
.glass-button-sm:hover:not(:disabled),
.glass-button-lg:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.6),
    0 0 20px rgba(0, 0, 0, 0.15),
    0 8px 12px rgba(0, 0, 0, 0.15);
}

.glass-button-light:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 1),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

.glass-button-dark:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.3);
}

.glass-button-warning:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.35);
  border-color: rgba(251, 191, 36, 0.7);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 6px 20px rgba(251, 191, 36, 0.3);
}

/* Button Active States */
.glass-button:active:not(:disabled),
.glass-button-sm:active:not(:disabled),
.glass-button-lg:active:not(:disabled),
.glass-button-light:active:not(:disabled),
.glass-button-dark:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 0 10px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===================================
   GLASS BUTTON ACCENTS
   =================================== */

/* Teal Accent */
.glass-button-teal {
  border-color: rgba(23, 190, 187, 0.3);
}

.glass-button-teal:hover:not(:disabled) {
  background: rgba(23, 190, 187, 0.1);
  border-color: rgba(23, 190, 187, 0.5);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.9),
    0 4px 12px rgba(23, 190, 187, 0.15);
}

/* Orange Accent */
.glass-button-orange {
  border-color: rgba(251, 139, 36, 0.3);
}

.glass-button-orange:hover:not(:disabled) {
  background: rgba(251, 139, 36, 0.1);
  border-color: rgba(251, 139, 36, 0.5);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.9),
    0 4px 12px rgba(251, 139, 36, 0.15);
}

/* ===================================
   GLASS DROPDOWNS & MENUS
   =================================== */

.glass-dropdown {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}


.glass-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.7);
  transition: background 0.2s ease;
}


/* ===================================
   GLASS BADGES & CHIPS
   =================================== */

.glass-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.glass-badge-dark {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.glass-badge-ultra-dark {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}


/* ===================================
   GLASS LOGO & BRANDING
   =================================== */

.glass-logo {
  background: linear-gradient(135deg, rgba(23, 190, 187, 0.15), rgba(251, 139, 36, 0.1));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.glass-logo:hover {
  background: linear-gradient(135deg, rgba(23, 190, 187, 0.25), rgba(251, 139, 36, 0.15));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0px rgba(255, 255, 255, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* ===================================
   UTILITIES & HELPERS
   =================================== */

/* Glass Divider */
.glass-divider {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Text Effects */
.text-glow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-glow-strong {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.text-glow-soft {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Icon Effects */
.icon-glass {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.icon-teal {
  color: #17BEBB;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1.2);
}

.icon-orange {
  color: #FB8B24;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1.1);
}

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */

/* Reduce blur on mobile for performance */
@media (max-width: 768px) {
  .glass-panel,
  .glass-panel-dark,
  .glass-panel-light {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .glass-button,
  .glass-button-sm,
  .glass-button-lg {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

/* ===================================
   BROWSER FALLBACKS
   =================================== */

@supports not (backdrop-filter: blur(10px)) {
  .glass-panel {
    background: rgba(255, 255, 255, 0.9);
  }

  .glass-panel-dark {
    background: rgba(0, 0, 0, 0.9);
  }

  .glass-panel-light {
    background: rgba(255, 255, 255, 0.95);
  }

  .glass-button {
    background: rgba(255, 255, 255, 0.85);
  }

  .glass-dropdown {
    background: rgba(255, 255, 255, 0.98);
  }
}

/* ===================================
   ANIMATION UTILITIES
   =================================== */

@keyframes glass-shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.glass-shimmer {
  position: relative;
}

.glass-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: glass-shimmer 3s infinite;
  pointer-events: none;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}