/*
 * 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 url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* Theme Variables - Based on smile-health-hub design */
:root {
  --background: 180 20% 99%;
  --foreground: 200 25% 10%;

  --card: 0 0% 100%;
  --card-foreground: 200 25% 10%;

  --popover: 0 0% 100%;
  --popover-foreground: 200 25% 10%;

  --primary: 174 72% 40%;
  --primary-foreground: 0 0% 100%;

  --secondary: 174 30% 94%;
  --secondary-foreground: 174 72% 25%;

  --muted: 180 15% 95%;
  --muted-foreground: 200 10% 45%;

  --accent: 38 92% 60%;
  --accent-foreground: 38 92% 15%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 180 15% 88%;
  --input: 180 15% 88%;
  --ring: 174 72% 40%;

  --radius: 0.75rem;

  --sidebar-background: 174 25% 98%;
  --sidebar-foreground: 200 25% 20%;
  --sidebar-primary: 174 72% 40%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 174 30% 92%;
  --sidebar-accent-foreground: 174 72% 25%;
  --sidebar-border: 180 15% 90%;
  --sidebar-ring: 174 72% 40%;
}

.dark {
  --background: 200 25% 8%;
  --foreground: 180 15% 95%;

  --card: 200 25% 12%;
  --card-foreground: 180 15% 95%;

  --popover: 200 25% 12%;
  --popover-foreground: 180 15% 95%;

  --primary: 174 72% 50%;
  --primary-foreground: 200 25% 8%;

  --secondary: 200 20% 18%;
  --secondary-foreground: 174 50% 80%;

  --muted: 200 20% 15%;
  --muted-foreground: 180 10% 60%;

  --accent: 38 92% 55%;
  --accent-foreground: 38 92% 95%;

  --destructive: 0 70% 45%;
  --destructive-foreground: 0 0% 100%;

  --border: 200 20% 20%;
  --input: 200 20% 20%;
  --ring: 174 72% 50%;

  --sidebar-background: 200 25% 10%;
  --sidebar-foreground: 180 15% 90%;
  --sidebar-primary: 174 72% 50%;
  --sidebar-primary-foreground: 200 25% 8%;
  --sidebar-accent: 200 20% 15%;
  --sidebar-accent-foreground: 174 50% 80%;
  --sidebar-border: 200 20% 18%;
  --sidebar-ring: 174 72% 50%;
}

/* Base styles */
* {
  border-color: hsl(var(--border));
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Alert animations */
.alert-notice, .alert-error {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Ensure alerts are above everything */
#alerts-container {
  pointer-events: none;
}

#alerts-container > div {
  pointer-events: auto;
}

/* Sidebar styles */
.sidebar-wrapper {
  --sidebar-width: 16rem;
  --sidebar-width-icon: 3rem;
}

.sidebar {
  background-color: hsl(var(--sidebar-background));
  color: hsl(var(--sidebar-foreground));
  border-color: hsl(var(--sidebar-border));
}

/* Desktop sidebar transform */
@media (min-width: 768px) {
  .sidebar[data-sidebar-state-value="collapsed"] {
    transform: translateX(-100%);
  }
  
  .sidebar[data-sidebar-state-value="expanded"] {
    transform: translateX(0);
  }
}

.sidebar-menu-button {
  transition: all 0.2s ease;
}

.sidebar-menu-button:hover {
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
}

.sidebar-menu-button[data-active="true"] {
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
  font-weight: 500;
}

/* Dropdown menu animations */
[data-dropdown-target="menu"] {
  transform-origin: top right;
}

[data-dropdown-target="menu"].opacity-100 {
  pointer-events: auto;
}

[data-dropdown-target="menu"].opacity-0 {
  pointer-events: none;
}
