@import 'tailwindcss';

@plugin 'tailwindcss-animate';

@import '../../public/fonts/google/fonts.css';

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

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

@theme {
    --font-sans:
        'Montserrat', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-display: 'Playfair Display', serif;
    --font-serif: 'Lora', serif;
    --font-sans-marketing: 'Montserrat', sans-serif;
    --font-script: 'Great Vibes', cursive;

    --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);
}

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/fonts/Lora-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/fonts/Lora-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/PlayfairDisplay-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('/fonts/PlayfairDisplay-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --guest-primary: #007aff;
  --guest-secondary: #5ad2f4;
  --guest-background: #f7f8fb;
  --guest-surface: #ffffff;
  --guest-radius: 14px;
  --guest-button-style: filled;
  --guest-link: #007aff;
  --guest-font-scale: 1;
  --guest-font-family: 'Montserrat', 'Inter', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --guest-body-font: 'Montserrat', 'Inter', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --guest-heading-font: 'Playfair Display', 'Montserrat', 'Inter', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --guest-serif-font: 'Lora', serif;
}

@font-face {
  font-family: 'Great Vibes';
  src: url('/fonts/GreatVibes-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  background-color: oklch(1 0 0);
}

html.dark {
  background-color: oklch(0.145 0 0);
}

body {
  font-family: var(--guest-font-family), 'Inter', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: var(--guest-heading-font), var(--guest-font-family), 'Inter', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-serif {
  font-family: var(--guest-serif-font), 'Lora', 'Georgia', serif;
}

@keyframes aurora {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.bg-aurora {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: aurora 15s ease infinite;
}

/* Basic typography styling for rendered markdown (prose) without Tailwind plugin */
.prose {
  color: rgb(55 65 81);
  font-family: var(--font-sans-marketing);
  line-height: 1.75;
  max-width: 100%;
}

.prose.prose-slate {
  color: rgb(51 65 85);
}

.prose :where(p, ul, ol, blockquote, pre, table, figure) {
  margin-bottom: 1.25em;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 0.75em;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  line-height: 1.2;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.prose h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

.prose p {
  margin: 0 0 1.25em;
}

.prose a {
  color: rgb(236 72 153);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.prose strong {
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose blockquote {
  border-left: 4px solid rgba(236, 72, 153, 0.4);
  color: rgb(75 85 99);
  font-style: italic;
  margin-left: 0;
  padding-left: 1.25em;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
}

.prose table th,
.prose table td {
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 0.75em;
  text-align: left;
}

.prose code {
  background-color: rgba(148, 163, 184, 0.15);
  border-radius: 0.375rem;
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  padding: 0.15em 0.35em;
}

@layer utilities {
  .font-display {
    font-family: var(--font-display);
  }
  .font-serif-custom {
    font-family: var(--font-serif);
  }
  .font-sans-marketing {
    font-family: var(--font-sans-marketing);
  }
  .font-script {
    font-family: var(--font-script);
  }
  .bg-brand-gradient {
    background: linear-gradient(135deg, var(--brand-rose) 0%, var(--brand-gold) 50%, var(--brand-sky) 100%);
  }
  .bg-brand-card {
    background-color: rgba(255, 255, 255, 0.92);
  }
  .border-brand-rose-soft {
    border-color: var(--brand-rose-soft);
  }
  .text-brand-slate {
    color: var(--brand-slate);
  }
  .text-brand-rose {
    color: var(--brand-rose);
  }
  .text-brand-navy {
    color: var(--brand-navy);
  }
  .bg-brand-rose {
    background-color: var(--brand-rose);
  }
  .bg-brand-gold {
    background-color: var(--brand-gold);
  }
  .bg-brand-sky-soft {
    background-color: var(--brand-sky-soft);
  }
  .bg-brand-teal {
    background-color: var(--brand-teal);
  }
  .shadow-brand-primary {
    box-shadow: 0 24px 80px -32px rgba(255, 182, 193, 0.4);
  }
  .ring-brand-rose {
    --tw-ring-color: var(--brand-rose);
  }
  .from-brand-rose-soft {
    --tw-gradient-from: var(--brand-rose-soft);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 229, 236, 0));
  }
  .to-brand-sky-soft {
    --tw-gradient-to: var(--brand-sky-soft);
  }
}

:root {
    --background: oklch(1 0 0);
    --foreground: oklch(0.145 0 0);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.145 0 0);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.145 0 0);
    --primary: oklch(0.205 0 0);
    --primary-foreground: oklch(0.985 0 0);
    --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(0.97 0 0);
    --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);

    --brand-rose: #FFB6C1;
    --brand-rose-strong: #FF69B4;
    --brand-rose-soft: #FFE5EC;
    --brand-gold: #FFD700;
    --brand-gold-soft: #FFF2B2;
    --brand-sky: #87CEEB;
    --brand-sky-soft: #E0F5FF;
    --brand-teal: #06D6A0;
    --brand-navy: #0F4C75;
    --brand-slate: #1F2937;
    --brand-cream: #FFF8F5;
    --brand-mauve: #EAD7EE;
}

.tenant-admin-theme {
    --background: var(--brand-cream);
    --foreground: var(--brand-slate);
    --card: #ffffff;
    --card-foreground: var(--brand-slate);
    --popover: #ffffff;
    --popover-foreground: var(--brand-slate);
    --primary: var(--brand-rose);
    --primary-foreground: #381b2d;
    --secondary: var(--brand-gold);
    --secondary-foreground: #332200;
    --muted: var(--brand-rose-soft);
    --muted-foreground: #51344d;
    --accent: var(--brand-sky);
    --accent-foreground: var(--brand-navy);
    --destructive: #f87171;
    --destructive-foreground: #7f1d1d;
    --border: #f7d9e6;
    --input: #f7d9e6;
    --ring: var(--brand-rose);
    --chart-1: var(--brand-rose);
    --chart-2: var(--brand-gold);
    --chart-3: var(--brand-sky);
    --chart-4: var(--brand-teal);
    --chart-5: var(--brand-rose-strong);
    --sidebar: #ffffff;
    --sidebar-foreground: var(--brand-slate);
    --sidebar-primary: var(--brand-rose);
    --sidebar-primary-foreground: #381b2d;
    --sidebar-accent: var(--brand-rose-soft);
    --sidebar-accent-foreground: var(--brand-slate);
    --sidebar-border: #f7d9e6;
    --sidebar-ring: var(--brand-rose);

    --tenant-surface: rgba(255, 255, 255, 0.92);
    --tenant-surface-muted: rgba(255, 231, 240, 0.82);
    --tenant-surface-strong: #ffffff;
    --tenant-border-strong: #f5d2e3;
    --tenant-foreground-soft: #51344d;
    --tenant-layer: rgba(255, 255, 255, 0.9);
    --tenant-layer-strong: rgba(255, 255, 255, 0.96);
}

.tenant-admin-welcome-theme {
    font-family: var(--font-sans-marketing);
    background-color: var(--brand-cream);
    color: var(--brand-slate);
}

.dark .tenant-admin-theme {
    --background: #0f172a;
    --foreground: #f8fafc;
    --card: #16223a;
    --card-foreground: #f1f5f9;
    --popover: #16223a;
    --popover-foreground: #f8fafc;
    --primary: #f472b6;
    --primary-foreground: #2e0f1f;
    --secondary: #fbbf24;
    --secondary-foreground: #1f1300;
    --muted: #1f2937;
    --muted-foreground: #d1d5db;
    --accent: #1f2937;
    --accent-foreground: #f1f5f9;
    --destructive: #f87171;
    --destructive-foreground: #7f1d1d;
    --border: rgba(148, 163, 184, 0.25);
    --input: rgba(148, 163, 184, 0.25);
    --ring: #f472b6;
    --chart-1: #f472b6;
    --chart-2: #fbbf24;
    --chart-3: #38bdf8;
    --chart-4: #34d399;
    --chart-5: #fb7185;
    --sidebar: #111827;
    --sidebar-foreground: #f8fafc;
    --sidebar-primary: #f472b6;
    --sidebar-primary-foreground: #2e0f1f;
    --sidebar-accent: rgba(248, 113, 169, 0.12);
    --sidebar-accent-foreground: #f8fafc;
    --sidebar-border: rgba(148, 163, 184, 0.2);
    --sidebar-ring: #f472b6;

    --tenant-surface: rgba(21, 34, 58, 0.92);
    --tenant-surface-muted: rgba(15, 23, 42, 0.85);
    --tenant-surface-strong: #1e293b;
    --tenant-border-strong: rgba(148, 163, 184, 0.35);
    --tenant-foreground-soft: #e2e8f0;
    --tenant-layer: rgba(30, 41, 59, 0.88);
    --tenant-layer-strong: rgba(30, 41, 59, 0.94);
}

.dark {
    --background: oklch(0.145 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.145 0 0);
    --card-foreground: oklch(0.985 0 0);
    --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);
}

