@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

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

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: 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-gold: var(--gold);
  --color-gold-bright: var(--gold-bright);
  --color-gold-dark: var(--gold-dark);
  --font-display: "Montserrat", sans-serif;
  --font-sans: "Inter", sans-serif;
}

:root {
  --radius: 0.75rem;

  /* Brand: pure black background, warm gold accents */
  --background: oklch(0.08 0 0);
  --foreground: oklch(0.95 0.005 80);

  --card: oklch(0.13 0 0);
  --card-foreground: oklch(0.95 0.005 80);

  --popover: oklch(0.13 0 0);
  --popover-foreground: oklch(0.95 0.005 80);

  --primary: oklch(0.68 0.13 65); /* warm gold */
  --primary-foreground: oklch(0.08 0 0);

  --secondary: oklch(0.18 0 0);
  --secondary-foreground: oklch(0.95 0.005 80);

  --muted: oklch(0.18 0 0);
  --muted-foreground: oklch(0.55 0.005 80);

  --accent: oklch(0.18 0 0);
  --accent-foreground: oklch(0.85 0.005 80);

  --destructive: oklch(0.60 0.22 25); /* #E53E3E — meets WCAG AA 4.5:1 on dark bg */
  --destructive-foreground: oklch(0.99 0 0);

  --border: oklch(0.22 0 0);
  --input: oklch(0.20 0 0);
  --ring: oklch(0.68 0.13 65);

  --gold: oklch(0.68 0.13 65);
  --gold-bright: oklch(0.78 0.12 70);
  --gold-dark: oklch(0.58 0.12 60);

  --gradient-gold: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 40%, var(--gold-bright) 100%);
  --gradient-dark: linear-gradient(180deg, oklch(0.08 0 0) 0%, oklch(0.05 0 0) 100%);
  --shadow-gold: 0 10px 40px -10px oklch(0.68 0.13 65 / 0.35);
  --shadow-elegant: 0 25px 50px -12px oklch(0 0 0 / 0.5), 0 4px 15px -2px oklch(0 0 0 / 0.3);
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-sans);
    background-image:
      radial-gradient(circle at 10% 0%, oklch(0.68 0.13 65 / 0.06), transparent 40%),
      radial-gradient(circle at 90% 100%, oklch(0.68 0.13 65 / 0.03), transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
  }

  h1, h2, h3, h4 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  /* Custom Scrollbar */
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.4);
  }
}

