/* Khzanti Flutter Web Integration CSS */
/* This file provides CSS classes that map Flutter widgets to web styles */

/* ===== FLUTTER WEB WIDGET MAPPINGS ===== */

/* Material Button Integration */
.material-button.khzanti-button {
  /* Flutter Material Button styles */
  border-radius: 4px;
  font-family: var(--font-family-latin);
  font-weight: 500;
  letter-spacing: 0.0892857143em;
  text-transform: uppercase;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ElevatedButton Mapping */
.elevated-button.khzanti-button--primary {
  background-color: var(--color-primary-green);
  color: white;
  box-shadow: var(--shadow-sm);
}

.elevated-button.khzanti-button--primary:hover {
  background-color: var(--color-primary-green-hover);
  box-shadow: var(--shadow-md);
}

/* OutlinedButton Mapping */
.outlined-button.khzanti-button--outlined {
  border: 1px solid var(--color-primary-green);
  background-color: transparent;
  color: var(--color-primary-green);
}

.outlined-button.khzanti-button--outlined:hover {
  background-color: rgba(27, 77, 62, 0.04);
}

/* TextButton Mapping */
.text-button.khzanti-button--text {
  background-color: transparent;
  color: var(--color-primary-green);
  border: none;
}

.text-button.khzanti-button--text:hover {
  background-color: rgba(27, 77, 62, 0.04);
}

/* ===== CARD INTEGRATION ===== */

/* Card Widget Mapping */
.material-card.khzanti-card {
  border-radius: 12px;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.material-card.khzanti-card:hover {
  box-shadow: var(--shadow-md);
}

/* ===== TEXT FIELD INTEGRATION ===== */

/* TextField Mapping */
.material-text-field .mdc-text-field {
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
  background-color: var(--color-surface);
}

.material-text-field .mdc-text-field--focused {
  border-color: var(--color-primary-green);
  box-shadow: 0 0 0 2px rgba(27, 77, 62, 0.1);
}

.material-text-field .mdc-text-field__input {
  color: var(--color-text-primary);
  font-family: var(--font-family-latin);
}

/* ===== APP BAR INTEGRATION ===== */

/* AppBar Mapping */
.material-app-bar.khzanti-header {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  height: 64px;
}

/* ===== DRAWER INTEGRATION ===== */

/* Drawer Mapping */
.material-drawer {
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-border-light);
  width: 280px;
}

/* ===== LIST TILE INTEGRATION ===== */

/* ListTile Mapping */
.material-list-tile {
  padding: 12px 16px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.material-list-tile:hover {
  background-color: rgba(27, 77, 62, 0.04);
}

.material-list-tile.selected {
  background-color: rgba(27, 77, 62, 0.08);
  color: var(--color-primary-green);
}

/* ===== CHIP INTEGRATION ===== */

/* Chip/ActionChip Mapping */
.material-chip.khzanti-chip {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 13px;
  border: 1px solid var(--color-border-light);
}

.material-chip.khzanti-chip--selected {
  background-color: var(--color-primary-green);
  color: white;
  border-color: var(--color-primary-green);
}

/* ===== DIALOG INTEGRATION ===== */

/* Dialog Mapping */
.material-dialog .mdc-dialog__surface {
  border-radius: 12px;
  max-width: 560px;
  background-color: var(--color-surface);
}

.material-dialog .mdc-dialog__title {
  color: var(--color-text-primary);
  font-family: var(--font-family-latin);
  font-weight: 500;
}

/* ===== SNACKBAR INTEGRATION ===== */

/* SnackBar Mapping */
.material-snackbar .mdc-snackbar__surface {
  background-color: var(--color-primary-green);
  color: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.material-snackbar--error .mdc-snackbar__surface {
  background-color: var(--color-error);
}

.material-snackbar--warning .mdc-snackbar__surface {
  background-color: var(--color-warning);
  color: var(--color-text-primary);
}

/* ===== TAB BAR INTEGRATION ===== */

/* TabBar Mapping */
.material-tab-bar .mdc-tab {
  color: var(--color-text-secondary);
  font-family: var(--font-family-latin);
}

.material-tab-bar .mdc-tab--active {
  color: var(--color-primary-green);
}

.material-tab-bar .mdc-tab-indicator {
  background-color: var(--color-primary-green);
}

/* ===== BOTTOM NAVIGATION INTEGRATION ===== */

/* BottomNavigationBar Mapping */
.material-bottom-nav {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.material-bottom-nav .mdc-bottom-navigation__list-item {
  color: var(--color-text-secondary);
}

.material-bottom-nav .mdc-bottom-navigation__list-item--activated {
  color: var(--color-primary-green);
}

/* ===== PROGRESS INDICATOR INTEGRATION ===== */

/* CircularProgressIndicator Mapping */
.material-progress-circular {
  color: var(--color-primary-green);
}

/* LinearProgressIndicator Mapping */
.material-progress-linear .mdc-linear-progress__buffer-bar {
  background-color: rgba(27, 77, 62, 0.1);
}

.material-progress-linear .mdc-linear-progress__bar {
  background-color: var(--color-primary-green);
}

/* ===== SWITCH INTEGRATION ===== */

/* Switch Mapping */
.material-switch .mdc-switch__track {
  background-color: var(--color-border-medium);
}

.material-switch .mdc-switch--selected .mdc-switch__track {
  background-color: var(--color-primary-green);
}

.material-switch .mdc-switch__thumb {
  background-color: white;
  border: 1px solid var(--color-border-medium);
}

.material-switch .mdc-switch--selected .mdc-switch__thumb {
  border-color: var(--color-primary-green);
}

/* ===== CHECKBOX INTEGRATION ===== */

/* Checkbox Mapping */
.material-checkbox .mdc-checkbox__background {
  border-color: var(--color-border-medium);
  background-color: transparent;
}

.material-checkbox .mdc-checkbox--selected .mdc-checkbox__background {
  background-color: var(--color-primary-green);
  border-color: var(--color-primary-green);
}

/* ===== RADIO INTEGRATION ===== */

/* Radio Mapping */
.material-radio .mdc-radio__background {
  border-color: var(--color-border-medium);
}

.material-radio .mdc-radio--selected .mdc-radio__background {
  border-color: var(--color-primary-green);
}

.material-radio .mdc-radio__inner-circle {
  background-color: var(--color-primary-green);
}

/* ===== SLIDER INTEGRATION ===== */

/* Slider Mapping */
.material-slider .mdc-slider__track {
  background-color: var(--color-border-medium);
}

.material-slider .mdc-slider__track--active {
  background-color: var(--color-primary-green);
}

.material-slider .mdc-slider__thumb {
  background-color: var(--color-primary-green);
}

/* ===== FLUTTER WEB SPECIFIC FIXES ===== */

/* Fix for Flutter web font rendering */
.flutter-view {
  font-family: var(--font-family-latin);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fix for Flutter web focus outlines */
.flutter-view *:focus {
  outline: 2px solid var(--color-primary-gold);
  outline-offset: 2px;
}

/* Fix for Flutter web scrolling */
.flutter-view {
  overflow-x: hidden;
}

/* Fix for Flutter web touch targets */
.flutter-view button,
.flutter-view [role="button"],
.flutter-view input,
.flutter-view select,
.flutter-view textarea {
  min-height: 44px;
  min-width: 44px;
}

/* ===== RESPONSIVE FIXES FOR FLUTTER WEB ===== */

@media (max-width: 768px) {
  .flutter-view .material-app-bar {
    height: 56px;
  }

  .flutter-view .material-drawer {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
  }
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
  .flutter-view {
    --color-background: #121212;
    --color-surface: #1E1E1E;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #BBBBBB;
    --color-border-light: #333333;
  }
}

/* ===== HIGH CONTRAST MODE ===== */

@media (prefers-contrast: high) {
  .flutter-view {
    --color-primary-green: #000000;
    --color-primary-gold: #FFD700;
    --color-text-primary: #000000;
    --color-surface: #FFFFFF;
  }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
  .flutter-view * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}