html.guest-theme {
    --background: var(--guest-background);
    --card: var(--guest-surface);
    --popover: var(--guest-surface);
    background-color: var(--guest-background);
    font-size: calc(16px * var(--guest-font-scale, 1));
}

html.guest-theme.dark {
    --background: var(--guest-background);
    --card: var(--guest-surface);
    --popover: var(--guest-surface);
    background-color: var(--guest-background);
}

@keyframes mobile-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes admin-fade-up {
    0% {
        opacity: 0;
        transform: translate3d(0, 6px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.admin-fade-up {
    animation: admin-fade-up 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .admin-fade-up {
        animation: none;
    }
}

.mobile-skeleton {
    border-color: transparent !important;
    background: linear-gradient(
        90deg,
        rgba(148, 163, 184, 0.12),
        rgba(148, 163, 184, 0.28),
        rgba(148, 163, 184, 0.12)
    );
    background-size: 200% 100%;
    animation: mobile-shimmer 1.4s ease-in-out infinite;
}

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

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

@keyframes aurora {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.bg-aurora-enhanced {
    background: radial-gradient(circle at 20% 80%, #a8edea 0%, #fed6e3 50%, #d299c2 100%), linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%, 400% 400%;
    animation: aurora 20s ease infinite;
}

.dark .bg-aurora-enhanced {
    background: radial-gradient(circle at 20% 80%, #0f4c75 0%, #2a1b3d 50%, #1a1a2e 100%), linear-gradient(-45deg, #0f3460, #533483, #0b6b9f, #0f4c75);
    background-size: 400% 400%, 400% 400%;
    animation: aurora 20s ease infinite;
}

.guest-immersive .guest-header {
    display: none !important;
}

.guest-immersive .guest-bottom-nav {
    display: flex !important;
    opacity: 0 !important;
    transform: translateY(12px) !important;
    pointer-events: none !important;
}

.guest-immersive.guest-nav-visible .guest-bottom-nav {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.guest-immersive {
    overscroll-behavior: contain;
    background-color: #000;
}

@theme inline {
    --animate-spin:
        spin 2s linear infinite;
}

@layer base {
  * {
    @apply border-border outline-ring/50;
    }
  body {
    @apply bg-background text-foreground;
    }
}