@layer utilities {
  .text-gradient-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .bg-gradient-gold {
    background: var(--gradient-gold);
  }
  .border-gold {
    border-color: var(--gold);
  }
  .shadow-gold {
    box-shadow: var(--shadow-gold);
  }
  .shadow-elegant {
    box-shadow: var(--shadow-elegant);
  }
  .glass-panel {
    background: 
      radial-gradient(circle at top left, rgba(212, 175, 55, 0.12) 0%, transparent 35%),
      radial-gradient(circle at bottom right, rgba(212, 175, 55, 0.08) 0%, transparent 35%),
      linear-gradient(180deg, rgba(10, 10, 10, 0.9) 0%, rgba(5, 5, 5, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
    box-shadow: 
      inset 0 1px 1px rgba(255, 255, 255, 0.05), 
      0 10px 40px -10px rgba(0, 0, 0, 0.9), 
      0 0 20px rgba(212, 175, 55, 0.05);
  }
  .glass-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.6) 50%, transparent 100%);
    box-shadow: 0 0 10px 1px rgba(212, 175, 55, 0.3);
    z-index: 10;
  }
  .nav-active-glow {
    color: var(--gold-bright);
    position: relative;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  }
  .nav-active-glow::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-bright) 50%, transparent 100%);
    box-shadow: 0 0 8px 1px rgba(212, 175, 55, 0.6), 0 2px 4px 0 rgba(212, 175, 55, 0.4);
    opacity: 0.9;
  }
  .btn-metallic-gold {
    background: linear-gradient(145deg, #D4AF37 0%, #B89020 50%, #A27B13 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    color: #0A0A0A;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow: 
      0 8px 20px -8px rgba(212, 175, 55, 0.3), 
      inset 0 1px 1px rgba(255, 255, 255, 0.5), 
      inset 0 -1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .btn-metallic-gold::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: skewX(-25deg);
    transition: left 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  }
  .btn-metallic-gold:hover::before {
    left: 250%;
  }
  .btn-metallic-gold:hover {
    background: linear-gradient(145deg, #CFAB30 0%, #B0891A 50%, #957211 100%);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 
      0 6px 15px -4px rgba(0, 0, 0, 0.6), 
      inset 0 2px 1px rgba(255, 255, 255, 0.7), 
      inset 0 -1px 2px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
  }
}

/* FullCalendar theming */
.fc-wrap {
  --fc-border-color: var(--border);
  --fc-page-bg-color: var(--card);
  --fc-neutral-bg-color: var(--secondary);
  --fc-list-event-hover-bg-color: var(--accent);
  --fc-today-bg-color: oklch(0.68 0.13 65 / 0.05);
  --fc-now-indicator-color: var(--gold);
  --fc-event-bg-color: var(--gold);
  --fc-event-border-color: var(--gold);
  --fc-event-text-color: var(--primary-foreground);
  overflow-x: auto;
}
.fc-wrap .fc-col-header,
.fc-wrap .fc-timegrid-body,
.fc-wrap .fc-scrollgrid-sync-table {
  min-width: 100% !important;
  width: 100% !important;
}
.fc-wrap .fc-scrollgrid {
  min-width: 500px;
}
.fc-wrap .fc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--foreground);
}
.fc-wrap .fc .fc-toolbar-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  text-transform: capitalize;
  letter-spacing: -0.02em;
}
.fc-wrap .fc .fc-button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  text-transform: capitalize;
  font-weight: 500;
  box-shadow: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.fc-wrap .fc .fc-button:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold);
}
.fc-wrap .fc .fc-button-primary:not(:disabled).fc-button-active,
.fc-wrap .fc .fc-button-primary:not(:disabled):active {
  background: rgba(212, 175, 55, 0.1) !important;
  border-color: var(--gold) !important;
  color: var(--gold-bright) !important;
  box-shadow: 0 0 15px -5px rgba(212, 175, 55, 0.2) !important;
}
.fc-wrap .fc .fc-col-header-cell {
  background: transparent;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  padding: 0.75rem 0;
  font-weight: 600;
}
.fc-wrap .fc-event {
  cursor: pointer;
  border-radius: 0.35rem;
  padding: 2px 4px;
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
}
.fc-wrap .fc-event.fc-free {
  background: var(--secondary);
  color: var(--foreground);
  border-left: 2px solid var(--gold);
  font-weight: 600;
}
.fc-wrap .fc-event.fc-free .fc-event-main,
.fc-wrap .fc-event.fc-free .fc-event-time,
.fc-wrap .fc-event.fc-free .fc-event-title {
  color: var(--foreground) !important;
  font-weight: 600;
}
.fc-wrap .fc-event.fc-free:hover {
  background: var(--foreground);
  color: var(--background);
  border-left: 2px solid var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px oklch(0.18 0.01 270 / 0.15);
}
.fc-wrap .fc-event.fc-free:hover .fc-event-main,
.fc-wrap .fc-event.fc-free:hover .fc-event-time,
.fc-wrap .fc-event.fc-free:hover .fc-event-title {
  color: var(--background) !important;
}
.fc-wrap .fc-event.fc-booked {
  background: oklch(0.98 0 0);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  cursor: not-allowed;
  opacity: 0.5;
}
.fc-wrap .fc-event.fc-booked .fc-event-title {
  text-decoration: line-through;
}
.fc-wrap .fc-timegrid-slot {
  height: 3em;
}
.fc-wrap .fc-timegrid-divider {
  padding: 0;
}

/* Selected event highlight */
.fc-wrap .fc-event.fc-selected {
  background: var(--gradient-gold) !important;
  color: var(--primary-foreground) !important;
  border: none !important;
  border-left: 3px solid var(--gold-dark) !important;
  box-shadow: 0 4px 16px -4px oklch(0.68 0.13 65 / 0.4);
  transform: scale(1.02);
  z-index: 5;
}
.fc-wrap .fc-event.fc-selected .fc-event-main,
.fc-wrap .fc-event.fc-selected .fc-event-time,
.fc-wrap .fc-event.fc-selected .fc-event-title {
  color: var(--primary-foreground) !important;
  font-weight: 700;
}
