@import "tailwindcss";

@theme {
  --color-emerald-300: #25d366;
  /* Bright WhatsApp Green */
  --color-emerald-400: #128c7e;
  /* Medium WhatsApp Teal/Green */
  --color-emerald-500: #008069;
  /* Primary WhatsApp Teal */
  --color-emerald-600: #075e54;
  /* Dark WhatsApp Green */
  --color-emerald-700: #032b1d;
  /* Deep Forest Green */

  /* Custom Theme Font Mappings */
  --font-sans: var(--font-cabin), "Cabin", sans-serif;
  --font-display: var(--font-cabin), "Cabin", sans-serif;
  --font-mono: var(--font-mono), monospace;

  /* Lumina Commerce Design Colors mapped to CSS variables for dynamic Dark/Light theme switching */
  --color-primary: var(--primary);
  --color-primary-container: var(--primary-container);
  --color-secondary: var(--secondary);
  --color-secondary-container: var(--secondary-container);
  --color-warning: var(--warning);
  --color-danger: var(--danger);
  --color-background: var(--background-theme);
  --color-surface-dim: var(--background-theme);
  --color-surface-bright: var(--surface-bright);

  /* Override radius values to 0px for boxy angles */
  --radius: 0px;
  --radius-xs: 0px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --radius-2xl: 0px;
  --radius-3xl: 0px;
  --radius-4xl: 0px;
  --radius-full: 0px;
}

:root {
  --primary: #25d366;
  --primary-container: #008069;
  --secondary: #128c7e;
  --secondary-container: #1a2621;
  --warning: #fc7c78;
  --danger: #ffb4ab;
  --background-theme: #0e1612;
  --surface-bright: #202c33;

  --bg-color: #060b08;
  --text-color: #f1f5f3;
  --panel-bg: rgba(23, 35, 29, 0.75);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-hover-bg: rgba(30, 46, 38, 0.85);
  --panel-hover-border: rgba(37, 211, 102, 0.3);
  --input-bg: rgba(14, 23, 19, 0.85);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-bg: #111e18;
  --text-muted: #8c9fa0;
  --text-title: #ffffff;
  --divider-color: rgba(255, 255, 255, 0.08);

  /* Log / Chat custom borders */
  --border-muted: rgba(255, 255, 255, 0.06);
  --bg-darker: rgba(0, 0, 0, 0.35);
  --outer-bg: #060b08;

  /* WhatsApp Bubble variables */
  --bubble-out-bg: #005c4b;
  --bubble-out-text: #e9edef;
  --bubble-in-bg: #202c33;
  --bubble-in-text: #e9edef;
}

html.light {
  --primary: #008069;
  --primary-container: #d9fdd3;
  --secondary: #128c7e;
  --secondary-container: #efeae2;
  --warning: #ea580c;
  --danger: #dc2626;
  --background-theme: #efeae2;
  --surface-bright: #ffffff;

  --bg-color: #efeae2;
  --text-color: #000000;
  --panel-bg: #ffffff;
  --panel-border: rgba(0, 0, 0, 0.08);
  --panel-hover-bg: rgba(0, 128, 105, 0.03);
  --panel-hover-border: rgba(0, 128, 105, 0.15);
  --input-bg: #ffffff;
  --input-border: #e9edef;
  --input-focus-bg: #ffffff;
  --text-muted: #667781;
  --text-title: #000000;
  --divider-color: rgba(0, 0, 0, 0.08);

  --border-muted: rgba(0, 0, 0, 0.05);
  --bg-darker: rgba(0, 128, 105, 0.03);
  --outer-bg: #ffffff;

  /* WhatsApp Bubble variables */
  --bubble-out-bg: #d9fdd3;
  --bubble-out-text: #000000;
  --bubble-in-bg: #ffffff;
  --bubble-in-text: #000000;
}

/* Custom CSS utilities for the premium glassmorphism theme */

/* Universal Boxed / Square Enforcement (Cards, Buttons, Containers, Inputs, Panels, Tables, Modals) */
*,
*::before,
*::after {
  border-radius: 0px !important;
}

svg,
svg * {
  stroke-linejoin: miter !important;
  stroke-linecap: square !important;
  rx: 0px !important;
  ry: 0px !important;
  border-radius: 0px !important;
}

/* === EXCEPTIONS FOR AVATARS, SPINNERS, AND PHONE MOCKUPS === */

