/* Application styles */

@keyframes pulse-border {

  0%,
  100% {
    border-color: rgb(239 68 68);
    /* red-500 */
  }

  50% {
    border-color: rgb(252 165 165);
    /* red-300 - much lighter for stronger contrast */
  }
}

/* Waffle Chart Styles */
.waffle-chart {
  position: relative;
}

.waffle-chart-container {
  overflow: hidden;
  min-width: 0;
}

.waffle-square {
  width: 20px;
  height: 20px;
  transition: all 0.2s ease-in-out;
  border-radius: 3px;
  border: 1px solid transparent;
}

/* Compact waffle squares for dense grid */
.waffle-square-compact {
  width: 16px;
  height: 16px;
  transition: all 0.2s ease-in-out;
  border-radius: 2px;
  border: 1px solid transparent;
}

.waffle-square-compact:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
  position: relative;
  border-radius: 3px;
}

/* Ultra compact waffle squares for maximum density */
.waffle-square-ultra-compact {
  width: 18px;
  height: 18px;
  transition: all 0.15s ease-in-out;
  border-radius: 0.125rem;
  border: 1px solid transparent;
}

.waffle-square-ultra-compact:hover {
  border-radius: 0.25rem;
}

/* Empty waffle squares - no hover effects */
.waffle-square-empty {
  width: 18px;
  height: 18px;
  border-radius: 0.125rem;
  background-color: #ffffff;
  border: 1px solid #e1e6ec;
}

/* Vertical product names - first character at bottom */
.product-name-vertical {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  height: 196px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  transform: rotate(180deg);
  overflow: hidden;
}


/* Summary bar perfect centering */
.summary-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
}

/* Narrow summary bars for tight columns */
.summary-bar-narrow {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  font-weight: bold;
  color: white;
}

.waffle-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.waffle-square:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10;
  position: relative;
  border-radius: 4px;
}

#waffle-tooltip {
  max-width: 200px;
  word-wrap: break-word;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .waffle-square {
    width: 16px;
    height: 16px;
  }

  .waffle-chart-container {
    font-size: 0.875rem;
  }
}

.waffle-ranged {
  background-color: #00C951;
  /* green-500 */
}

.waffle-out_of_stock {
  background-color: #fcaf17;
  /* canary */
}

.waffle-cut_in {
  background-color: #3b82f6;
  /* blue-500 */
}

.waffle-not_ranged {
  background-color: #e5e7eb;
  /* gray-200 */
  /* border gray-300 */
  border: 1px solid #d1d5db;
}

.animate-pulse-border {
  animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes ping-every-5s {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  15% {
    transform: scale(2);
    opacity: 0;
  }

  16%,
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.animate-ping-every-5s {
  animation: ping-every-5s 5s cubic-bezier(0, 0, 0.2, 1) infinite;
}