/*
 * ============================================
 * FLOW THEME TEMPLATE
 * ============================================
 * 
 * HOW TO USE:
 * 1. Copy this file and rename it: my-theme-name.css
 * 2. Change ONLY the variable values below (the parts after the colon)
 * 3. DO NOT rename any variables - the HTML depends on these exact names
 * 4. Add any extra component styles BELOW the :root section
 * 5. To test: replace the current theme CSS link in your local copy
 *    or use browser DevTools to paste your :root overrides
 *
 * CONSTRAINTS:
 * - CSS only (no JavaScript)
 * - Must work with the existing HTML structure
 * - Responsive (mobile-first)
 * - WCAG AA contrast minimum (4.5:1 for text, 3:1 for large text)
 * - Use https://webaim.org/resources/contrastchecker/ to verify
 *
 * ============================================
 */

:root {
  /* ==========================================
   * BRAND COLORS
   * ========================================== */

  /* Primary - main brand color, used for buttons, links, active states */
  --color-primary: #047857;
  --color-primary-hover: #065f46;
  --color-primary-light: #d1fae5;
  --color-primary-dark: #064e3b;

  /* Secondary - supporting color, used for secondary buttons, badges */
  --color-secondary: #64748b;
  --color-secondary-hover: #475569;
  --color-secondary-light: #f1f5f9;

  /* Accent - highlight color for callouts, notifications, special elements */
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-accent-light: #fef3c7;

  /* ==========================================
   * SEMANTIC COLORS (status/feedback)
   * ========================================== */

  --color-success: #22c55e;
  --color-success-light: #dcfce7;
  --color-success-dark: #15803d;

  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-warning-dark: #b45309;

  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  --color-danger-dark: #b91c1c;

  --color-info: #3b82f6;
  --color-info-light: #dbeafe;
  --color-info-dark: #1d4ed8;

  /* ==========================================
   * BACKGROUNDS
   * ========================================== */

  /* Page background */
  --bg-body: #f8fafc;

  /* Card/panel backgrounds */
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;

  /* Sidebar / navigation background */
  --bg-sidebar: #1e293b;
  --bg-sidebar-hover: #334155;
  --bg-sidebar-active: #0f172a;

  /* Header / top bar */
  --bg-header: #ffffff;

  /* Table rows */
  --bg-table-header: #f1f5f9;
  --bg-table-row-alt: #f8fafc;
  --bg-table-row-hover: #e2e8f0;

  /* Modal overlay */
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* ==========================================
   * TEXT COLORS
   * ========================================== */

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --text-link: var(--color-primary);
  --text-link-hover: var(--color-primary-hover);

  /* Sidebar text */
  --text-sidebar: #cbd5e1;
  --text-sidebar-active: #ffffff;

  /* ==========================================
   * TYPOGRAPHY
   * ========================================== */

  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: var(--font-family-base);
  --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;

  /* ==========================================
   * SPACING
   * ========================================== */

  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  --spacing-2xl: 3rem;     /* 48px */

  /* ==========================================
   * BORDERS & RADIUS
   * ========================================== */

  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --border-color-dark: #cbd5e1;
  --border-width: 1px;

  --radius-sm: 0.25rem;    /* 4px */
  --radius-md: 0.375rem;   /* 6px */
  --radius-lg: 0.5rem;     /* 8px */
  --radius-xl: 0.75rem;    /* 12px */
  --radius-full: 9999px;   /* pill shape */

  /* ==========================================
   * SHADOWS
   * ========================================== */

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* ==========================================
   * TRANSITIONS
   * ========================================== */

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* ==========================================
   * LAYOUT
   * ========================================== */

  --sidebar-width: 260px;
  --sidebar-collapsed-width: 64px;
  --header-height: 64px;
  --content-max-width: 1280px;

  /* ==========================================
   * Z-INDEX SCALE
   * ========================================== */

  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-tooltip: 400;
  --z-toast: 500;

  /* ==========================================
   * RACK VIEW (reservation grid)
   * ========================================== */

  --rack-cell-height: 32px;
  --rack-header-bg: var(--bg-table-header);
  --rack-grid-line: var(--border-color-light);
  --rack-occupied-bg: var(--color-primary-light);
  --rack-occupied-text: var(--color-primary-dark);
  --rack-available-bg: var(--bg-card);
  --rack-blocked-bg: #fef2f2;
  --rack-selected-border: var(--color-primary);
}

/* ============================================
 * COMPONENT OVERRIDES
 * ============================================
 * Add your custom component styles below.
 * These override default styles using the
 * variables defined above.
 * ============================================ */

/* Flow primary controls. Keep DataTable row/action controls on their existing Bootstrap/action-menu styling. */
.btn-primary:not(.dt-button),
.btn--primary,
.badge--primary,
.bg-primary,
.bg-c1,
.page-item.active .page-link,
.custom-control-input:checked ~ .custom-control-label::before,
.switch input:checked + .slider,
.switcher_input:checked + .switcher_control,
.swal2-styled.swal2-confirm {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--text-inverse) !important;
}
.btn-primary:not(.dt-button):hover,
.btn-primary:not(.dt-button):focus,
.btn--primary:hover,
.btn--primary:focus,
.page-item.active .page-link:hover {
  background-color: var(--color-primary-hover) !important;
  border-color: var(--color-primary-hover) !important;
  color: var(--text-inverse) !important;
}
.btn-outline-primary:not(.dt-button),
.btn-outline--primary,
.badge-soft--primary,
.text-primary,
.text--primary {
  color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}
.btn-outline-primary:not(.dt-button):hover,
.btn-outline--primary:hover {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--text-inverse) !important;
}

.dataTable .btn-primary,
.table.dataTable .btn-primary,
.dt-container .btn-primary,
.dataTables_wrapper .btn-primary,
.flow-action-menu .btn-primary {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #fff !important;
}
.dataTable .btn-outline-primary,
.table.dataTable .btn-outline-primary,
.dt-container .btn-outline-primary,
.dataTables_wrapper .btn-outline-primary,
.flow-action-menu .btn-outline-primary {
  color: #0d6efd !important;
  border-color: #0d6efd !important;
  background-color: transparent !important;
}
