/*
 * DaisyUI Overrides
 * This file loads AFTER tailwind.css to override DaisyUI component defaults.
 * Keep overrides minimal - prefer Tailwind utility classes when possible.
 */

.stat-value {
  font-size: 1.5rem;
}

/*
 * ActionText / Lexxy Editor Overflow Fix
 * Prevents ActionText content from overflowing on mobile devices
 */
.instruction-item lexxy-editor {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* Touch-friendly drag handle styles */
[data-sortable-handle] {
  touch-action: none;
  cursor: grab;
}

[data-sortable-handle]:active {
  cursor: grabbing;
}

/*
 * Label Text Wrapping Fix
 * DaisyUI sets text-wrap-mode: nowrap on .label which causes
 * labels to overflow their containers. Override to allow wrapping.
 */
.label {
  text-wrap-mode: wrap;
}

.dropdown-content {
  border-radius: 4px;
}

.menu {
  border-radius: 4px;
}

/* World Spice button overrides */
.btn {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 120ms cubic-bezier(0.34, 0.07, 0.16, 1),
              color 120ms cubic-bezier(0.34, 0.07, 0.16, 1),
              border-color 120ms cubic-bezier(0.34, 0.07, 0.16, 1),
              transform 120ms cubic-bezier(0.34, 0.07, 0.16, 1);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  color: #000000;
  border: 1px solid #000000;
}

.btn-secondary:hover {
  background: #F2F2F2;
}

.btn-ghost:hover {
  background: #F2F2F2;
}

/* World Spice category chip overrides */
.badge {
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
}

.badge-ghost {
  background: transparent;
  border: 1px solid #000;
  color: #000;
}

.badge-secondary {
  background: #51251F;
  border-color: #51251F;
  color: #FFFFFF;
}

.badge-info {
  background: #136096;
  border-color: #136096;
  color: #FFFFFF;
}

.badge-warning {
  background: #DECA6A;
  border-color: #DECA6A;
  color: #41191C;
}

.badge-outline {
  background: transparent;
  border: 1px solid #000;
  color: #000;
}

.badge-outline:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-content);
}

/* Filters collapse: collapsed by default on mobile (toggleable),
   always expanded on desktop. Pure CSS so there is no open/close flash. */
@media (min-width: 1024px) {
  .filters-collapse {
    grid-template-rows: max-content 1fr;
  }

  .filters-collapse > .collapse-content {
    visibility: visible;
    min-height: fit-content;
    padding-bottom: 1rem;
  }

  /* Keep the arrow in its "open" orientation on desktop. */
  .filters-collapse.collapse-arrow > .collapse-title:after {
    transform: translateY(-50%) rotate(225deg);
  }

  /* Filters are always shown on desktop, so the toggle isn't interactive. */
  .filters-collapse > input[type="checkbox"],
  .filters-collapse > .collapse-title {
    cursor: default;
    pointer-events: none;
  }
}

/* Named category badges for spice/blend families */
.badge-curry { background: #DC6239; border-color: #DC6239; color: #FFF; }
.badge-salt { background: #1D7A58; border-color: #1D7A58; color: #FFF; }
.badge-spicy { background: #94292B; border-color: #94292B; color: #FFF; }
.badge-region { background: #136096; border-color: #136096; color: #FFF; }
.badge-bbq { background: #94253F; border-color: #94253F; color: #FFF; }
.badge-herb { background: #2E6B38; border-color: #2E6B38; color: #FFF; }
.badge-misc { background: #38346A; border-color: #38346A; color: #FFF; }
.badge-pepper { background: #131416; border-color: #131416; color: #FFF; }
.badge-warmspice { background: #51251F; border-color: #51251F; color: #FFF; }
