/* =========================================================
   CloudSpark Color Palette - Bootstrap 5.3 Theming
   Primary: Orange | Secondary: Teal
   Warm gray scale (slightly orange-tinted)
   Now using data-bs-theme="light" / "dark"
   ========================================================= */

/* ======================================
   LIGHT THEME
   ====================================== */
:root[data-bs-theme="light"] {
  /* Brand Colors */
  --bs-primary: rgba(249, 115, 22, 1); /* Orange 600 */
  --bs-primary-rgb: 249, 115, 22;

  --bs-secondary: rgba(13, 148, 136, 1); /* Teal 600 */
  --bs-secondary-rgb: 13, 148, 136;

  --bs-success: rgba(34, 197, 94, 1); /* Green 500 */
  --bs-success-rgb: 34, 197, 94;

  --bs-danger: rgba(239, 68, 68, 1); /* Red 500 */
  --bs-danger-rgb: 239, 68, 68;

  --bs-warning: rgba(251, 191, 36, 1); /* Amber 400 */
  --bs-warning-rgb: 251, 191, 36;

  --bs-info: rgba(2, 132, 199, 1); /* Sky 600 */
  --bs-info-rgb: 2, 132, 199;

  /* Backgrounds */
  --bs-body-bg: rgba(249, 250, 251, 1); /* Gray 50 */
  --bs-surface-bg: rgba(255, 255, 255, 1); /* Pure White */

  /* Text */
  --bs-body-color: rgba(17, 24, 39, 1); /* Gray 900 */
  --bs-body-color-rgb: 17, 24, 39;
  --bs-heading-color: rgba(15, 23, 42, 1); /* Gray 950 */

  /* Links */
  --bs-link-color: rgba(249, 115, 22, 1);
  --bs-link-hover-color: rgba(234, 88, 12, 1);

  /* Warm Gray Scale (slightly orange-tinted) */
  --bs-gray-100: rgba(254, 250, 245, 1);
  --bs-gray-200: rgba(250, 243, 236, 1);
  --bs-gray-300: rgba(245, 236, 229, 1);
  --bs-gray-400: rgba(230, 213, 200, 1);
  --bs-gray-500: rgba(199, 174, 156, 1);
  --bs-gray-600: rgba(160, 137, 121, 1);
  --bs-gray-700: rgba(120, 100, 90, 1);
  --bs-gray-800: rgba(82, 68, 62, 1);
  --bs-gray-900: rgba(41, 34, 31, 1);
}

/* Buttons - Light (use per-component CSS vars so compiled Bootstrap colors are overridden) */
:root[data-bs-theme="light"] .btn-primary {
  --bs-btn-color: rgba(255, 255, 255, 1);
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-color: rgba(255, 255, 255, 1);
  --bs-btn-hover-bg: rgba(234, 88, 12, 1); /* Orange 700 */
  --bs-btn-hover-border-color: rgba(234, 88, 12, 1);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
  --bs-btn-active-color: rgba(255, 255, 255, 1);
  --bs-btn-active-bg: rgba(194, 65, 12, 1); /* Orange 800 */
  --bs-btn-active-border-color: rgba(194, 65, 12, 1);
  --bs-btn-disabled-bg: rgba(253, 186, 116, 1); /* Orange 300 */
  --bs-btn-disabled-border-color: rgba(253, 186, 116, 1);
}

:root[data-bs-theme="light"] .btn-secondary {
  --bs-btn-color: rgba(255, 255, 255, 1);
  --bs-btn-bg: var(--bs-secondary);
  --bs-btn-border-color: var(--bs-secondary);
  --bs-btn-hover-color: rgba(255, 255, 255, 1);
  --bs-btn-hover-bg: rgba(15, 118, 110, 1); /* Teal 700 */
  --bs-btn-hover-border-color: rgba(15, 118, 110, 1);
  --bs-btn-focus-shadow-rgb: var(--bs-secondary-rgb);
  --bs-btn-active-color: rgba(255, 255, 255, 1);
  --bs-btn-active-bg: rgba(12, 105, 97, 1); /* Teal 800 */
  --bs-btn-active-border-color: rgba(12, 105, 97, 1);
  --bs-btn-disabled-bg: rgba(94, 234, 212, 1); /* Teal 300 */
  --bs-btn-disabled-border-color: rgba(94, 234, 212, 1);
}

:root[data-bs-theme="light"] .btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-color: rgba(255, 255, 255, 1);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-active-bg: rgba(234, 88, 12, 1);
  --bs-btn-active-border-color: rgba(234, 88, 12, 1);
}