/* 1. Profile Icons, User Avatars, Circles, Badges, & Status Indicators */
.rounded-full,
.avatar,
.profile-avatar,
.profile-icon,
.avatar-circle,
[data-avatar],
[class*="rounded-full"] {
  border-radius: 9999px !important;
}

/* 2. Loading Spinners & Animations - Normal Smooth Circle Loader */
.animate-spin,
[class*="animate-spin"],
svg.animate-spin,
svg.animate-spin *,
svg[class*="animate-spin"],
svg[class*="animate-spin"] * {
  border-radius: 50% !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  rx: initial !important;
  ry: initial !important;
}

/* 3. Phone Mockup Frames & Screen Canvas - Genuine Phone Curvature */
.phone-mockup,
.phone-frame,
.phone-container,
[class*="rounded-[3"],
[class*="rounded-[4"],
[class*="rounded-[5"],
[class*="rounded-[36px]"],
[class*="rounded-[38px]"],
[class*="rounded-[42px]"],
[class*="rounded-[52px]"] {
  border-radius: 38px !important;
}

.phone-screen,
[class*="rounded-[42px]"] > div,
[class*="rounded-[38px]"] > div,
[class*="rounded-[36px]"] > div {
  border-radius: 30px !important;
}

.dynamic-island,
.phone-notch,
.phone-pill {
  border-radius: 9999px !important;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.Outfit {
  font-family: var(--font-cabin), 'Cabin', sans-serif !important;
}

.glass-panel {
  background: var(--panel-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-border) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-hover:hover {
  background: var(--panel-hover-bg);
  border-color: var(--panel-hover-border);
  transform: translateY(-2.5px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.15), 0 0 16px -4px rgba(78, 222, 163, 0.15);
}

.glass-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: 0px !important;
  color: var(--text-title) !important;
  transition: all 0.2s ease-in-out;
}

/* Ensure all native form controls remain readable in both themes */
input,
textarea,
select {
  color: var(--text-title) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

.input-field {
  @apply w-full bg-white border border-slate-200 rounded-none pl-11 pr-4 py-3 text-sm text-slate-800 placeholder-slate-400 focus:outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 font-sans shadow-sm;
}

.btn-primary {
  @apply w-full bg-emerald-500 hover:bg-emerald-600 text-white font-semibold py-3 rounded-none text-sm transition-all shadow-lg shadow-emerald-500/15 cursor-pointer disabled:opacity-50 disabled:bg-emerald-300;
}

.chat-bubble-in {
  background: var(--bubble-in-bg) !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: 0px !important;
  color: var(--bubble-in-text) !important;
}

.chat-bubble-out {
  background: var(--bubble-out-bg) !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: 0px !important;
  color: var(--bubble-out-text) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Active sidebar link without vertical bar indicator */
.active-sidebar-link {
  background: rgba(78, 222, 163, 0.08) !important;
  color: var(--primary) !important;
  position: relative;
  transition: all 0.2s ease-in-out;
}

.glow-text-primary {
  text-shadow: 0 0 15px rgba(78, 222, 163, 0.35);
}

.glow-text-secondary {
  text-shadow: 0 0 15px rgba(195, 192, 255, 0.35);
}

/* Custom Neutral Scrollbars */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent !important;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3) !important;
  border-radius: 4px !important;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5) !important;
}

/* Global overrides for light theme mapping tailwind utilities to CSS variables */
html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6,
html.light p,
html.light span,
html.light div,
html.light label,
html.light li,
html.light td,
html.light th,
html.light .Outfit {
  color: #0f172a;
}

html.light .glass-panel,
html.light .glass-panel h1,
html.light .glass-panel h2,
html.light .glass-panel h3,
html.light .glass-panel h4,
html.light .glass-panel p,
html.light .glass-panel span,
html.light .glass-panel div,
html.light .glass-panel label,
html.light .glass-panel li {
  color: #0f172a !important;
}

html.light .text-white,
html.light .text-gray-100,
html.light .text-gray-200,
html.light .text-gray-300,
html.light .text-gray-400,
html.light .text-gray-500,
html.light .text-slate-100,
html.light .text-slate-200,
html.light .text-slate-300,
html.light .text-slate-400,
html.light .text-slate-500,
html.light .text-slate-600 {
  color: #0f172a !important;
}

