/* Villa Direct Theme System - Multiple Themes */

/* Default Theme (Blue) */
:root {
  --vd-primary: #0B1F3A;
  --vd-primary-light: #1a3a5c;
  --vd-accent: #C9A84C;
  --vd-accent-light: #DAA520;
  --vd-secondary: #6c757d;
  --vd-success: #198754;
  --vd-danger: #dc3545;
  --vd-warning: #ffc107;
  --vd-info: #0dcaf0;
  --vd-light: #f8f9fa;
  --vd-dark: #212529;
  --vd-admin-nav: 280px;
  --brand: #0D2B4E;
  --brand2: #1A5276;
  --brand3: #2980B9;
  --accent: #B8860B;
  --accent2: #DAA520;
  --gold: #C9A84C;
  --gold2: #F0C040;
}

/* Green Theme */
html[data-theme="green"] {
  --vd-primary: #1a4d2e;
  --vd-primary-light: #2d6a4f;
  --vd-accent: #5b8f3b;
  --vd-accent-light: #7fb069;
  --vd-secondary: #6c757d;
  --vd-success: #198754;
  --vd-danger: #dc3545;
  --vd-warning: #ffc107;
  --vd-info: #0dcaf0;
  --vd-light: #f8f9fa;
  --vd-dark: #212529;
  --vd-admin-nav: 280px;
  --brand: #1a4d2e;
  --brand2: #2d6a4f;
  --brand3: #40916c;
  --accent: #4f772d;
  --accent2: #7fb069;
  --gold: #6a994e;
  --gold2: #a7c957;
}

/* Purple Theme */
html[data-theme="purple"] {
  --vd-primary: #6b46c1;
  --vd-primary-light: #8b5cf6;
  --vd-accent: #a78bfa;
  --vd-accent-light: #c4b5fd;
  --vd-secondary: #6c757d;
  --vd-success: #198754;
  --vd-danger: #dc3545;
  --vd-warning: #ffc107;
  --vd-info: #0dcaf0;
  --vd-light: #f8f9fa;
  --vd-dark: #212529;
  --vd-admin-nav: 280px;
  --brand: #5b21b6;
  --brand2: #6d28d9;
  --brand3: #8b5cf6;
  --accent: #7c3aed;
  --accent2: #a78bfa;
  --gold: #c4b5fd;
  --gold2: #ddd6fe;
}

/* Red Theme */
html[data-theme="red"] {
  --vd-primary: #b91c1c;
  --vd-primary-light: #dc2626;
  --vd-accent: #f59e0b;
  --vd-accent-light: #fbbf24;
  --vd-secondary: #6c757d;
  --vd-success: #198754;
  --vd-danger: #dc3545;
  --vd-warning: #ffc107;
  --vd-info: #0dcaf0;
  --vd-light: #f8f9fa;
  --vd-dark: #212529;
  --vd-admin-nav: 280px;
  --brand: #991b1b;
  --brand2: #b91c1c;
  --brand3: #dc2626;
  --accent: #d97706;
  --accent2: #f59e0b;
  --gold: #fbbf24;
  --gold2: #fcd34d;
}

/* Teal Theme */
html[data-theme="teal"] {
  --vd-primary: #0f766e;
  --vd-primary-light: #14b8a6;
  --vd-accent: #06b6d4;
  --vd-accent-light: #67e8f9;
  --vd-secondary: #6c757d;
  --vd-success: #198754;
  --vd-danger: #dc3545;
  --vd-warning: #ffc107;
  --vd-info: #0dcaf0;
  --vd-light: #f8f9fa;
  --vd-dark: #212529;
  --vd-admin-nav: 280px;
  --brand: #0f766e;
  --brand2: #0d9488;
  --brand3: #14b8a6;
  --accent: #0891b2;
  --accent2: #06b6d4;
  --gold: #22d3ee;
  --gold2: #67e8f9;
}

