/* ─────────────────────────────────────────────────────────────────────────────
 * CSS imports are loaded in parallel via <link> tags in index.html.
 * This file only contains base reset and design tokens.
 * ───────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  font-family: ui-sans-serif, system-ui, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-dark);
  background-color: #f1f3f4;
}

:root {
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-2xl: 1.5rem;

  --line-height-xs: 1rem;
  --line-height-sm: 1.25rem;
  --line-height-md: 1.5rem;
  --line-height-lg: 1.75rem;
  --line-height-2xl: 2rem;

  --border-radius-md: 0.25rem;

  --duration-sm: 100ms;
  --duration-md: 300ms;
  --duration-2xl: 3000ms;

  --color-blue-50: #eff6ff;
  --color-blue-500: #3b82f6;
  --color-blue-600: #2563eb;

  --color-red-500: #ef4444;
  --color-red-600: #dc2626;

  --color-green-600: #16a34a;

  --color-gray-100: #f3f4f6;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;

  --color-white: #ffffff;
  --color-black: #000000;

  --color-text-light: #f9fafb;
  --color-text-dark: #030712;

  --box-shadow-md: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.app {
  height: 100vh;
}

.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem 1rem 1rem;
  background: #f1f3f4;
  box-sizing: border-box;
}

.calendar-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  overflow: hidden;
}

.calendar {
  height: 100%;
  border: none;
  border-radius: 0;
  overflow: hidden;
  margin: 1rem 1.25rem 0 0.75rem;
}

@media (min-width: 768px) {
  .app {
    display: grid;
    grid-template-columns: auto 1fr;
  }
}
/* ── Sidebar collapse ── */
@media (min-width: 768px) {
  .sidebar.desktop-only {
    transition: width 0.25s ease, opacity 0.15s ease, padding 0.25s ease, min-width 0.25s ease;
    width: 17rem;
    min-width: 17rem;
    overflow: hidden;
  }
  .app.sidebar-collapsed .sidebar.desktop-only {
    width: 0 !important;
    min-width: 0 !important;
    opacity: 0;
    padding: 0;
    pointer-events: none;
  }
}

/* ── Nav date button ── */
.nav__date-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  font: inherit;
  cursor: default;
  pointer-events: none;
}
.nav__date-chevron {
  opacity: 0;
  transition: opacity 0.15s, transform 0.2s;
  flex-shrink: 0;
}
.app.sidebar-collapsed .nav__date-btn {
  pointer-events: auto;
  cursor: pointer;
}
.app.sidebar-collapsed .nav__date-btn:hover {
  background: #f1f3f4;
}
.app.sidebar-collapsed .nav__date-chevron {
  opacity: 1;
}
.app.sidebar-collapsed #nav-minical-toggle.minical-open .nav__date-chevron {
  transform: rotate(180deg);
}

/* ── Nav mini-calendar popover ── */
.nav-minical-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 9rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14);
  padding: 0.5rem;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
}
.nav-minical-popover.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
