/* Grid Maker Styles - Flat Design with Zebra Theme */

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

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

@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Mulish', Helvetica, Arial, sans-serif;
}

/* DaisyUI Theme Customization */
[data-theme="zebra"] {
  --p: 15 75% 55%; /* zebra-coral as primary */
  --pf: 15 75% 45%;
  --pc: 0 0% 100%;
  --s: 168 35% 65%; /* zebra-mint as secondary */
  --sf: 168 35% 55%;
  --sc: 210 20% 30%;
  --a: 55 50% 45%; /* zebra-olive as accent */
  --af: 55 50% 35%;
  --ac: 0 0% 100%;
  --n: 210 20% 30%; /* zebra-dark as neutral */
  --nf: 210 20% 20%;
  --nc: 0 0% 100%;
  --b1: 0 0% 100%; /* base colors - white */
  --b2: 220 14% 96%; /* light gray */
  --b3: 220 13% 91%; /* slightly darker gray */
  --bc: 210 20% 30%;
  --su: 168 35% 55%;
  --wa: 45 70% 60%;
  --er: 10 70% 55%;
  --rounded-box: 0.5rem;
  --rounded-btn: 0.375rem;
  --rounded-badge: 0.375rem;
  --animation-btn: 0.2s;
  --animation-input: 0.2s;
  --btn-focus-scale: 0.98;
  --border-btn: 1px;
  --tab-border: 1px;
  --tab-radius: 0.375rem;
}

/* Override primary color to coral */
.btn-primary {
  background-color: #E86D4A !important;
  border-color: #E86D4A !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #d45a3a !important;
  border-color: #d45a3a !important;
}

.checkbox-primary:checked {
  background-color: #E86D4A !important;
  border-color: #E86D4A !important;
}

.range-primary::-webkit-slider-thumb {
  background-color: #E86D4A !important;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.range-primary::-moz-range-thumb {
  background-color: #E86D4A !important;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Drop Target */
.drop-target {
  transition: all 0.2s ease;
}

.drop-target:hover {
  border-color: #E86D4A;
  background-color: rgba(232, 109, 74, 0.08);
}

.drop-target.active {
  border-color: #E86D4A;
  background-color: rgba(232, 109, 74, 0.1);
  border-style: solid;
}

/* Preview Area Drop */
#previewArea {
  transition: all 0.2s ease;
}

#previewArea.drag-active {
  background-color: rgba(126, 189, 195, 0.2);
  outline: 2px dashed #7EBDC3;
  outline-offset: -2px;
}

/* Color Picker */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 2px;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 0.375rem;
}

input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 0.375rem;
}

/* Number Inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

/* Disabled Input */
input:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Canvas */
#renderArea {
  max-width: 100%;
  height: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Toast Messages */
.toast-message {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
}

.toast-message.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-message.positive {
  background: #8FCAB4;
  color: #3D4F5F;
}

.toast-message.negative {
  background: #E86D4A;
  color: white;
}

/* Cards - flat style */
.card {
  box-shadow: none;
  border: 1px solid rgba(61, 79, 95, 0.1);
}

/* Buttons - flat style */
.btn {
  box-shadow: none !important;
  text-transform: none;
  font-weight: 500;
}

.btn:active {
  transform: scale(0.98);
}

/* Badge adjustments */
.badge-success {
  background-color: #8FCAB4;
  border-color: #8FCAB4;
  color: #3D4F5F;
}

.badge-ghost {
  background-color: rgba(61, 79, 95, 0.08);
  color: #3D4F5F;
}

/* Collapse/Accordion flat style */
.collapse {
  border-radius: 0.5rem;
}

.collapse-title {
  padding: 1rem 1.25rem;
}

/* Input flat style */
.input, .select {
  border-radius: 0.375rem;
}

.input:focus, .select:focus {
  outline: none;
  border-color: #7EBDC3;
  box-shadow: 0 0 0 2px rgba(126, 189, 195, 0.2);
}

/* Range slider flat style with visible track */
.range {
  height: 0.5rem;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
}

.range::-webkit-slider-runnable-track {
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  height: 0.5rem;
}

.range::-moz-range-track {
  background-color: #e5e7eb;
  border-radius: 0.25rem;
  height: 0.5rem;
}

.range::-webkit-slider-thumb {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  box-shadow: none;
  margin-top: -0.3rem;
}

.range::-moz-range-thumb {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .sticky {
    position: relative !important;
    top: 0 !important;
  }
}

/* Print */
@media print {
  header,
  footer,
  .lg\:col-span-1 {
    display: none !important;
  }
  
  #renderArea {
    max-width: 100%;
    box-shadow: none;
  }
}

/* Decorative squares like in Faviconer */
.decor-square {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: rgba(126, 189, 195, 0.3);
}

/* Flat button variants */
.btn-ghost {
  background-color: transparent;
  border: 1px solid rgba(61, 79, 95, 0.2);
  color: #3D4F5F;
}

.btn-ghost:hover {
  background-color: rgba(61, 79, 95, 0.05);
  border-color: rgba(61, 79, 95, 0.3);
}

.btn-neutral {
  background-color: #3D4F5F;
  border-color: #3D4F5F;
  color: white;
}

.btn-neutral:hover {
  background-color: #2d3d4a;
  border-color: #2d3d4a;
}

/* Focus states */
.btn:focus-visible,
.input:focus-visible,
.select:focus-visible,
.checkbox:focus-visible {
  outline: 2px solid #7EBDC3;
  outline-offset: 2px;
}

/* Magnifier Lens */
#magnifierLens {
  position: fixed;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #3D4F5F;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
  background: #fff;
}

#magnifierLens.visible {
  opacity: 1;
  visibility: visible;
}

/* Link colors */
a {
  color: #E86D4A;
}

a:hover {
  color: #d45a3a;
}
