/* ============================================================
   VoxFix App - Supplementary Styles
   Extends design-system-dark.css with app-specific components
   ============================================================ */

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  min-width: 280px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 300ms ease-out;
}
.toast-info    { background: var(--color-info-bg);    color: var(--color-info);    border: 1px solid var(--color-info-border); }
.toast-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); }
.toast-warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); }
.toast-error   { background: var(--color-error-bg);   color: var(--color-error);   border: 1px solid var(--color-error-border); }
.toast-close {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: var(--text-lg); line-height: 1; opacity: 0.6;
}
.toast-close:hover { opacity: 1; }
.toast-enter { animation: slideInRight 300ms ease-out; }
.toast-leave { animation: slideOutRight 300ms ease-in; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}
.breadcrumb a { color: var(--accent-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-secondary); }

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.page-header h1 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}
.page-header .actions {
  display: flex;
  gap: var(--space-3);
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--bg-surface-0);
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-muted);
}
.drop-zone .drop-icon {
  font-size: 48px;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}
.drop-zone .drop-text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.drop-zone .drop-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Recipe Grid ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}
.recipe-card {
  background: var(--bg-surface-1);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}
.recipe-card:hover {
  border-color: var(--border-default);
  background: var(--bg-hover);
}
.recipe-card.selected {
  border-color: var(--accent-primary);
  background: var(--accent-muted);
}
.recipe-card .recipe-icon {
  font-size: 28px;
  margin-bottom: var(--space-2);
}
.recipe-card .recipe-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

/* ── Progress Bar (enhanced) ── */
.progress-bar-container {
  width: 100%;
  margin: var(--space-3) 0;
}
.progress-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  transition: width 500ms ease;
}
.progress-bar-fill.success { background: var(--color-success); }
.progress-bar-fill.error   { background: var(--color-error); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}
.empty-state .empty-title {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.empty-state .empty-desc {
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
}

/* ── Diff View ── */
.diff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.diff-toolbar .mode-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-surface-3);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.diff-toolbar .mode-btn {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}
.diff-toolbar .mode-btn.active {
  background: var(--accent-primary);
  color: #fff;
}
.diff-chips {
  display: flex;
  gap: var(--space-2);
}
.diff-chip {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}
.diff-chip.active {
  background: var(--accent-muted);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* ── Settings Form ── */
.settings-group {
  margin-bottom: var(--space-6);
}
.settings-group h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.form-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.form-label {
  flex: 0 0 140px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.form-input {
  flex: 1;
}
.form-input input,
.form-input select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast);
}
.form-input input:focus,
.form-input select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ── Search Bar ── */
.search-bar {
  position: relative;
  max-width: 400px;
}
.search-bar input {
  width: 100%;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-8);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
}
.search-bar input:focus {
  border-color: var(--accent-primary);
}
.search-bar .search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Export Dropdown ── */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
}
.dropdown-item:hover {
  background: var(--bg-hover);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
  }
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: 200;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0 !important;
    padding: var(--space-4) !important;
    padding-top: 48px !important;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .diff-toolbar {
    flex-direction: column;
    gap: var(--space-3);
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-label {
    flex: none;
  }
  .diff-side-by-side {
    grid-template-columns: 1fr !important;
  }
}
