/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

/* Theme variables */
:root {
  /* Light mode variables (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-hover: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --accent-color: #4f46e5;
  --accent-hover: #4338ca;
  --success-bg: #f0fdf4;
  --success-text: #16a34a;
  --nav-bg: #1f2937;
  --nav-text: #ffffff;
}

[data-theme="dark"] {
  /* Dark mode variables */
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --bg-hover: #4b5563;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --border-color: #374151;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --accent-color: #6366f1;
  --accent-hover: #5b21b6;
  --success-bg: #064e3b;
  --success-text: #10b981;
  --nav-bg: #030712;
  --nav-text: #f9fafb;
}

/* Theme-specific classes */
.theme-bg-primary { background-color: var(--bg-primary) !important; }
.theme-bg-secondary { background-color: var(--bg-secondary) !important; }
.theme-text-primary { color: var(--text-primary) !important; }
.theme-text-secondary { color: var(--text-secondary) !important; }
.theme-border { border-color: var(--border-color) !important; }
.theme-nav-bg { background-color: var(--nav-bg) !important; }

.theme-btn-primary {
  background-color: var(--accent-color) !important;
  color: white !important;
}

.theme-btn-primary:hover {
  background-color: var(--accent-hover) !important;
}

.theme-success {
  background-color: var(--success-bg) !important;
  color: var(--success-text) !important;
}

.theme-card {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 1px 3px var(--shadow-color) !important;
}

.theme-card:hover {
  background-color: var(--bg-secondary) !important;
}

/* Add more hover variations */
.theme-card-hover-tertiary:hover {
  background-color: var(--bg-tertiary) !important;
}

.theme-btn-secondary {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

.theme-btn-secondary:hover {
  background-color: var(--bg-tertiary) !important;
}

.theme-card input::placeholder,
.theme-card textarea::placeholder {
  color: var(--text-tertiary);
  opacity: 0.8;
}

[data-theme="dark"] .theme-card input::placeholder,
[data-theme="dark"] .theme-card textarea::placeholder {
  color: #9ca3af;
  opacity: 0.9;
}

[data-theme="dark"] input,
[data-theme="dark"] textarea {
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

body, .theme-bg-primary, .theme-bg-secondary, .theme-text-primary, .theme-text-secondary {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}
