/* ==============================================================
 * Script: public/css/styles.css
 * Purpose: Complete pixel-matched design system for ImageStudio.
 * Author: Praful Kumar
 * Created On: 11/10/2026
 *
 * Modification History:
 * - 11/10/2026 : Recreated design system to match exact dashboard layout, dual sidebars, and cards.
 * - 11/10/2026 : Initial styling architecture.
 *
 * Reload / Change Triggers:
 * - Reload Triggered 3 : 11/10/2026
 *
 * Notes:
 * - Default theme is clean, high-contrast Light Theme.
 * - Single primary brand accent: Indigo #4f46e5 / Purple #6366f1.
 * ============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-app: #f4f6fb;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --border-light: #e6ebf4;
  --border-card: #e8ecf5;
  --text-heading: #0f172a;
  --text-body: #475569;
  --text-muted: #94a3b8;
  --brand-primary: #5850ec;
  --brand-hover: #4338ca;
  --brand-subtle: #eef2ff;
  --brand-light: rgba(88, 80, 236, 0.08);
  --success-text: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --badge-green: #dcfce7;
}

[data-theme="dark"] {
  --bg-app: #0b0f19;
  --bg-card: #131b2e;
  --bg-sidebar: #111827;
  --border-light: #1f293d;
  --border-card: #1e293b;
  --text-heading: #f8fafc;
  --text-body: #94a3b8;
  --text-muted: #64748b;
  --brand-primary: #6366f1;
  --brand-hover: #4f46e5;
  --brand-subtle: rgba(99, 102, 241, 0.15);
  --brand-light: rgba(99, 102, 241, 0.1);
  --success-text: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: rgba(16, 185, 129, 0.3);
  --badge-green: rgba(16, 185, 129, 0.2);
}

body {
  background-color: var(--bg-app);
  color: var(--text-body);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

/* Base Card Style */
.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

/* Dropzone styling */
.studio-dropzone {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.45) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1.5px dashed #c7d2fe;
  border-radius: 1.25rem;
  transition: all 0.2s ease;
}

[data-theme="dark"] .studio-dropzone {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(19, 27, 46, 0.8) 100%);
  border-color: #312e81;
}

.studio-dropzone.drag-active {
  border-color: var(--brand-primary);
  background: var(--brand-subtle);
  transform: scale(1.004);
}

/* Left Sidebar Navigation */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-body);
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background-color: var(--brand-light);
  color: var(--brand-primary);
}

.sidebar-link.active {
  background-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(88, 80, 236, 0.25);
  font-weight: 600;
}

/* Custom Sliders */
input[type="range"] {
  accent-color: var(--brand-primary);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast Container & Toasts */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.875rem;
  padding: 0.875rem 1.125rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.hiding {
  animation: toastSlideOut 0.2s ease forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateY(100%) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(50%) scale(0.9);
    opacity: 0;
  }
}
