/* public/css/custom_theme_colors.css */

:root {
  --theme-glass-blur: 8px;
  --theme-sidebar-bg-alpha: 0.8;
  --theme-sidebar-dark-bg-alpha: 0.85;

  /* Light Mode - Danger Theme */
  --theme-light-primary-color: #b03a2e;
  --theme-light-primary-hover-color: #c0392b;
  --theme-light-primary-text-color: #ffffff;
  --theme-light-primary-rgb: 176, 58, 46; /* Added for rgba usage */

  /* Sidebar - Light Mode */
  --theme-light-sidebar-base-rgb: 248, 220, 218;
  --theme-light-sidebar-bg: rgba(
    var(--theme-light-sidebar-base-rgb),
    var(--theme-sidebar-bg-alpha)
  );
  --theme-light-sidebar-border-color: rgba(
    var(--theme-light-primary-rgb),
    0.25
  );
  --theme-light-sidebar-text-color: #4a2323;
  --theme-light-sidebar-icon-color: var(--theme-light-primary-color);
  --theme-light-sidebar-header-text-color: #3d1b1b;

  /* Active Item (Directly Active) */
  --theme-light-sidebar-active-bg: var(--theme-light-primary-color);
  --theme-light-sidebar-active-text-color: var(
    --theme-light-primary-text-color
  );
  --theme-light-sidebar-active-icon-color: var(
    --theme-light-primary-text-color
  );

  /* Parent Active Item (When a child is active) */
  --theme-light-sidebar-parent-active-bg: rgba(
    var(--theme-light-primary-rgb),
    0.2
  ); /* Lighter/subtle version */
  --theme-light-sidebar-parent-active-text-color: var(
    --theme-light-primary-color
  ); /* Keep text prominent */
  --theme-light-sidebar-parent-active-icon-color: var(
    --theme-light-primary-color
  ); /* Keep icon prominent */

  --theme-light-sidebar-hover-bg-rgb: 238, 205, 201;
  --theme-light-sidebar-hover-bg: rgb(var(--theme-light-sidebar-hover-bg-rgb));
  --theme-light-sidebar-hover-text-color: var(--theme-light-primary-color);
  --theme-light-sidebar-hover-icon-color: #a93226;

  /* Topbar - Light Mode */
  --theme-light-topbar-bg-rgb: 250, 229, 228;
  --theme-light-topbar-bg: rgba(var(--theme-light-topbar-bg-rgb), 0.8);
  --theme-light-topbar-border-color: rgba(var(--theme-light-primary-rgb), 0.2);
  --theme-light-topbar-text-color: #3d1b1b;
  --theme-light-topbar-brand-highlight-color: var(--theme-light-primary-color);
  --theme-light-hamburger-icon-color: var(--theme-light-primary-color);

  /* Footer - Light Mode */
  --theme-light-footer-bg: var(--theme-light-topbar-bg);
  --theme-light-footer-text-color: var(--theme-light-topbar-text-color);
  --theme-light-footer-border-color: var(--theme-light-topbar-border-color);

  /* Toggle Button - Light Mode */
  --theme-light-toggle-bg: rgb(240, 215, 213);
  --theme-light-toggle-text-color: var(--theme-light-primary-color);
  --theme-light-toggle-hover-bg: rgb(236, 205, 202);

  --theme-sidebar-item-border-radius: 10px;
  --theme-sidebar-active-pill-border-radius: 25px;
}

[data-bs-theme="dark"] {
  /* Dark Mode - Danger Theme */
  --theme-dark-primary-color: #e74c3c;
  --theme-dark-primary-hover-color: #ec7063;
  --theme-dark-primary-text-color: #ffffff;
  --theme-dark-primary-rgb: 231, 76, 60; /* Added for rgba usage */

  /* Bootstrap Body Background Variable for Dark Mode */
  --bs-body-bg: #121212 !important; /* Dark background for the body */
  --theme-dark-body-text-color: #fadbd8;

  /* Sidebar - Dark Mode */
  --theme-dark-sidebar-base-rgb: 50, 25, 23;
  --theme-dark-sidebar-bg: rgba(
    var(--theme-dark-sidebar-base-rgb),
    var(--theme-sidebar-dark-bg-alpha)
  );
  --theme-dark-sidebar-border-color: rgba(var(--theme-dark-primary-rgb), 0.25);
  --theme-dark-sidebar-text-color: #fadbd8;
  --theme-dark-sidebar-icon-color: var(--theme-dark-primary-color);
  --theme-dark-sidebar-header-text-color: #fdedec;

  /* Active Item (Directly Active) */
  --theme-dark-sidebar-active-bg: var(--theme-dark-primary-color);
  --theme-dark-sidebar-active-text-color: var(--theme-dark-primary-text-color);
  --theme-dark-sidebar-active-icon-color: #4a1c1c; /* Distinct icon color for active dark */

  /* Parent Active Item (When a child is active) */
  --theme-dark-sidebar-parent-active-bg: rgba(
    var(--theme-dark-primary-rgb),
    0.25
  ); /* Lighter/subtle version */
  --theme-dark-sidebar-parent-active-text-color: var(
    --theme-dark-primary-color
  ); /* Keep text prominent */
  --theme-dark-sidebar-parent-active-icon-color: var(
    --theme-dark-primary-color
  ); /* Keep icon prominent */

  --theme-dark-sidebar-hover-bg-rgb: 65, 33, 30;
  --theme-dark-sidebar-hover-bg: rgb(var(--theme-dark-sidebar-hover-bg-rgb));
  --theme-dark-sidebar-hover-text-color: #fdedec;
  --theme-dark-sidebar-hover-icon-color: #f5b7b1;

  /* Topbar - Dark Mode */
  --theme-dark-topbar-bg-rgb: 25, 10, 10;
  --theme-dark-topbar-bg: rgba(var(--theme-dark-topbar-bg-rgb), 0.8);
  --theme-dark-topbar-border-color: rgba(var(--theme-dark-primary-rgb), 0.2);
  --theme-dark-topbar-text-color: #fdedec;
  --theme-dark-topbar-brand-highlight-color: var(--theme-dark-primary-color);
  --theme-dark-hamburger-icon-color: var(--theme-dark-primary-color);

  /* Footer - Dark Mode */
  --theme-dark-footer-bg: var(--theme-dark-topbar-bg);
  --theme-dark-footer-text-color: var(--theme-dark-topbar-text-color);
  --theme-dark-footer-border-color: var(--theme-dark-topbar-border-color);

  /* Toggle Button - Dark Mode */
  --theme-dark-toggle-bg: rgb(55, 28, 26);
  --theme-dark-toggle-text-color: var(--theme-dark-primary-color);
  --theme-dark-toggle-hover-bg: rgb(70, 36, 33);
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-bs-theme="dark"] body {
  color: var(--theme-dark-body-text-color);
}