/* Orange Theme */
html[data-theme="orange"] {
  --vd-primary: #ea580c;
  --vd-primary-light: #f97316;
  --vd-accent: #fb923c;
  --vd-accent-light: #fdba74;
  --vd-secondary: #6c757d;
  --vd-success: #198754;
  --vd-danger: #dc3545;
  --vd-warning: #ffc107;
  --vd-info: #0dcaf0;
  --vd-light: #f8f9fa;
  --vd-dark: #212529;
  --vd-admin-nav: 280px;
  --brand: #c2410c;
  --brand2: #ea580c;
  --brand3: #f97316;
  --accent: #f59e0b;
  --accent2: #fb923c;
  --gold: #fdba74;
  --gold2: #ffedd5;
}

/* Dark Theme */
html[data-theme="dark"] {
  --vd-primary: #1f2937;
  --vd-primary-light: #374151;
  --vd-accent: #9ca3af;
  --vd-accent-light: #d1d5db;
  --vd-secondary: #9ca3af;
  --vd-success: #10b981;
  --vd-danger: #ef4444;
  --vd-warning: #f59e0b;
  --vd-info: #3b82f6;
  --vd-light: #111827;
  --vd-dark: #f3f4f6;
  --vd-admin-nav: 280px;
  --brand: #1f2937;
  --brand2: #374151;
  --brand3: #4b5563;
  --accent: #6b7280;
  --accent2: #9ca3af;
  --gold: #d1d5db;
  --gold2: #e5e7eb;
}

html[data-theme="dark"] body {
  background-color: #111827;
  color: #f3f4f6;
}

html[data-theme="dark"] .card {
  background-color: #1f2937;
  color: #f3f4f6;
}

html[data-theme="dark"] .card-header {
  background-color: #374151;
  border-bottom-color: #4b5563;
}

html[data-theme="dark"] .nxl-header {
  background-color: #1f2937;
  border-bottom-color: #374151;
}

html[data-theme="dark"] .table {
  color: #f3f4f6;
}

html[data-theme="dark"] .table th {
  background-color: #374151;
  border-bottom-color: #4b5563;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background-color: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

html[data-theme="dark"] .dropdown-menu {
  background-color: #1f2937;
  border-color: #374151;
}

html[data-theme="dark"] .dropdown-item {
  color: #f3f4f6;
}

html[data-theme="dark"] .dropdown-item:hover {
  background-color: #374151;
}

/* Theme Switcher Styles */
.theme-switcher {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 1060;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: 1px solid #e9ecef;
  min-width: 200px;
}

.theme-switcher h6 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vd-primary);
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.theme-option {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.theme-option:hover {
  transform: scale(1.1);
  border-color: #e9ecef;
}

.theme-option.active {
  border-color: var(--vd-primary);
  box-shadow: 0 0 0 3px rgba(11, 31, 58, 0.1);
}

.theme-option.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
}

.theme-option[data-theme="blue"] {
  background: linear-gradient(135deg, #0B1F3A 0%, #1a3a5c 100%);
}

.theme-option[data-theme="green"] {
  background: linear-gradient(135deg, #1a4d2e 0%, #2d6a4f 100%);
}

.theme-option[data-theme="purple"] {
  background: linear-gradient(135deg, #6b46c1 0%, #8b5cf6 100%);
}

.theme-option[data-theme="red"] {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.theme-option[data-theme="teal"] {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.theme-option[data-theme="orange"] {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

.theme-option[data-theme="dark"] {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.theme-toggle-btn {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 1059;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--vd-primary);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.theme-toggle-btn i {
  font-size: 1.2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .theme-switcher {
    top: 80px;
    left: 10px;
    min-width: 180px;
    padding: 0.75rem;
  }
  
  .theme-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .theme-option {
    width: 35px;
    height: 35px;
  }
}

/* RTL Support */
html[dir="rtl"] .theme-switcher {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .theme-toggle-btn {
  left: auto;
  right: 20px;
}
