/* Custom CSS to override any OKLCH colors with hex equivalents */

@font-face {
  font-family: 'Yekan';
  src: url('Font/Yekan/Yekan.eot');
  src: url('Font/Yekan/Yekan.eot?#iefix') format('embedded-opentype'),
     url('Font/Yekan/Yekan.woff') format('woff'),
     url('Font/Yekan/Yekan.ttf') format('truetype'),
     url('Font/Yekan/Yekan.svg#Yekan') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Yekan', Tahoma, Arial, sans-serif !important;
}

/* Override any potential OKLCH colors with hex equivalents */
:root {
  --color-primary: #3b82f6;
  --color-secondary: #8b5cf6;
  --color-accent: #06b6d4;
  --color-neutral: #6b7280;
  --color-base-100: #ffffff;
  --color-base-200: #f3f4f6;
  --color-base-300: #e5e7eb;
  --color-info: #3b82f6;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
}

/* Ensure all colors use hex values */
.btn-primary {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
}

.btn-secondary {
  background-color: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
}

.btn-accent {
  background-color: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
}

.btn-info {
  background-color: var(--color-info) !important;
  border-color: var(--color-info) !important;
}

.btn-success {
  background-color: var(--color-success) !important;
  border-color: var(--color-success) !important;
}

.btn-warning {
  background-color: var(--color-warning) !important;
  border-color: var(--color-warning) !important;
}

.btn-error {
  background-color: var(--color-error) !important;
  border-color: var(--color-error) !important;
}

/* Override any OKLCH colors in DaisyUI components */
.alert-info {
  background-color: rgba(59, 130, 246, 0.1) !important;
  border-color: var(--color-info) !important;
  color: var(--color-info) !important;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1) !important;
  border-color: var(--color-success) !important;
  color: var(--color-success) !important;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1) !important;
  border-color: var(--color-warning) !important;
  color: var(--color-warning) !important;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-color: var(--color-error) !important;
  color: var(--color-error) !important;
}

/* Card backgrounds */
.card {
  background-color: var(--color-base-100) !important;
}

.bg-base-100 {
  background-color: var(--color-base-100) !important;
}

.bg-base-200 {
  background-color: var(--color-base-200) !important;
}

.bg-base-300 {
  background-color: var(--color-base-300) !important;
}

/* Text colors */
.text-primary {
  color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.text-accent {
  color: var(--color-accent) !important;
}

.text-info {
  color: var(--color-info) !important;
}

.text-success {
  color: var(--color-success) !important;
}

.text-warning {
  color: var(--color-warning) !important;
}

.text-error {
  color: var(--color-error) !important;
}

/* Button content centering */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem;
}

.btn svg {
  flex-shrink: 0;
}

/* Utility: keep button content on one line */
.btn-nowrap,
button.btn.btn-nowrap,
a.btn.btn-nowrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem;
  white-space: nowrap !important;
  width: auto !important;
  max-width: none !important;
  min-width: max-content;
}

.btn-nowrap svg {
  flex-shrink: 0;
}

/* Mobile button text wrapping fix */
@media (max-width: 640px) {
  .btn,
  button.btn,
  a.btn {
    white-space: normal !important;
    line-height: 1.4 !important;
    text-align: center !important;
    max-width: 100%;
  }

  .btn > span,
  button.btn > span,
  a.btn > span,
  .btn .btn-text {
    white-space: normal !important;
    display: inline-block;
  }

  .btn-nowrap,
  button.btn.btn-nowrap,
  a.btn.btn-nowrap {
    white-space: nowrap !important;
    max-width: none !important;
    width: auto !important;
    min-width: max-content;
  }
}

/* Comprehensive OKLCH color overrides for PDF/Image generation */
.btn-outline {
  background-color: transparent !important;
  border-color: var(--color-primary) !important;
  color: var(--color-primary) !important;
}

.btn-outline:hover {
  background-color: var(--color-primary) !important;
  color: white !important;
}

/* Override any remaining OKLCH colors */
/* * { color: inherit !important; } -- Removed as it breaks button text colors */

/* Force all DaisyUI components to use hex colors */
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-info,
.btn-success,
.btn-warning,
.btn-error {
  color: white !important;
}

