@import 'tailwindcss';

@plugin 'tailwindcss-animate';

@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

/* @custom-variant dark (&:is(.dark *)); */

@theme {
    --font-sans:
        'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';

    --radius-lg: var(--radius);
    --radius-md: calc(var(--radius) - 2px);
    --radius-sm: calc(var(--radius) - 4px);

    --color-background: var(--background);
    --color-foreground: var(--foreground);

    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);

    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);

    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);

    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);

    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);

    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);

    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);

    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);

    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);

    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);
}

/*
  The default border color has changed to `currentColor` in Tailwind CSS v4,
  so we've added these compatibility styles to make sure everything still
  looks the same as it did with Tailwind CSS v3.

  If we ever want to remove these styles, we need to add an explicit border
  color utility to any element that depends on these defaults.
*/
@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: var(--color-gray-200, currentColor);
    }
}

:root {
    --background: oklch(74.888% 0.11677 258.3);
    --foreground: oklch(0.145 0 0);
    --card: oklch(59.667% 0.22126 258.047);
    --card-foreground: oklch(100% 0.00011 271.152);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.145 0 0);
    --primary: oklch(59.667% 0.22126 258.047);
    --primary-foreground: oklch(98% 0.02 258.047);
    --primary-dark: oklch(50% 0.22126 258.047);
    --primary-border: oklch(70% 0.1 258.047);
    --secondary: oklch(0.97 0 0);
    --secondary-foreground: oklch(0.205 0 0);
    --muted: oklch(0.97 0 0);
    --muted-foreground: oklch(0.556 0 0);
    --accent: oklch(88.837% 0.0001 271.152);
    --accent-foreground: oklch(0.205 0 0);
    --destructive: oklch(0.577 0.245 27.325);
    --destructive-foreground: oklch(0.577 0.245 27.325);
    --border: oklch(0.922 0 0);
    --input: oklch(0.922 0 0);
    --ring: oklch(0.87 0 0);
    --chart-1: oklch(0.646 0.222 41.116);
    --chart-2: oklch(0.6 0.118 184.704);
    --chart-3: oklch(0.398 0.07 227.392);
    --chart-4: oklch(0.828 0.189 84.429);
    --chart-5: oklch(0.769 0.188 70.08);
    --radius: 0.625rem;
    --sidebar: oklch(0.985 0 0);
    --sidebar-foreground: oklch(0.145 0 0);
    --sidebar-primary: oklch(0.205 0 0);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.97 0 0);
    --sidebar-accent-foreground: oklch(0.205 0 0);
    --sidebar-border: oklch(0.922 0 0);
    --sidebar-ring: oklch(0.87 0 0);
}

/* .dark {
    --background: oklch(12% 0.11677 258.3);
    --foreground: oklch(96% 0.02 258.3);
    --card: oklch(18% 0.22126 258.047);
    --card-foreground: oklch(98% 0.02 258.3);
    --popover: oklch(0.145 0 0);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.985 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.637 0.237 25.331);
    --border: oklch(0.269 0 0);
    --input: oklch(0.269 0 0);
    --ring: oklch(0.439 0 0);
    --chart-1: oklch(0.488 0.243 264.376);
    --chart-2: oklch(0.696 0.17 162.48);
    --chart-3: oklch(0.769 0.188 70.08);
    --chart-4: oklch(0.627 0.265 303.9);
    --chart-5: oklch(0.645 0.246 16.439);
    --sidebar: oklch(0.205 0 0);
    --sidebar-foreground: oklch(0.985 0 0);
    --sidebar-primary: oklch(0.985 0 0);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.269 0 0);
    --sidebar-accent-foreground: oklch(0.985 0 0);
    --sidebar-border: oklch(0.269 0 0);
    --sidebar-ring: oklch(0.439 0 0);
} */

@layer base {
    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground;
    }
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}
.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

