/* Material Design 3 (Material You) Design System */

/* Color Tokens - Material Design 3 Baseline Color System */
/* Based on https://m3.material.io/styles/color/system/overview */
:root {
  /* Primary Colors - Baseline Blue */
  --md-primary: #1976D2;
  --md-on-primary: #FFFFFF;
  --md-primary-container: #D1E4FF;
  --md-on-primary-container: #001D35;
  
  /* Secondary Colors - Baseline Teal */
  --md-secondary: #03DAC6;
  --md-on-secondary: #000000;
  --md-secondary-container: #A6F4E8;
  --md-on-secondary-container: #00201C;
  
  /* Tertiary Colors - Baseline Orange */
  --md-tertiary: #FF6D00;
  --md-on-tertiary: #FFFFFF;
  --md-tertiary-container: #FFDBCA;
  --md-on-tertiary-container: #2D1600;
  
  /* Error Colors */
  --md-error: #BA1A1A;
  --md-on-error: #FFFFFF;
  --md-error-container: #FFDAD6;
  --md-on-error-container: #410002;
  
  /* Surface Colors */
  --md-surface: #FEFBFF;
  --md-on-surface: #1A1C1E;
  --md-surface-variant: #DFE2EB;
  --md-on-surface-variant: #43474E;
  
  /* Outline */
  --md-outline: #73777F;
  --md-outline-variant: #C3C7CF;
  
  /* Shadow/Elevation */
  --md-shadow-color: rgba(0, 0, 0, 0.15);
  
  /* Background */
  --md-background: #FEFBFF;
  --md-on-background: #1A1C1E;
  
  /* Elevation Shadows */
  --md-elevation-0: none;
  --md-elevation-1: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
  --md-elevation-2: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.3), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
  --md-elevation-4: 0px 2px 3px 0px rgba(0, 0, 0, 0.3), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);
  --md-elevation-5: 0px 4px 4px 0px rgba(0, 0, 0, 0.3), 0px 8px 12px 6px rgba(0, 0, 0, 0.15);
}

/* Typography - Material Design 3 Type Scale */
.md-display-large {
  font-size: 3.5625rem;
  font-weight: 400;
  line-height: 4rem;
  letter-spacing: -0.015625rem;
}

.md-display-medium {
  font-size: 2.8125rem;
  font-weight: 400;
  line-height: 3.25rem;
}

.md-display-small {
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 2.75rem;
}

.md-headline-large {
  font-size: 2rem;
  font-weight: 400;
  line-height: 2.5rem;
}

.md-headline-medium {
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 2.25rem;
}

.md-headline-small {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 2rem;
}

.md-title-large {
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.75rem;
}

.md-title-medium {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
  letter-spacing: 0.009375rem;
}

.md-title-small {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: 0.00625rem;
}

.md-label-large {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: 0.00625rem;
}

.md-label-medium {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  letter-spacing: 0.03125rem;
}

.md-label-small {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1rem;
  letter-spacing: 0.03125rem;
}

.md-body-large {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  letter-spacing: 0.03125rem;
}

.md-body-medium {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  letter-spacing: 0.015625rem;
}

.md-body-small {
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1rem;
  letter-spacing: 0.025rem;
}

/* Buttons - Material Design 3 */
.md-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: 0.00625rem;
  text-transform: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  overflow: hidden;
}

.md-button-filled {
  background-color: var(--md-primary);
  color: var(--md-on-primary);
  box-shadow: var(--md-elevation-1);
}

.md-button-filled:hover {
  box-shadow: var(--md-elevation-2);
  background-color: color-mix(in srgb, var(--md-primary) 85%, black);
}

.md-button-filled:active {
  box-shadow: var(--md-elevation-1);
}

.md-button-outlined {
  background-color: transparent;
  color: var(--md-primary);
  border: 1px solid var(--md-outline);
  box-shadow: none;
}

.md-button-outlined:hover {
  background-color: color-mix(in srgb, var(--md-primary) 8%, transparent);
}

.md-button-text {
  background-color: transparent;
  color: var(--md-primary);
  padding: 0.625rem 1rem;
}

.md-button-text:hover {
  background-color: color-mix(in srgb, var(--md-primary) 8%, transparent);
}

