/*
  Google Apps-Style Design System
  Material Design 3 inspired with custom CI colors
  Author: Replit Agent
  Version: 1.0
*/

:root {
  /* === Material Design 3 Typography === */
  --font-google: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Typography Scale (Material Design) */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  
  /* === Material Design Spacing === */
  --space-0: 0;
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  
  /* === Material Design Radius === */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* === Material Design Shadows === */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* === Touch Target Sizes === */
  --touch-sm: 2.75rem;   /* 44px - minimum touch target */
  --touch-md: 3rem;      /* 48px - comfortable touch */
  --touch-lg: 3.5rem;    /* 56px - large touch */
  
  /* === Z-Index Scale === */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  
  /* === Animation === */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  
  /* === Layout === */
  --container-max: 1200px;
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
}

/* === Global Typography Reset === */
body {
  font-family: var(--font-system);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* === Google-Style Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-system);
  font-weight: 600;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-3xl); font-weight: 700; }
h2 { font-size: var(--text-2xl); font-weight: 600; }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-lg); font-weight: 600; }
h5 { font-size: var(--text-base); font-weight: 600; }
h6 { font-size: var(--text-sm); font-weight: 600; }

/* === Material Design Components Base === */

/* Buttons */
.md-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-sm);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  font-weight: 500;
  font-size: var(--text-sm);
  line-height: var(--leading-tight);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* Button variants */
.md-button--filled {
  background-color: var(--color-gold);
  color: var(--color-black);
  box-shadow: var(--shadow-sm);
}

.md-button--filled:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.md-button--outlined {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.md-button--outlined:hover {
  background-color: var(--color-bg-secondary);
}

.md-button--text {
  background-color: transparent;
  color: var(--color-gold);
  padding: var(--space-2) var(--space-3);
}

.md-button--text:hover {
  background-color: rgba(211, 175, 55, 0.08);
}

/* FAB (Floating Action Button) - ENTFERNT */
/* User bevorzugt klassische Buttons */

/* Cards */
.md-card {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.md-card:hover {
  box-shadow: var(--shadow-md);
}

.md-card__header {
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.md-card__content {
  padding: 0 var(--space-5) var(--space-5);
}

.md-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

/* Input Fields */
.md-input {
  position: relative;
  margin-bottom: var(--space-5);
}

.md-input__field {
  width: 100%;
  min-height: var(--touch-sm);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-out);
  box-sizing: border-box;
}

.md-input__field::placeholder {
  color: var(--color-text-secondary);
}

.md-input__field:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(211, 175, 55, 0.1);
}

.md-input__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

/* Chips */
.md-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.md-chip:hover {
  background-color: var(--color-bg);
}

.md-chip--selected {
  background-color: var(--color-gold);
  color: var(--color-black);
  border-color: var(--color-gold);
}

.md-chip__remove {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin-left: var(--space-1);
  font-size: var(--text-xs);
}

/* Bottom Navigation */
.md-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-fixed);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.md-bottom-nav__items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
}

.md-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  min-height: var(--touch-sm);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--color-text-secondary);
}

.md-bottom-nav__item:hover {
  background-color: var(--color-bg);
}

.md-bottom-nav__item--active {
  color: var(--color-gold);
}

.md-bottom-nav__icon {
  font-size: var(--text-lg);
}

.md-bottom-nav__label {
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Ripple effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.md-ripple {
  position: relative;
  overflow: hidden;
}

.md-ripple::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 var(--duration-normal), height var(--duration-normal);
}

.md-ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  :root {
    --text-base: 0.875rem;
    --space-4: 0.875rem;
    --space-5: 1rem;
    --space-6: 1.25rem;
  }
  
  body {
    padding-bottom: calc(var(--touch-lg) + var(--space-4)); /* Space for bottom nav */
  }
  
  /* .md-fab entfernt - User bevorzugt klassische Buttons */
}