@import "tailwindcss";

:root {
  --bg-main: #020617; /* slate-950 */
  --text-main: #f8fafc; /* slate-50 */
  --text-muted: #94a3b8; /* slate-400 */
  --card-bg: rgba(17, 24, 39, 0.7); /* dark glass */
  --card-border: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(31, 41, 55, 0.5);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-text: #f3f4f6;
  --scrollbar-track: rgba(17, 24, 39, 0.5);
  --glow-color: rgba(59, 130, 246, 0.4);
}

.light-theme {
  --bg-main: #f8fafc; /* slate-50 */
  --text-main: #0f172a; /* slate-900 */
  --text-muted: #475569; /* slate-600 */
  --card-bg: rgba(255, 255, 255, 0.85); /* light glass */
  --card-border: rgba(15, 23, 42, 0.08);
  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: rgba(15, 23, 42, 0.15);
  --input-text: #0f172a;
  --scrollbar-track: rgba(241, 245, 249, 0.5);
  --glow-color: rgba(59, 130, 246, 0.2);
}

body {
  background-color: var(--bg-main) !important;
  color: var(--text-main) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@layer utilities {
  .glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    transition: background 0.3s ease, border-color 0.3s ease;
  }
  
  .glass-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  }
  
  .glass-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
    outline: none;
  }

  .glow-hover:hover {
    box-shadow: 0 0 15px var(--glow-color);
    transform: translateY(-1px);
    transition: all 0.2s ease-in-out;
  }
}}

/* Global fade transition for seamless in-place theme swaps (avoid layout containers) */
body, .glass-card, .glass-input, button, p, span, label, h1, h2, h3, h4, h5, h6, svg {
  transition: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, fill 0.4s ease, stroke 0.4s ease, box-shadow 0.4s ease;
}

/* Class-based overrides for theme adaptability */
.light-theme h1, 
.light-theme h2, 
.light-theme h3, 
.light-theme h4, 
.light-theme h5, 
.light-theme h6,
.light-theme .text-slate-100,
.light-theme .text-slate-200 {
  color: var(--text-main) !important;
}

.light-theme p, 
.light-theme label, 
.light-theme span,
.light-theme .text-slate-400,
.light-theme .text-slate-500 {
  color: var(--text-muted) !important;
}

/* Premium styling for browser default date pickers */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(50%) saturate(1000%) hue-rotate(190deg);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  transition: background 0.2s;
}

.light-theme input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.2) sepia(10%) saturate(500%) hue-rotate(200deg);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* Custom scrollbar for premium look */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Floating Toast notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 12px 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.light-theme .toast-notification {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}
