@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    /* Sidebar Background */
    --sidebar-bg-collapsed: #ffffff;          /* white */
    --sidebar-bg-expanded: #f8fafc;          /* slate-50 */

    /* Borders */
    --sidebar-border: #e2e8f0;               /* slate-200 */

    /* Text */
    --text-primary: #0f172a;                 /* slate-900 */
    --text-secondary: #64748b;               /* slate-500 */
    --text-muted: #94a3b8;                   /* slate-400 */

    /* Interactive States */
    --nav-item-hover-bg: #f1f5f9;           /* slate-100 */
    --nav-item-active-bg: #e0f2fe;          /* sky-100 */
    --nav-item-active-text: #0369a1;        /* sky-700 */

    /* Accent Color (buttons, active states) */
    --accent-primary: #0284c7;              /* sky-600 */
    --accent-hover: #0369a1;                /* sky-700 */

    /* Shadows */
    --shadow-sidebar: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  }
}

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/* Sidebar Base Styles */
.sidebar {
  width: 240px; /* Default width (will be overridden by JS on load) */
  box-shadow: var(--shadow-sidebar);
  flex-shrink: 0;
  transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
  overflow-x: hidden; /* Prevent content overflow */
}

.sidebar.collapsed {
  width: 64px;
}

.sidebar.expanded {
  width: 240px;
}

/* Content area transitions */
.content-area {
  transition: margin-left 200ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: margin-left;
}

/* Hide labels in collapsed state */
.sidebar.collapsed .sidebar-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 100ms ease-out;
}

/* Show labels in expanded state */
.sidebar.expanded .sidebar-label {
  opacity: 1;
  width: auto;
  transition: opacity 150ms ease-in 100ms;
}

/* Tooltip on hover (collapsed state only) */
.sidebar.collapsed .nav-item {
  position: relative;
}

.sidebar.collapsed .nav-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b; /* slate-800 */
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Mobile Styles */
@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 200ms ease-in-out;
    z-index: 50;
  }

  .sidebar.mobile.expanded {
    transform: translateX(0);
    width: 240px; /* always full width on mobile */
  }

  /* Force sidebar to always show labels on mobile */
  .sidebar.mobile .sidebar-label {
    opacity: 1 !important;
    width: auto !important;
  }
}

/* Mobile overlay */
.mobile-overlay {
  transition: opacity 200ms ease-in-out;
}

.mobile-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.mobile-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* Smooth transitions */
.sidebar,
.sidebar-label {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nav item hover effects */
.nav-item {
  transition: background-color 150ms ease-in-out,
              transform 100ms ease-in-out,
              box-shadow 150ms ease-in-out;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-item:active {
  transform: translateX(0px);
}

.sidebar.collapsed .nav-item:hover {
  transform: translateX(0px); /* No slide effect when collapsed */
}

/* Focus states for keyboard navigation */
.nav-item:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7; /* sky-600 */
}

.nav-item:focus:not(:focus-visible) {
  box-shadow: none;
}

.nav-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7; /* sky-600 */
}

/* Active state indicator */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-primary);
  border-radius: 0 2px 2px 0;
}
#map {
  min-height: 400px;
}
@page {
  size: auto;
  margin: 0mm;
}

.w-a4 {
  width: 210mm;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