.btn-outline {
  color: var(--color-primary) !important;
}

/* Override any potential OKLCH in DaisyUI base classes */
.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-accent { background-color: var(--color-accent) !important; }
.bg-info { background-color: var(--color-info) !important; }
.bg-success { background-color: var(--color-success) !important; }
.bg-warning { background-color: var(--color-warning) !important; }
.bg-error { background-color: var(--color-error) !important; }

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-accent { color: var(--color-accent) !important; }
.text-info { color: var(--color-info) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }

.border-primary { border-color: var(--color-primary) !important; }
.border-secondary { border-color: var(--color-secondary) !important; }
.border-accent { border-color: var(--color-accent) !important; }
.border-info { border-color: var(--color-info) !important; }
.border-success { border-color: var(--color-success) !important; }
.border-warning { border-color: var(--color-warning) !important; }
.border-error { border-color: var(--color-error) !important; }

/* Additional comprehensive OKLCH overrides */
/* * { color: inherit !important; } -- Removed as it breaks button text colors */

/* Override any remaining DaisyUI OKLCH colors */
.btn-ghost {
  background-color: transparent !important;
  color: var(--color-primary) !important;
}

.btn-ghost:hover {
  background-color: var(--color-primary) !important;
  color: white !important;
}

/* Override any potential OKLCH in utility classes */
.text-base-content { color: #1f2937 !important; }
.text-base-content-2 { color: #374151 !important; }
.text-base-content-3 { color: #6b7280 !important; }

.bg-base-content { background-color: #1f2937 !important; }
.bg-base-content-2 { background-color: #374151 !important; }
.bg-base-content-3 { background-color: #6b7280 !important; }

/* Force all color functions to use hex values - ULTRA AGGRESSIVE (DISABLED AS IT BREAKS STYLING)
[style*="oklch"], [style*="OKLCH"], [style*="oklch("], [style*="OKLCH("] {
  color: #000000 !important;
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
  outline-color: #d1d5db !important;
  text-decoration-color: #000000 !important;
  box-shadow: none !important;
}
*/

/* Override any inline styles with OKLCH - ULTRA AGGRESSIVE (DISABLED AS IT BREAKS STYLING)
*[style*="oklch"], *[style*="OKLCH"], *[style*="oklch("], *[style*="OKLCH("] {
  color: #000000 !important;
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
  outline-color: #d1d5db !important;
  text-decoration-color: #000000 !important;
  box-shadow: none !important;
}
*/

/* Override computed styles that might contain OKLCH */
/* * { color: inherit !important; } -- Removed as it breaks button text colors */

/* Additional OKLCH overrides for all possible selectors (DISABLED AS IT BREAKS STYLING)
html [style*="oklch"], 
body [style*="oklch"], 
div [style*="oklch"], 
span [style*="oklch"], 
p [style*="oklch"], 
h1 [style*="oklch"], 
h2 [style*="oklch"], 
h3 [style*="oklch"], 
h4 [style*="oklch"], 
h5 [style*="oklch"], 
h6 [style*="oklch"],
button [style*="oklch"],
a [style*="oklch"],
input [style*="oklch"],
textarea [style*="oklch"],
select [style*="oklch"] {
  color: #000000 !important;
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
  outline-color: #d1d5db !important;
  text-decoration-color: #000000 !important;
  box-shadow: none !important;
}
*/

/* Preserve dashboard and admin page styling - STRONG OVERRIDES */
.bg-blue-100, 
div.bg-blue-100, 
.w-10.h-10.bg-blue-100,
.w-12.h-12.bg-blue-100 { 
  background-color: #dbeafe !important; 
}

.bg-green-100, 
div.bg-green-100, 
.w-10.h-10.bg-green-100,
.w-12.h-12.bg-green-100 { 
  background-color: #dcfce7 !important; 
}

.bg-purple-100, 
div.bg-purple-100, 
.w-10.h-10.bg-purple-100,
.w-12.h-12.bg-purple-100 { 
  background-color: #e9d5ff !important; 
}

.bg-orange-100, 
div.bg-orange-100, 
.w-10.h-10.bg-orange-100,
.w-12.h-12.bg-orange-100 { 
  background-color: #fed7aa !important; 
}

.bg-red-100, 
div.bg-red-100, 
.w-10.h-10.bg-red-100,
.w-12.h-12.bg-red-100 { 
  background-color: #fee2e2 !important; 
}

.bg-yellow-100, 
div.bg-yellow-100, 
.w-10.h-10.bg-yellow-100,
.w-12.h-12.bg-yellow-100 { 
  background-color: #fef3c7 !important; 
}

.bg-blue-200, 
div.bg-blue-200, 
.w-10.h-10.bg-blue-200,
.w-12.h-12.bg-blue-200 { 
  background-color: #bfdbfe !important; 
}

.bg-green-200, 
div.bg-green-200, 
.w-10.h-10.bg-green-200,
.w-12.h-12.bg-green-200 { 
  background-color: #bbf7d0 !important; 
}

.bg-purple-200, 
div.bg-purple-200, 
.w-10.h-10.bg-purple-200,
.w-12.h-12.bg-purple-200 { 
  background-color: #ddd6fe !important; 
}

.bg-orange-200, 
div.bg-orange-200, 
.w-10.h-10.bg-orange-200,
.w-12.h-12.bg-orange-200 { 
  background-color: #fed7aa !important; 
}

.bg-red-200, 
div.bg-red-200, 
.w-10.h-10.bg-red-200,
.w-12.h-12.bg-red-200 { 
  background-color: #fecaca !important; 
}

.bg-yellow-200, 
div.bg-yellow-200, 
.w-10.h-10.bg-yellow-200,
.w-12.h-12.bg-yellow-200 { 
  background-color: #fde68a !important; 
}

/* Preserve text colors for icons */
.text-blue-600 { color: #2563eb !important; }
.text-green-600 { color: #16a34a !important; }
.text-purple-600 { color: #9333ea !important; }
.text-orange-600 { color: #ea580c !important; }
.text-red-600 { color: #dc2626 !important; }
.text-yellow-600 { color: #ca8a04 !important; }

/* Preserve border colors */
.border-blue-500 { border-color: #3b82f6 !important; }
.border-green-500 { border-color: #22c55e !important; }
.border-purple-500 { border-color: #a855f7 !important; }
.border-orange-500 { border-color: #f97316 !important; }
.border-red-500 { border-color: #ef4444 !important; }
.border-yellow-500 { border-color: #eab308 !important; }

/* Dashboard specific grid - only apply to dashboard */
.dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}

@media (min-width: 640px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Template designer styles moved to tailwind-local.css */

/* Modal and Input unified light theme overrides */
.modal-box {
    background-color: #ffffff !important;
    color: #111827 !important;
}

.input, .select, .file-input, .textarea {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}

.label-text, .label-text-alt {
    color: #374151 !important;
}

.file-input::file-selector-button {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}

/* ULTIMATE Mobile menu fix - FORCE HIDE */
#mobileMenu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    top: -10000px !important;
    left: -10000px !important;
    width: 0 !important;
    max-height: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    transform: scale(0) !important;
}

#mobileMenu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-height: none !important;
    pointer-events: auto !important;
    z-index: 1000 !important;
    transform: scale(1) !important;
    background: white !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

/* Override ALL possible framework styles */
div#mobileMenu,
.md\:hidden div#mobileMenu,
header div#mobileMenu,
nav div#mobileMenu,
body div#mobileMenu,
html div#mobileMenu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    top: -10000px !important;
    left: -10000px !important;
    width: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    transform: scale(0) !important;
}

/* ULTRA FORCE - Override even Tailwind utilities */
#mobileMenu:not(.show) {
    display: none !important;
}

/* Override any possible Tailwind classes */
.block#mobileMenu:not(.show),
.inline-block#mobileMenu:not(.show),
.flex#mobileMenu:not(.show),
.inline-flex#mobileMenu:not(.show) {
    display: none !important;
}

/* Override DaisyUI and any other framework */
.drawer-content #mobileMenu:not(.show),
.navbar #mobileMenu:not(.show),
.menu #mobileMenu:not(.show) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}