:root[data-bs-theme="light"] .btn-outline-secondary {
  --bs-btn-color: var(--bs-secondary);
  --bs-btn-border-color: var(--bs-secondary);
  --bs-btn-hover-color: rgba(255, 255, 255, 1);
  --bs-btn-hover-bg: var(--bs-secondary);
  --bs-btn-hover-border-color: var(--bs-secondary);
  --bs-btn-active-bg: rgba(15, 118, 110, 1);
  --bs-btn-active-border-color: rgba(15, 118, 110, 1);
}

/* ======================================
   DARK THEME — Teal-Gray, soft & modern
   ====================================== */
:root[data-bs-theme="dark"] {
  /* Brand (mantém sua paleta) */
  --bs-primary: rgba(251, 146, 60, 1); /* Orange 400 */
  --bs-primary-rgb: 251, 146, 60;
  --bs-secondary: rgba(20, 184, 166, 1); /* Teal 500 */
  --bs-secondary-rgb: 20, 184, 166;

  /* Backgrounds (teal-gray, sem viés azulado) */
  --bs-body-bg: rgba(14, 22, 22, 1); /* #0E1616 */
  --bs-surface-bg: rgba(22, 32, 33, 1); /* #162021 */

  /* Text */
  --bs-body-color: rgba(241, 245, 244, 1); /* #F1F5F4 */
  --bs-heading-color: rgba(248, 250, 250, 1); /* quase branco */

  /* Links */
  --bs-link-color: rgba(251, 146, 60, 1);
  --bs-link-hover-color: rgba(249, 115, 22, 1);

  /* Teal-gray scale (100 = mais escuro) */
  --bs-gray-100: rgba(15, 23, 23, 1); /* #0F1717 */
  --bs-gray-200: rgba(21, 33, 34, 1); /* #152122 */
  --bs-gray-300: rgba(29, 44, 45, 1); /* #1D2C2D */
  --bs-gray-400: rgba(42, 60, 61, 1); /* #2A3C3D */
  --bs-gray-500: rgba(56, 80, 82, 1); /* #385052 */
  --bs-gray-600: rgba(81, 108, 110, 1); /* #516C6E */
  --bs-gray-700: rgba(106, 134, 136, 1); /* #6A8688 */
  --bs-gray-800: rgba(157, 178, 179, 1); /* #9DB2B3 */
  --bs-gray-900: rgba(211, 221, 221, 1); /* #D3DDDD */

  /* Bordas unificadas e suaves (corrige inputs/search/dropdowns) */
  --bs-border-color: var(--bs-gray-500);
  --bs-border-color-translucent: rgba(255, 255, 255, 0.08);

  /* Estados auxiliares (mantidos) */
  --bs-success: rgba(34, 197, 94, 1);
  --bs-danger: rgba(248, 113, 113, 1);
  --bs-warning: rgba(253, 224, 71, 1);
  --bs-info: rgba(56, 189, 248, 1);
}

/* Buttons - Dark */
:root[data-bs-theme="dark"] .btn-primary {
  --bs-btn-color: rgba(0, 0, 0, 0.9);
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-color: rgba(0, 0, 0, 0.95);
  --bs-btn-hover-bg: rgba(249, 115, 22, 1);
  --bs-btn-hover-border-color: rgba(249, 115, 22, 1);
  --bs-btn-active-bg: rgba(234, 88, 12, 1);
  --bs-btn-active-border-color: rgba(234, 88, 12, 1);
}

:root[data-bs-theme="dark"] .btn-secondary {
  --bs-btn-color: rgba(0, 0, 0, 0.9);
  --bs-btn-bg: var(--bs-secondary);
  --bs-btn-border-color: var(--bs-secondary);
  --bs-btn-hover-color: rgba(0, 0, 0, 0.95);
  --bs-btn-hover-bg: rgba(45, 212, 191, 1);
  --bs-btn-hover-border-color: rgba(45, 212, 191, 1);
  --bs-btn-active-bg: rgba(20, 184, 166, 1);
  --bs-btn-active-border-color: rgba(20, 184, 166, 1);
}

/* LIGHT */
:root[data-bs-theme="light"] {
  /* unify border color tokens */
  --bs-border-color: var(--bs-gray-300);
  --bs-border-color-translucent: rgba(0, 0, 0, 0.06);
}

/* DARK */
:root[data-bs-theme="dark"] {
  /* softer borders on dark */
  --bs-border-color: var(--bs-gray-700);
  --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
}