.md-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* FAB - Floating Action Button */
.md-fab {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background-color: var(--md-primary-container);
  color: var(--md-on-primary-container);
  border: none;
  box-shadow: var(--md-elevation-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1000;
}

.md-fab:hover {
  box-shadow: var(--md-elevation-4);
}

.md-fab:active {
  box-shadow: var(--md-elevation-3);
}

.md-fab-extended {
  width: auto;
  padding: 0 1rem;
  border-radius: 1rem;
  gap: 0.75rem;
}

/* Cards - Material Design 3 */
.md-card {
  background-color: var(--md-surface);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: var(--md-elevation-1);
  border: none;
}

/* Hover state only for cards that ARE clickable (not cards containing clickable elements) */
.md-card-clickable {
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
}

.md-card-clickable:hover,
a.md-card:hover {
  box-shadow: var(--md-elevation-2);
  transform: translateY(-2px);
}

.md-card-elevated {
  box-shadow: var(--md-elevation-1);
}

.md-card-outlined {
  box-shadow: none;
  border: 1px solid var(--md-outline-variant);
}

.md-card-filled {
  background-color: var(--md-surface-variant);
  box-shadow: none;
}

/* Subtle Card Color Variants - Material Design 3 Tints */
.md-card-tint-0 {
  background-color: color-mix(in srgb, var(--md-primary) 4%, var(--md-surface));
}

.md-card-tint-1 {
  background-color: color-mix(in srgb, var(--md-secondary) 4%, var(--md-surface));
}

.md-card-tint-2 {
  background-color: color-mix(in srgb, var(--md-tertiary) 4%, var(--md-surface));
}

.md-card-tint-3 {
  background-color: color-mix(in srgb, var(--md-primary) 3%, var(--md-surface));
}

.md-card-tint-4 {
  background-color: color-mix(in srgb, var(--md-secondary) 3%, var(--md-surface));
}

.md-card-tint-5 {
  background-color: color-mix(in srgb, var(--md-tertiary) 3%, var(--md-surface));
}

.md-card-tint-6 {
  background-color: color-mix(in srgb, var(--md-primary-container) 8%, var(--md-surface));
}

.md-card-tint-7 {
  background-color: color-mix(in srgb, var(--md-secondary-container) 8%, var(--md-surface));
}

.md-card-tint-8 {
  background-color: color-mix(in srgb, var(--md-tertiary-container) 8%, var(--md-surface));
}

/* Text Fields - Material Design 3 */
.md-text-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.md-text-field input,
.md-text-field textarea {
  padding: 1rem 1rem;
  border-radius: 0.25rem 0.25rem 0 0;
  border: none;
  border-bottom: 1px solid var(--md-outline);
  background-color: transparent;
  color: var(--md-on-surface);
  font-size: 1rem;
  line-height: 1.5rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  outline: none;
}

.md-text-field input:focus,
.md-text-field textarea:focus {
  border-bottom-color: var(--md-primary);
  border-bottom-width: 2px;
  padding-bottom: calc(1rem - 1px);
}

.md-text-field input::placeholder,
.md-text-field textarea::placeholder {
  color: var(--md-on-surface-variant);
  opacity: 0.6;
}

.md-text-field-filled {
  background-color: var(--md-surface-variant);
  border-radius: 0.25rem 0.25rem 0 0;
  padding: 0.5rem 1rem 0 1rem;
}

.md-text-field-filled input,
.md-text-field-filled textarea {
  padding: 1.5rem 0 0.5rem 0;
  border-bottom: none;
}

.md-text-field-filled input:focus,
.md-text-field-filled textarea:focus {
  padding-bottom: calc(0.5rem - 1px);
}

.md-text-field-outlined {
  border: 1px solid var(--md-outline);
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
}

.md-text-field-outlined input,
.md-text-field-outlined textarea {
  border-bottom: none;
  padding: 0;
  height: auto;
  line-height: 1.5rem;
}

.md-text-field-outlined:focus-within {
  border-color: var(--md-primary);
  border-width: 2px;
  padding: calc(0.5rem - 1px);
}

/* Chips - Material Design 3 */
.md-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  background-color: var(--md-surface-variant);
  color: var(--md-on-surface-variant);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.md-chip:hover {
  box-shadow: var(--md-elevation-1);
  background-color: color-mix(in srgb, var(--md-primary) 8%, var(--md-surface-variant));
}

.md-chip-outlined:hover {
  background-color: color-mix(in srgb, var(--md-primary) 8%, transparent);
  border-color: var(--md-primary);
}

.md-chip-filled {
  background-color: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}

.md-chip-outlined {
  background-color: transparent;
  border: 1px solid var(--md-outline);
  color: var(--md-on-surface-variant);
}

/* Navigation - Material Design 3 */
.md-navigation-bar {
  background-color: var(--md-surface);
  box-shadow: var(--md-elevation-2);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.md-navigation-rail {
  background-color: var(--md-surface);
  box-shadow: var(--md-elevation-1);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 5rem;
}

.md-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1.5rem;
  color: var(--md-on-surface-variant);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  font-size: 0.875rem;
  font-weight: 500;
}

.md-nav-item:hover {
  background-color: color-mix(in srgb, var(--md-primary) 8%, transparent);
  color: var(--md-on-surface);
}

.md-nav-item.active {
  background-color: color-mix(in srgb, var(--md-primary) 12%, transparent);
  color: var(--md-primary);
}

/* Search Bar - Material Design 3 */
.md-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--md-surface-variant);
  border-radius: 1.75rem;
  padding: 0.625rem 1rem;
  gap: 0.75rem;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.md-search-bar:focus-within {
  background-color: var(--md-surface);
  box-shadow: var(--md-elevation-2);
}

.md-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--md-on-surface);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.md-search-bar input::placeholder {
  color: var(--md-on-surface-variant);
}

.md-search-bar svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--md-on-surface-variant);
}

/* Status Badges - Material Design 3 */
.md-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  letter-spacing: 0.03125rem;
}

.md-badge-filled {
  background-color: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}

.md-badge-outlined {
  background-color: transparent;
  border: 1px solid var(--md-outline);
  color: var(--md-on-surface-variant);
}

/* Snackbar/Toast - Material Design 3 */
.md-snackbar {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--md-inverse-surface);
  color: var(--md-inverse-on-surface);
  padding: 0.875rem 1rem;
  border-radius: 0.25rem;
  box-shadow: var(--md-elevation-3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 21.25rem;
  max-width: 33.75rem;
}

/* Dividers - Material Design 3 */
.md-divider {
  height: 1px;
  background-color: var(--md-outline-variant);
  border: none;
  margin: 0;
}

/* Surface Tints */
.md-surface-tint {
  background-color: color-mix(in srgb, var(--md-primary) 5%, var(--md-surface));
}

/* Animations */
@keyframes md-ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.md-ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: md-ripple 0.6s ease-out;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .md-fab {
    bottom: 1rem;
    right: 1rem;
  }
  
  .md-navigation-bar {
    padding: 0.5rem 0.75rem;
  }
  
  .md-card {
    padding: 0.75rem;
  }
}