@keyframes loading-line {
    0% {
        width: 0;
        left: 0;
        right: auto;
    }
    50% {
        width: 100%;
        left: 0;
        right: auto;
    }
    51% {
        left: auto;
        right: 0;
    }
    100% {
        width: 0;
        left: auto;
        right: 0;
    }
}
.animate-loading-line {
    animation: loading-line 2s ease-in-out infinite;
}

@keyframes baseball-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}
.animate-baseball-spin {
    animation: baseball-spin 1.5s ease-in-out infinite;
}

@keyframes baseball-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-360deg);
    }
}
.animate-baseball-rotate {
    animation: baseball-rotate 2s linear infinite;
}

/* FullCalendar modern theme overrides */
.fc {
    --fc-page-bg-color: #ffffff;
    --fc-border-color: #e5e7eb; /* gray-200 */
    --fc-neutral-bg-color: #f9fafb; /* gray-50 */
    --fc-today-bg-color: #eef2ff; /* indigo-50 */
    --fc-now-indicator-color: #ef4444; /* red-500 */

    /* default/fallback event colors (actual colors set per event in JS) */
    --fc-event-bg-color: #e5e7eb; /* gray-200 */
    --fc-event-border-color: #e5e7eb;
    --fc-event-text-color: #111827; /* gray-900 */

    /* list + button palette (if toolbar/list is used) */
    --fc-list-event-hover-bg-color: #f9fafb;
    --fc-button-text-color: #111827;
    --fc-button-bg-color: #ffffff;
    --fc-button-border-color: #e5e7eb;
    --fc-button-hover-bg-color: #f3f4f6;
    --fc-button-hover-border-color: #d1d5db;
    --fc-button-active-bg-color: #eef2ff;
    --fc-button-active-border-color: #c7d2fe;
}

/* calendar grid card */
.fc .fc-scrollgrid {
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* column headers */
.fc .fc-col-header-cell-cushion {
    padding: 0.5rem 0.25rem; /* py-2 px-1 */
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* gray-500 */
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* day numbers */
.fc .fc-daygrid-day-number {
    padding: 0.25rem 0.5rem; /* py-1 px-2 */
    font-weight: 600;
    color: #374151; /* gray-700 */
}

/* day hover */
.fc .fc-daygrid-day:hover {
    background-color: #fafafa; /* gray-50 */
}

/* today highlight */
.fc .fc-daygrid-day.fc-day-today {
    background-color: #f5f3ff; /* violet-50 */
}

/* daygrid events */
.fc .fc-daygrid-event {
    border-radius: 0.375rem; /* rounded-md */
    padding: 0; /* inner content handles padding */
    box-shadow: 0 1px 1px rgba(17, 24, 39, 0.04);
}

/* list view header */
.fc .fc-list-day-cushion {
    background-color: #f9fafb;
    color: #374151; /* gray-700 */
    font-weight: 600;
}

/* list view events */
.fc .fc-list-event {
    border-radius: 0.375rem;
}

.fc .fc-list-event:hover td {
    background-color: #f9fafb;
}

/* make event dot subtle in list */
.fc .fc-list-event-graphic {
    opacity: 0.6;
}

/* Public holiday styling */
.fc .fc-holiday-day {
    background-color: #fff1f2; /* rose-50 */
}
.fc .fc-holiday-day:hover {
    background-color: #fee2e2;
}
.fc .fc-holiday-day .fc-daygrid-day-number {
    color: #dc2626; /* red-600 */
}

/* Sunday styling */
.fc .fc-sunday-day {
    background-color: #fef2f2; /* red-50 */
}
.fc .fc-sunday-day:hover {
    background-color: #fee2e2; /* red-100 */
}
.fc .fc-sunday-day .fc-daygrid-day-number {
    color: #dc2626; /* red-600 */
    font-weight: 700;
}

/* Sunday column header */
.fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion {
    color: #dc2626; /* red-600 */
    font-weight: 700;
}
