@import "tailwindcss";

@source "../../views/**/*.html.erb";
@source "../../components/**/*.{html.erb,rb}";
@source "../../javascript/**/*.js";

@plugin "daisyui" {
  themes: lofi --default;
}

/* Colores semánticos más vivos sobre lofi */
[data-theme="lofi"] {
  --color-success: oklch(50% 0.20 145);
  --color-info:    oklch(52% 0.21 240);
  --color-warning: oklch(68% 0.18 55);
  --color-error:   oklch(50% 0.23 25);
}

/* ── App shell (DaisyUI drawer) ─────────────────────────────────────────── */
.app-drawer {
  @apply drawer lg:drawer-open min-h-screen bg-base-200;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.app-sidebar {
  @apply flex h-full min-h-full w-64 flex-col bg-base-100 text-base-content border-r border-base-300;
}

.app-sidebar__header {
  @apply shrink-0 border-b border-base-300 px-4 py-4;
}

.app-sidebar__nav {
  @apply min-h-0 flex-1 overflow-y-auto px-3 py-3;
}

.app-sidebar__footer {
  @apply shrink-0 border-t border-base-300 p-3;
}

.app-sidebar .menu-title {
  @apply px-2 text-xs font-semibold uppercase tracking-wide text-base-content/50;
}

.app-sidebar .menu :where(li > *:not(ul)) {
  @apply rounded-lg text-base;
}

.app-sidebar .menu .menu-active {
  @apply bg-primary/10 font-medium text-primary;
}

.app-sidebar__toggle {
  @apply btn btn-circle btn-ghost btn-xs absolute top-4 right-1 z-10 hidden size-7 text-base-content/50 hover:text-base-content lg:inline-flex;
}

/* ── Collapsed (desktop) ──────────────────────────────────────────────────── */
@media (min-width: 64rem) {
  .app-drawer .drawer-side> :not(.drawer-overlay) {
    transition: none;
    translate: 0;
  }

  .app-sidebar.is-collapsed {
    @apply w-[4.5rem];
  }

  .app-sidebar.is-collapsed .sidebar-label {
    @apply hidden;
  }

  .app-sidebar.is-collapsed [data-shared--sidebar-target="link"] {
    @apply tooltip tooltip-right justify-center;
  }

  .app-sidebar.is-collapsed [data-shared--sidebar-target="footerButton"] {
    @apply justify-center px-0;
  }
}

.cally .cally-range {
  @apply flex items-center justify-center gap-2;
}