/* Retain primary green for green accent elements in light mode */
html.light .text-emerald-500,
html.light .text-emerald-600,
html.light .text-emerald-700,
html.light .text-emerald-800,
html.light .glass-panel .text-emerald-500,
html.light .glass-panel .text-emerald-600,
html.light .glass-panel .text-emerald-700,
html.light .glass-panel .text-emerald-800 {
  color: #008069 !important;
}

html.light .border-white\/5,
html.light .border-white\/10 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light .divide-white\/5 {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light .bg-black\/10,
html.light .bg-black\/20,
html.light .bg-black\/25,
html.light .bg-black\/40 {
  background-color: rgba(0, 0, 0, 0.04) !important;
}

html.light .bg-black\/50,
html.light .bg-black\/60 {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
}

html.light .scrollbar-thin {
  scrollbar-color: rgba(100, 116, 139, 0.3) transparent !important;
}

html.light .scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3) !important;
}

html.light .scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5) !important;
}

html.light .scrollbar-thin::-webkit-scrollbar-track {
  background: transparent !important;
}

/* Arbitrary white RGBA class translation to dark RGBA for light mode */
html.light [class*="border-[rgba(255,255,255"],
html.light [class*="divide-[rgba(255,255,255"] {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.light [class*="bg-[rgba(255,255,255"] {
  background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Force dark/black container boxes to clean white in light mode */
html.light [class*="bg-[#0e"],
html.light [class*="bg-[#0f"],
html.light [class*="bg-[#05"],
html.light [class*="bg-[#1a"],
html.light [class*="bg-[#1e"] {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Explicit Confirm & Pay Now button styling override for #EFEAE2 text */
.confirm-pay-btn,
.confirm-pay-btn *,
button.confirm-pay-btn,
button.confirm-pay-btn *,
html.light .confirm-pay-btn,
html.light .confirm-pay-btn *,
html.light .glass-panel .confirm-pay-btn,
html.light .glass-panel .confirm-pay-btn *,
html.light .glass-panel button.confirm-pay-btn,
html.light .glass-panel button.confirm-pay-btn * {
  background-color: #008069 !important;
  color: #efeae2 !important;
  fill: #efeae2 !important;
  stroke: #efeae2 !important;
}

/* Ensure dropdown select and options always maintain high contrast and readability */
select {
  color-scheme: dark;
}

option {
  background-color: #171717 !important;
  color: #ffffff !important;
}

html.light select {
  color-scheme: light;
  background-color: #ffffff !important;
  color: #111827 !important;
}

html.light option {
  background-color: #ffffff !important;
  color: #111827 !important;
}

/* Page Slide-in Transition Animation */
@keyframes pageSlideIn {
  from {
    transform: translateX(12px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-page-slide-in {
  animation: pageSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom sleek global scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0px;
  border: 1px solid transparent;
  background-clip: padding-box;
  min-height: 16px;
  max-height: 30px;
  min-width: 16px;
  max-width: 30px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid transparent;
  background-clip: padding-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

/* Light mode overrides */
html.light * {
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

html.light ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0px;
  border: 1px solid transparent;
  background-clip: padding-box;
  min-height: 16px;
  max-height: 30px;
  min-width: 16px;
  max-width: 30px;
}

html.light ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0px;
  border: 1px solid transparent;
  background-clip: padding-box;
}


/* Primary green buttons text override */
button.bg-emerald-500,
button.bg-emerald-500 *,
button.bg-emerald-600,
button.bg-emerald-600 *,
button.bg-emerald-700,
button.bg-emerald-700 *,
button.bg-primary,
button.bg-primary *,
button.bg-secondary,
button.bg-secondary *,
input[type="submit"] {
  color: #efeae2 !important;
}

button.bg-emerald-500 svg,
button.bg-emerald-500 svg *,
button.bg-emerald-600 svg,
button.bg-emerald-600 svg *,
button.bg-emerald-700 svg,
button.bg-emerald-700 svg *,
button.bg-primary svg,
button.bg-primary svg *,
button.bg-secondary svg,
button.bg-secondary svg *,
input[type="submit"] svg {
  stroke: #efeae2 !important;
  color: #efeae2 !important;
}

/* Make sidebar navigation icons sharp and boxy */
aside svg, 
aside svg * {
  stroke-linejoin: miter !important;
  stroke-linecap: square !important;
  rx: 0px !important;
  ry: 0px !important;
}

aside nav .svg-container svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}