@charset "UTF-8";
/* Canvas Zoom Controls - positioned overlay controls */
.canvas-workspace {
  position: relative; /* Asegurar que el workspace sea el contenedor de referencia */
}
@media screen and (max-width: 760px) {
  .canvas-workspace .zoom-controls {
    display: none !important;
  }
}
.canvas-workspace .zoom-controls {
  position: absolute;
  top: 5px;
  right: 10px;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  border: 1px solid #e1e1e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  z-index: 100;
}
.canvas-workspace .zoom-controls button {
  display: none;
  width: 28px;
  height: 28px;
  background-color: #00599c;
  border-color: #00599c;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin: 0;
  padding: 0;
  border: 1px solid #00599c;
}
.canvas-workspace .zoom-controls button:hover:not(:disabled) {
  background-color: #004080;
  transform: scale(1.05);
}
.canvas-workspace .zoom-controls button:active:not(:disabled) {
  transform: scale(0.95);
  background-color: #003366;
  border-color: #003366;
}
.canvas-workspace .zoom-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.canvas-workspace .zoom-controls button:focus {
  outline: 2px solid rgba(0, 89, 156, 0.3);
  outline-offset: 2px;
}
.canvas-workspace .zoom-controls button:focus:not(:focus-visible) {
  outline: none;
}
.canvas-workspace .zoom-controls button svg {
  width: 16px;
  height: 16px;
  fill: #ffffff;
}
.canvas-workspace .zoom-controls .zoom-indicator {
  font-size: 11px;
  color: #666;
  min-width: 40px;
  text-align: center;
  font-weight: 500;
  background: rgba(248, 249, 250, 0.8);
  padding: 2px 4px;
  border-radius: 2px;
  border: 1px solid rgba(222, 226, 230, 0.6);
  margin: 0 2px;
}
.canvas-workspace .zoom-controls .zoom-divider {
  width: 1px;
  height: 16px;
  background: #e1e1e1;
  margin: 0 2px;
  align-self: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .zoom-controls {
    top: 8px;
    right: 8px;
    padding: 4px;
    gap: 3px;
  }
  .zoom-controls button {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .zoom-controls .zoom-indicator {
    min-width: 45px;
    font-size: 12px;
    padding: 3px 6px;
  }
}
@media (max-width: 480px) {
  .zoom-controls {
    position: relative;
    top: auto;
    bottom: 20px;
    right: 20px;
    left: 20px;
    justify-content: center;
    padding: 8px;
    flex-direction: column;
  }
  .zoom-controls button {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .zoom-controls .zoom-indicator {
    order: -1;
    margin-bottom: 4px;
    width: 100%;
    text-align: center;
  }
  .zoom-controls .zoom-divider {
    display: none;
  }
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .zoom-controls {
    background: white;
  }
  .zoom-controls button {
    background-color: #00599c;
    border-color: #00599c;
    color: #fff;
  }
  .zoom-controls button:hover:not(:disabled) {
    background-color: #004080;
    border-color: #004080;
  }
  .zoom-controls .zoom-indicator {
    background: white;
    border-color: rgba(100, 100, 100, 0.6);
    color: #00599c;
    border-radius: 3px;
    padding: 5px;
  }
  .zoom-controls .zoom-divider {
    background: #555;
  }
}
/* High contrast mode support */
@media (prefers-contrast: high) {
  .zoom-controls {
    border: 2px solid #000;
    background: #fff;
  }
  .zoom-controls button {
    border: 2px solid #00599c;
    background-color: #00599c;
    color: #fff;
  }
  .zoom-controls button:hover:not(:disabled) {
    background-color: #004080;
    border-color: #004080;
  }
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .zoom-controls,
  .zoom-controls button {
    transition: none;
  }
}
/**
 * Text Editor Component Styles
 * Estilos para el editor de texto integrado en el print-on-demand editor
 */
.text-controls-section {
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 16px;
}
.text-controls-section h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.control-group {
  margin-bottom: 16px;
}
.control-group .font-size input {
  padding: 2px;
  background-color: #4A90E2;
}
.control-group .formating-group,
.control-group .alignment-group {
  width: 50%;
}

.control-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-input {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-family: var(--body-font-family), auto;
  box-shadow: 0 0 6px -3px #ccc;
  resize: vertical;
  min-height: 100px;
  transition: all 0.3s ease;
  outline: none;
  border-width: 2px !important;
  border-color: #5da2cf !important;
  border-style: dashed !important;
  border-radius: 10px !important;
  background-color: rgba(93, 162, 207, 0.231372549);
}
.text-input:focus {
  background-color: rgba(93, 161, 207, 0.368627451);
  box-shadow: 0 0 10px #46aae3;
}
.text-input::placeholder {
  color: #888;
  font-style: italic;
}

.font-select {
  width: 100%;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.2s ease;
  background: white;
  background-repeat: no-repeat;
  cursor: pointer;
  border-width: 2px;
  border-color: #5da2cf !important;
  border-style: dashed !important;
  border-radius: 20px !important;
  background-color: rgba(93, 162, 207, 0.231372549);
  background-position: calc(100% - 1.5rem) center;
  background-size: 0.75rem 0.4375rem;
  padding: var(--input-padding) 3.3125rem var(--input-padding) 1rem;
  width: 100%;
  cursor: pointer;
  transition: border 100ms linear;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
}
.font-select:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}
.font-select option {
  padding: 4px 8px;
}
.font-select option:hover {
  background: #f0f8ff;
}

.font-selector-container {
  position: relative;
}
.font-selector-container .font-loading-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #666;
  background: white;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #ddd;
  z-index: 10;
}
.font-selector-container .font-loading-indicator::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 4px;
  border: 2px solid #ddd;
  border-top-color: #4A90E2;
  border-radius: 50%;
  animation: font-loading-spin 1s linear infinite;
}

@keyframes font-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
.font-size-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  outline: none;
}
.font-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4A90E2;
  cursor: pointer;
  transition: background 0.2s ease;
}
.font-size-slider::-webkit-slider-thumb:hover {
  background: #357ABD;
}
.font-size-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4A90E2;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}
.font-size-slider::-moz-range-thumb:hover {
  background: #357ABD;
}

.formatting-buttons {
  display: flex;
  gap: 4px;
}

.format-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: inherit;
}
.format-btn:hover {
  background: #f5f5f5;
  border-color: #bbb;
}
.format-btn.active {
  background: #4A90E2;
  border-color: #4A90E2;
  color: #000;
}
.format-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.alignment-buttons {
  display: flex;
  gap: 4px;
}

.align-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: inherit;
}
.align-btn:hover {
  background: #f5f5f5;
  border-color: #bbb;
}
.align-btn.active {
  background: #4A90E2;
  border-color: #4A90E2;
  color: #000;
}
.align-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}
.align-btn svg {
  width: 16px;
  height: 16px;
}

input[type=color] {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type=color]::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}
input[type=color]::-moz-color-swatch {
  border: none;
  border-radius: 3px;
}

.control-group button[type=button] {
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.control-group button[type=button]:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.property-transforms {
  padding: 14px 0px 14px 0px;
}
.property-transforms h3 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.icon-grid {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.icon-grid .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-height: 40px;
  flex: 1;
  min-width: 40px;
  transition: all 0.2s ease;
}
.icon-grid .button:hover {
  background: #f5f5f5;
}
.icon-grid .button.locked {
  background: #FFE5E5;
  border-color: #FF9999;
  color: #CC0000;
}

@media (max-width: 768px) {
  .text-controls-section {
    padding: 12px;
  }
  .formatting-buttons,
  .alignment-buttons {
    gap: 2px;
  }
  .format-btn,
  .align-btn {
    padding: 6px 8px;
    min-width: 32px;
  }
  .icon-grid {
    gap: 6px;
  }
  .icon-grid .button {
    padding: 6px;
    min-height: 36px;
  }
}
.text-input:focus,
.font-select:focus {
  border-color: #4A90E2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.text-controls-section * {
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.control-group.loading {
  opacity: 0.6;
  pointer-events: none;
}
.control-group.success .text-input,
.control-group.success .font-select {
  border-color: #4CAF50;
}
.control-group.error .text-input,
.control-group.error .font-select {
  border-color: #F44336;
}

.text-atributes {
  display: flex;
  justify-content: space-between;
}

.font-selector-container {
  margin-bottom: 20px;
}

@media screen and (max-width: 768px) {
  .properties-panel {
    top: 55% !important;
  }
  .properties-panel .text-controls-section {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 10px;
  }
  .properties-panel .font-select {
    border-radius: 8px !important;
  }
  .properties-panel .text-atributes {
    width: 40% !important;
    display: flex;
    flex-direction: column;
  }
  .properties-panel .quick-color-palette {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .properties-panel .control-group {
    width: 48% !important;
  }
  .properties-panel .control-group textarea {
    height: 20px !important;
    min-height: 100px !important;
  }
}
/* Design Color Palette Component Styles */
.design-color-palette {
  margin-bottom: 20px;
}

.design-color-palette .color-palette-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.design-color-palette .color-palette-subtitle {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  font-style: italic;
}

.design-color-palette .replacement-title {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e1e1e1;
}

.color-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
  gap: 6px;
}

/* Image Color Mode Specific Styles */
.color-palette-grid.extracted-colors {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
}

.color-palette-grid.replacement-colors {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
  }
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid #e1e1e1;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Text inside color swatch */
.color-swatch .color-hex {
  font-size: 7px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.color-swatch .replace-icon {
  position: absolute;
  top: 1px;
  right: 1px;
  font-size: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Base hover state */
.color-swatch:hover {
  transform: scale(1.05);
}

.color-swatch:hover .color-hex {
  opacity: 1;
}

/* Selected state */
.color-swatch.selected {
  border-width: 3px;
}

.color-swatch.selected .color-hex {
  opacity: 1;
}

/* Applying animation */
.color-swatch.applying {
  animation: pulse 0.3s ease;
}

/* Extracted color specific styling */
.color-swatch.extracted-color {
  border-style: dashed;
}

.color-swatch.extracted-color:hover {
  border-color: #28a745;
  transform: scale(1.1);
  box-shadow: 0 2px 12px rgba(40, 167, 69, 0.3);
}

.color-swatch.extracted-color.selected {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.color-swatch.extracted-color.selected .replace-icon {
  opacity: 1;
}

/* Replacement color specific styling */
.color-swatch.replacement-color:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.color-swatch.replacement-color.selected {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
/* Custom color inputs section */
.color-input-section {
  border-top: 1px solid #e1e1e1;
  padding-top: 16px;
  margin-top: 16px;
}

.color-input-section .color-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.color-input-section .color-input-group label {
  font-size: 12px;
  color: #666;
  min-width: 80px;
  font-weight: 500;
}

.color-input-section .custom-color-input {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.color-input-section .custom-color-hex {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
}

.color-input-section .custom-color-hex:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Inline Color Palette Styles for ImageColorPicker */
.inline-color-palette {
  position: absolute !important;
  background: white;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

/* Ensure image color picker labels have relative positioning */
.image-color-picker label {
  position: relative;
}

/* Ensure consistent border-radius for image color picker swatches */
.image-color-picker span[role=img] {
  border-radius: 15% !important;
}

/* Style inline palette color swatches to match design palette */
.inline-color-palette .color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid #e1e1e1;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.inline-color-palette .color-swatch:hover {
  transform: scale(1.05);
  border-color: #007bff;
}

.inline-color-palette .color-swatch .color-hex {
  font-size: 7px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.inline-color-palette .color-swatch:hover .color-hex {
  opacity: 1;
}

/* Grid layout for inline palette */
.inline-color-palette .color-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

/* Title styling */
.inline-color-palette .palette-title {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 500;
}

/* Enhanced inline replacement colors styles */
#inline-replacement-colors {
  border-top: 1px solid #e1e1e1;
  padding-top: 16px;
  animation: slideDown 0.3s ease;
}

#inline-replacement-colors .replacement-title {
  margin-top: 0;
  margin-bottom: 12px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

/* Enhanced extracted color selection feedback */
.extracted-color {
  position: relative;
  transition: all 0.2s ease;
}

.extracted-color:hover {
  transform: scale(1.05);
  border-color: #007bff !important;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.extracted-color.selected {
  border-color: #007bff !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
  transform: scale(1.05);
}

.extracted-color.selected .replace-icon {
  opacity: 1;
  color: #007bff;
}

/* Replacement color hover and selection states */
.replacement-color {
  position: relative;
  transition: all 0.2s ease;
}

.replacement-color:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
  transform: scale(1.05);
}

.replacement-color.selected {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* Smooth transitions for inline replacement container */
#inline-replacement-colors .color-palette-grid {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Bottom Color Replacement Container Styles - DISABLED */
/* These styles are disabled in favor of inline containers */
.bottom-palette-grid,
.bottom-replacement-grid {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}

.bottom-palette-grid {
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
}

.bottom-replacement-grid {
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
}

.bottom-color-swatch,
.bottom-replacement-swatch {
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid #e1e1e1;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.bottom-color-swatch:hover,
.bottom-replacement-swatch:hover {
  transform: scale(1.1);
  border-color: #007bff;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
.bottom-color-swatch .color-name,
.bottom-replacement-swatch .color-name {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #666;
  white-space: nowrap;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.bottom-color-swatch {
  width: 40px;
  height: 40px;
}
.bottom-color-swatch .color-name {
  bottom: -20px;
  font-size: 10px;
  max-width: 60px;
}

.bottom-replacement-swatch {
  width: 50px;
  height: 50px;
}

/* Success feedback animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Enhanced mobile responsiveness for bottom containers */
@media (max-width: 768px) {
  .image-color-replacement-container,
  .design-color-replacement-container {
    padding: 16px !important;
    max-height: 200px !important;
  }
  .bottom-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    gap: 8px;
  }
  .bottom-replacement-grid {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 10px;
  }
  .bottom-color-swatch {
    width: 35px;
    height: 35px;
  }
  .bottom-replacement-swatch {
    width: 45px;
    height: 45px;
  }
  .color-name {
    font-size: 9px !important;
    max-width: 50px !important;
  }
}
@media (max-width: 480px) {
  .image-color-replacement-container,
  .design-color-replacement-container {
    padding: 12px !important;
    max-height: 180px !important;
  }
  .bottom-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 6px;
  }
  .bottom-replacement-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
  }
  .bottom-color-swatch {
    width: 32px;
    height: 32px;
  }
  .bottom-replacement-swatch {
    width: 40px;
    height: 40px;
  }
}
/* Responsive adjustments */
@media (min-width: 1200px) {
  .color-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
    gap: 5px;
  }
  .color-swatch {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 768px) {
  .color-palette-grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
  }
  .color-swatch {
    width: 24px;
    height: 24px;
  }
  .color-input-section .color-input-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .color-input-section .color-input-group label {
    min-width: auto;
  }
}
/* Compact Color Replacement Container Styles */
.image-color-replacement-container {
  background: #f8f9fa !important;
  border: 1px solid #e1e1e1 !important;
  border-radius: 4px !important;
  padding: 6px !important;
  margin-top: 6px !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.image-color-replacement-container .header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 4px !important;
  padding-bottom: 2px !important;
  border-bottom: 1px solid #dee2e6 !important;
}

.image-color-replacement-container .title {
  font-size: 10px !important;
  color: #666 !important;
  font-weight: 500 !important;
}

.image-color-replacement-container .close-button {
  background: none !important;
  border: none !important;
  font-size: 14px !important;
  color: #999 !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 14px !important;
  height: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.image-color-replacement-container .close-button:hover {
  background: #e9ecef !important;
  color: #666 !important;
}

.image-color-replacement-container .color-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(20px, 1fr)) !important;
  gap: 3px !important;
  padding: 3px 0 !important;
}

.image-color-replacement-container .compact-color-swatch {
  width: 20px !important;
  height: 20px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  border: 1px solid #ccc !important;
  transition: all 0.2s ease !important;
  display: block !important;
}

.image-color-replacement-container .compact-color-swatch:hover {
  transform: scale(1.3) !important;
  border-color: #007bff !important;
  z-index: 10 !important;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3) !important;
}

/* Compact Color Replacement Container for DesignColorPalette */
.design-color-replacement-container-compact {
  background: #f8f9fa !important;
  border: 1px solid #e1e1e1 !important;
  border-radius: 4px !important;
  padding: 6px !important;
  margin-top: 8px !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.design-color-replacement-container-compact .header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 4px !important;
  padding-bottom: 2px !important;
  border-bottom: 1px solid #dee2e6 !important;
}

.design-color-replacement-container-compact .title {
  font-size: 10px !important;
  color: #666 !important;
  font-weight: 500 !important;
}

.design-color-replacement-container-compact .close-button {
  background: none !important;
  border: none !important;
  font-size: 14px !important;
  color: #999 !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 14px !important;
  height: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
}

.design-color-replacement-container-compact .close-button:hover {
  background: #e9ecef !important;
  color: #666 !important;
}

.design-color-replacement-container-compact .color-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(20px, 1fr)) !important;
  gap: 3px !important;
  padding: 3px 0 !important;
}

.design-color-replacement-container-compact .compact-color-swatch {
  width: 20px !important;
  height: 20px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  border: 1px solid #ccc !important;
  transition: all 0.2s ease !important;
  display: block !important;
}

.design-color-replacement-container-compact .compact-color-swatch:hover {
  transform: scale(1.3) !important;
  border-color: #007bff !important;
  z-index: 10 !important;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3) !important;
}

/* Bottom replacement container for DesignColorPalette */
.design-color-replacement-container {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: white !important;
  border-top: 2px solid #e1e1e1 !important;
  padding: 20px !important;
  z-index: 10000 !important;
  transform: translateY(100%) !important;
  transition: transform 0.3s ease !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15) !important;
  max-height: 250px !important;
  overflow-y: auto !important;
}

.bottom-replacement-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)) !important;
  gap: 12px !important;
  padding: 8px 0 !important;
}

.bottom-replacement-swatch {
  width: 50px !important;
  height: 50px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  border: 3px solid #e1e1e1 !important;
  position: relative !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.bottom-replacement-swatch:hover {
  transform: scale(1.1) !important;
  border-color: #007bff !important;
  z-index: 1001 !important;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.bottom-replacement-swatch .color-name {
  position: absolute !important;
  bottom: -24px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 11px !important;
  color: #666 !important;
  white-space: nowrap !important;
  max-width: 70px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
}

.design-color-replacement-container-compact {
  max-height: 150px !important;
}

.design-library-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.design-library-modal.show {
  display: flex;
}

.design-library-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.design-library-content {
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.design-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
}
.design-library-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #212529;
}

.library-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.library-close-btn:hover {
  background: #f8f9fa;
  color: #495057;
}

.design-library-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.library-controls {
  border-bottom: 1px solid #e9ecef;
}
.library-controls #library-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}
.library-controls #library-search:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}
.library-controls #library-search::placeholder {
  color: #6c757d;
}

.library-designs-grid {
  flex: 1;
  padding: 0px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}
.library-designs-grid .library-loading,
.library-designs-grid .library-empty,
.library-designs-grid .library-error {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
  font-size: 14px;
}
.library-designs-grid .library-error {
  color: #dc3545;
}

.library-design-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
}
.library-design-item:hover {
  border-color: #0d6efd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.library-design-preview {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
  background: #f8f9fa;
}
.library-design-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.library-design-item:hover .library-design-preview img {
  transform: scale(1.05);
}

.library-design-info {
  padding: 4px;
  text-align: center;
}
.library-design-info .library-design-name {
  font-weight: 600;
  font-size: 14px;
  color: #212529;
  margin-bottom: 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-design-info .library-design-details {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 2px;
}
.library-design-info .library-design-order {
  font-size: 11px;
  color: #868e96;
}

.library-design-actions {
  padding: 0 12px 12px;
}
.library-design-actions .library-use-btn {
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  background: #0d6efd;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.library-design-actions .library-use-btn:hover {
  background: #0b5ed7;
}
.library-design-actions .library-use-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.library-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid #e9ecef;
}
.library-pagination .library-nav-btn {
  padding: 8px 16px;
  font-size: 14px;
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #ced4da;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.library-pagination .library-nav-btn:hover:not(:disabled) {
  background: #e9ecef;
  border-color: #adb5bd;
}
.library-pagination .library-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.library-pagination .library-page-info {
  font-size: 14px;
  color: #495057;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

@media (max-width: 768px) {
  .design-library-modal {
    padding: 10px;
  }
  .design-library-content {
    max-height: 90vh;
  }
  .design-library-header {
    padding: 16px 20px;
  }
  .design-library-header h3 {
    font-size: 16px;
  }
  .library-controls {
    padding: 12px 20px;
  }
  .library-designs-grid {
    padding: 16px 20px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
  .library-design-preview {
    height: 140px;
  }
  .library-pagination {
    padding: 12px 20px;
    gap: 12px;
  }
}
@media (max-width: 480px) {
  .library-designs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .library-design-preview {
    height: 120px;
  }
}
.login-library-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999999 !important;
}
.login-library-modal .login-library-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.login-library-modal .login-library-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  z-index: 100000000 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.login-library-modal .login-library-content .login-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.login-library-modal .login-library-content .login-close-btn:hover {
  background: #f0f0f0;
  color: #000;
}
.login-library-modal .login-library-content h2 {
  margin: 0 0 20px 0;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}
.login-library-modal .login-library-content form .form-group {
  margin-bottom: 15px;
}
.login-library-modal .login-library-content form .form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
.login-library-modal .login-library-content form .form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}
.login-library-modal .login-library-content form .form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.login-library-modal .login-library-content form button[type=submit] {
  width: 100%;
  padding: 12px;
  background: #000;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.login-library-modal .login-library-content form button[type=submit]:hover {
  background: #333;
  transform: translateY(-1px);
}
.login-library-modal .login-library-content form button[type=submit]:active {
  transform: translateY(0);
}
.login-library-modal .login-library-content .login-error {
  display: none;
  color: #dc3545;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  padding: 10px;
  background: #fff5f5;
  border-radius: 4px;
  border: 1px solid #ffc9c9;
}
.login-library-modal .login-library-content .login-error.show {
  display: block;
}
.login-library-modal.show, .login-library-modal[style*="display: block"] {
  display: block !important;
}
.login-library-modal.fade-in {
  animation: loginModalFadeIn 0.3s ease-out;
}
.login-library-modal.fade-in .login-library-content {
  animation: loginModalContentFadeIn 0.3s ease-out;
}

@keyframes loginModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes loginModalContentFadeIn {
  from {
    transform: translate(-50%, -45%);
  }
  to {
    transform: translate(-50%, -50%);
  }
}
@media (max-width: 480px) {
  .login-library-modal .login-library-content {
    width: 95%;
    padding: 30px 20px;
  }
  .login-library-modal .login-library-content h2 {
    font-size: 20px;
  }
  .login-library-modal .login-library-content .login-close-btn {
    top: 10px;
    right: 10px;
  }
}
.work-area-info-panel {
  position: absolute;
  top: 300px;
  right: -48%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  font-size: 12px;
  z-index: 100;
  max-width: 250px;
  backdrop-filter: blur(4px);
}
.work-area-info-panel h4 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}
.work-area-info-panel .area-item {
  display: flex;
  align-items: center;
  margin: 4px 0;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.work-area-info-panel .area-item:hover {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  transform: translateX(2px);
}
.work-area-info-panel .color-indicator {
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.work-area-info-panel .area-text {
  color: #333;
  font-weight: 500;
}
@media (max-width: 768px) {
  .work-area-info-panel {
    position: relative;
    top: auto;
    left: auto;
    margin: 10px;
    max-width: none;
  }
}

.canvas-container .work-area-highlight {
  animation: workAreaPulse 1s ease-in-out;
}

@keyframes workAreaPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}
@media screen and (max-width: 480px) {
  .work-area-info-panel {
    padding: 3px !important;
    display: flex;
    max-width: 400px !important;
    width: 25% !important;
    left: 0px !important;
    top: 0px !important;
    flex-direction: column;
    position: relative;
  }
  .work-area-info-panel div {
    flex-direction: column;
    text-align: center;
  }
  .work-area-info-panel h4 {
    display: none;
  }
  .work-area-info-panel .area-item {
    padding: 4px;
  }
  .work-area-info-panel span {
    font-size: 11px;
  }
  .work-area-info-panel .color-indicator {
    width: 10px;
    height: 10px;
    margin-right: 6px;
  }
  .canvas-view-badge {
    top: 90% !important;
  }
}
@keyframes native-variants-spin {
  to {
    transform: rotate(360deg);
  }
}
.design-modal .native-variants-panel {
  width: 30%;
  max-width: 30%;
  min-width: 320px;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.design-modal .native-variants-panel .native-variants-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.design-modal .native-variants-panel .native-variants-container .variants-header {
  padding: 20px 20px 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.design-modal .native-variants-panel .native-variants-container .variants-header p.infinite-swatches-heading {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #718096;
}
.design-modal .native-variants-panel .native-variants-container .variants-content {
  padding: 20px;
  flex: 1;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .infinite-swatches-heading,
.design-modal .native-variants-panel .native-variants-container .variants-content .variants-heading {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #718096;
  margin-bottom: 10px;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section {
  margin-bottom: 24px;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .color-swatch,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .infinite-swatch,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .color-swatch,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .infinite-swatch {
  width: 44px;
  height: 44px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #718096;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  background-size: cover;
  background-position: center;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .color-swatch:hover,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .infinite-swatch:hover,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .color-swatch:hover,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .infinite-swatch:hover {
  border-color: #00599c;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 89, 156, 0.2);
}
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .color-swatch[data-selected=true], .design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .color-swatch.selected,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .infinite-swatch[data-selected=true],
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .infinite-swatch.selected,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .color-swatch[data-selected=true],
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .color-swatch.selected,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .infinite-swatch[data-selected=true],
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .infinite-swatch.selected {
  border-color: #00599c;
  box-shadow: 0 0 0 3px rgba(0, 89, 156, 0.2);
  transform: scale(1.05);
}
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .color-swatch .swatch-color-name,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .color-swatches-grid .infinite-swatch .swatch-color-name,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .color-swatch .swatch-color-name,
.design-modal .native-variants-panel .native-variants-container .variants-content .color-selection-section .infinite-swatches-container .infinite-swatch .swatch-color-name {
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  padding: 2px;
  word-break: break-word;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  background: #ffffff;
  min-height: 0;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option.available:hover {
  border-color: #00599c;
  box-shadow: 0 2px 8px rgba(0, 89, 156, 0.12);
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option.selected {
  border-color: #00599c;
  background: #ebf4ff;
  box-shadow: 0 0 0 2px rgba(0, 89, 156, 0.2);
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option.unavailable {
  opacity: 0.55;
  background: #f8fafc;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-title {
  font-size: 13px;
  font-weight: 700;
  color: #1a202c;
  line-height: 1;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-price {
  font-size: 11px;
  font-weight: 600;
  color: #00599c;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-stock span {
  font-size: 10px;
  font-weight: 500;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-stock span.stock-out {
  color: #e53e3e;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-stock span.stock-low {
  color: #dd6b20;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-stock span.stock-high, .design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-stock span.stock-available {
  color: #38a169;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .variant-stock span.stock-backorder {
  color: #dd6b20;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .quantity-controls {
  width: 100%;
  margin-top: 4px;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .quantity-controls input[type=number] {
  width: 100%;
  padding: 5px 4px;
  border: 1.5px solid #e2e8f0;
  border-radius: 5px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -moz-appearance: textfield;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .quantity-controls input[type=number]::-webkit-inner-spin-button, .design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .quantity-controls input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .quantity-controls input[type=number]:focus {
  outline: none;
  border-color: #00599c;
  box-shadow: 0 0 0 2px rgba(0, 89, 156, 0.15);
}
.design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list .variant-option .quantity-controls input[type=number]:disabled {
  background: #f8fafc;
  color: #718096;
  cursor: not-allowed;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary {
  margin: 0 20px 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  max-height: 180px;
  overflow-y: auto;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content {
  color: #718096;
  font-size: 13px;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content strong {
  color: #1a202c;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .color-group {
  margin-bottom: 8px;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .color-group strong {
  font-size: 13px;
  font-weight: 700;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .item-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .item-line span:last-child {
  color: #00599c;
  font-weight: 700;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .delete-variant-btn {
  background: none;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1;
  transition: background 0.15s ease;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .delete-variant-btn:hover {
  background: #fff5f5;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .total-line {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .total-line strong:first-child {
  color: #1a202c;
  font-size: 14px;
}
.design-modal .native-variants-panel .native-variants-container .selection-summary .summary-content .total-line strong:last-child {
  color: #00599c;
  font-size: 17px;
  font-weight: 800;
}
.design-modal .native-variants-panel .native-variants-container .variants-actions {
  padding: 16px 20px 20px;
  border-top: 1px solid #e2e8f0;
}
.design-modal .native-variants-panel .native-variants-container .variants-actions .infinite-swatches-heading,
.design-modal .native-variants-panel .native-variants-container .variants-actions p.infinite-swatches-heading {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #718096;
  text-align: center;
}
.design-modal .native-variants-panel .native-variants-container .variants-actions .add-to-cart-btn {
  width: 100%;
  padding: 12px 20px;
  background: #00599c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.design-modal .native-variants-panel .native-variants-container .variants-actions .add-to-cart-btn:hover:not(:disabled) {
  background: #004273;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 89, 156, 0.35);
}
.design-modal .native-variants-panel .native-variants-container .variants-actions .add-to-cart-btn:disabled {
  background: #a0aec0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.design-modal .native-variants-panel .native-variants-container .variants-actions div {
  margin-top: 12px;
  font-size: 13px;
  color: #718096;
  text-align: center;
}
.design-modal .native-variants-panel .native-variants-container .variants-actions div.success {
  color: #38a169;
  font-weight: 600;
}
.design-modal .native-variants-panel .native-variants-container .variants-loading {
  padding: 40px 20px;
  text-align: center;
  color: #718096;
  font-size: 15px;
}
.design-modal .native-variants-panel .native-variants-container .variants-loading::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #e2e8f0;
  border-top-color: #00599c;
  border-radius: 50%;
  animation: native-variants-spin 0.75s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}
.design-modal .native-variants-panel .native-variants-container .variants-error {
  padding: 30px 20px;
  text-align: center;
}
.design-modal .native-variants-panel .native-variants-container .variants-error h3 {
  color: #e53e3e;
  margin-bottom: 10px;
}
.design-modal .native-variants-panel .native-variants-container .variants-error p {
  color: #718096;
  font-size: 13px;
  margin-bottom: 20px;
}
.design-modal .native-variants-panel .native-variants-container .variants-error .button {
  background: #718096;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  transition: background 0.2s ease;
}
.design-modal .native-variants-panel .native-variants-container .variants-error .button:hover {
  background: #5a677a;
}

@media (max-width: 768px) {
  .design-modal .native-variants-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    border-left: none;
    border-top: 1px solid #e2e8f0;
  }
  .design-modal .native-variants-panel .native-variants-container .variants-content .sizes-selection-section .sizes-container .color-sizes-group .variants-list {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }
}
@media (max-width: 480px) {
  .design-modal .native-variants-panel .native-variants-container .variants-content {
    padding: 14px;
  }
  .design-modal .native-variants-panel .native-variants-container .selection-summary {
    margin: 0 14px 14px;
  }
  .design-modal .native-variants-panel .native-variants-container .variants-actions {
    padding: 14px;
  }
}
.checkout-prompt-modal {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 175ms linear;
  padding: var(--gutter-large);
}
.checkout-prompt-modal.checkout-prompt-visible {
  opacity: 1;
  visibility: visible;
}
.checkout-prompt-modal .button--icon-left .button__icon {
  left: 14px !important;
}

.checkout-prompt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

.checkout-prompt-content {
  position: relative;
  top: 0;
  background: var(--color-background-main);
  color: var(--color-text-main);
  border-radius: var(--border-radius-widgets);
  padding: calc(var(--gutter-large) * 0.4) calc(var(--gutter-large) * 0.75) calc(var(--gutter-large) * 0.6);
  transform: translateY(50px);
  opacity: 0;
  visibility: hidden;
  transition: all 300ms linear 50ms;
  z-index: 9;
  overflow-y: auto;
  max-height: calc(100vh - var(--gutter-large) * 2);
  max-width: 480px;
  width: 100%;
  pointer-events: none;
}
.checkout-prompt-modal.checkout-prompt-visible .checkout-prompt-content {
  pointer-events: all;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.checkout-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: calc(var(--gutter-large) * 0.3);
}
.checkout-prompt-header h3 {
  margin: 0;
  font-family: var(--font-stack-headings-primary);
  font-weight: var(--font-weight-headings-primary);
  font-style: var(--font-style-headings-primary);
  line-height: var(--base-headings-line);
  color: var(--color-text-main);
}

.checkout-prompt-close {
  cursor: pointer;
  width: 2.75rem;
  height: 2.75rem;
  margin-inline-end: -0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-main);
  transition: all 175ms linear;
}
.checkout-prompt-close:hover {
  background: var(--color-secondary-background-main);
}
.checkout-prompt-close:focus {
  outline: 3px solid var(--color-secondary-background-main);
}
.checkout-prompt-close path {
  stroke: var(--color-text-main);
}

.checkout-prompt-body {
  text-align: center;
}
.checkout-prompt-body p {
  margin: 0 0 1rem;
  color: var(--color-secondary-text-main);
  line-height: 1.5;
  font-family: var(--font-stack-body-primary);
  font-size: inherit;
}

.checkout-prompt-icon {
  background: var(--color-success, #22c55e);
  color: var(--color-foreground-main);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  animation: checkout-prompt-pulse 2s infinite;
}
.checkout-prompt-icon svg {
  width: 20px;
  height: 15px;
}

.checkout-prompt-question {
  font-weight: var(--font-weight-body-primary-bold);
  color: var(--color-text-main) !important;
  font-size: calc(1.125px * var(--base-body-primary-size) + 0px);
  margin-top: 1rem !important;
}

.checkout-prompt-actions {
  margin-top: 1.875rem;
  display: flex;
  gap: 0.75rem;
  flex-direction: column;
}
@media (min-width: 480px) {
  .checkout-prompt-actions {
    flex-direction: row;
  }
}
.checkout-prompt-actions .button {
  flex: 1;
}
.checkout-prompt-actions .button.button--icon-left .button__icon {
  order: -1;
}

body.checkout-prompt-open {
  overflow: hidden;
}

@media screen and (max-width: 767px) {
  .checkout-prompt-modal {
    height: var(--window-height);
    padding: 0;
  }
  .checkout-prompt-modal > div {
    padding: 0;
    height: 100%;
  }
  .checkout-prompt-content {
    max-height: none;
    height: 100%;
    max-width: none;
    width: 100%;
    border-radius: 0;
    padding: var(--gutter-container);
  }
  .checkout-prompt-icon {
    width: 56px;
    height: 56px;
  }
  .checkout-prompt-icon svg {
    width: 40px;
    height: 40px;
  }
}
@media screen and (max-width: 768px) and (min-width: 768px) {
  .checkout-prompt-content {
    padding: calc(var(--gutter-large) * 0.75);
  }
}
@keyframes checkout-prompt-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes checkout-prompt-fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes checkout-prompt-fadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}
.checkout-prompt-loading .checkout-prompt-btn {
  position: relative;
  pointer-events: none;
}
.checkout-prompt-loading .checkout-prompt-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: checkout-prompt-spin 1s linear infinite;
}
.checkout-prompt-loading .checkout-prompt-btn.checkout-prompt-btn--primary::after {
  border-top-color: var(--color-foreground-main);
}
.checkout-prompt-loading .checkout-prompt-btn.checkout-prompt-btn--secondary::after {
  border-top-color: var(--color-text-main);
}

@keyframes checkout-prompt-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@media (prefers-contrast: high) {
  .checkout-prompt-content {
    border: 2px solid var(--color-text-main);
  }
  .checkout-prompt-btn {
    border: 2px solid currentColor;
  }
}
@media (prefers-reduced-motion: reduce) {
  .checkout-prompt-modal,
  .checkout-prompt-content,
  .checkout-prompt-btn {
    transition: none;
  }
  .checkout-prompt-icon {
    animation: none;
  }
  @keyframes checkout-prompt-pulse {
    0%, 100% {
      transform: scale(1);
    }
  }
}
@media (prefers-contrast: high) {
  .checkout-prompt-content {
    border: 2px solid currentColor;
  }
  .checkout-prompt-btn {
    border: 2px solid currentColor;
  }
}
/* ========================================
   Toolbar Dual-Column Layout Styles
   ======================================== */
.toolbar-dual-container {
  display: flex;
  height: 100%;
  transition: all 0.3s ease;
  width: 100px;
}
.toolbar-dual-container.has-open-panel {
  width: 400px;
  padding-right: 12px;
}
.toolbar-dual-container.has-open-panel .toolbar-buttons-column {
  width: 90px;
}
.toolbar-dual-container.has-open-panel .toolbar-panels-column {
  flex: 1;
}

.toolbar-buttons-column {
  padding-top: 20px;
  flex-shrink: 0;
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #00599c;
}
.toolbar-buttons-column .button--regular {
  gap: 0px;
  padding: 5px;
  background: #00599c;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}
.toolbar-buttons-column .button--regular svg {
  width: 60%;
  transition: all 0.3s ease;
}
.toolbar-buttons-column .button--regular h3 {
  color: #fff !important;
  transition: all 0.3s ease;
  margin-bottom: 0;
}
.toolbar-buttons-column .button--regular.active {
  transform: scale(1.1);
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 5;
}
.toolbar-buttons-column .button--regular.active svg {
  width: 50%;
}
.toolbar-buttons-column .button--regular.active svg path {
  fill: #00599c !important;
}
.toolbar-buttons-column .button--regular.active h3 {
  color: #00599c !important;
  font-weight: 700 !important;
  font-size: 12px;
}
.toolbar-buttons-column .button--regular:hover:not(.active):not(.disabled) {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.1) !important;
}
.toolbar-buttons-column .button--regular.disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
}
.toolbar-buttons-column .button--regular.disabled:hover {
  transform: none !important;
  background: #00599c !important;
}
.toolbar-buttons-column .button--regular.disabled svg path {
  fill: rgba(255, 255, 255, 0.5) !important;
}
.toolbar-buttons-column .button--regular.disabled h3 {
  color: rgba(255, 255, 255, 0.5) !important;
}

.toolbar-panels-column {
  flex: 0.5;
}
.toolbar-panels-column .panel-option-btn {
  display: flex;
  align-items: center;
}

.toolbar-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  transform-origin: left center;
  opacity: 0;
  animation: fadeInPanel 0.2s ease forwards;
}
.toolbar-panel.active {
  border-color: #00599c;
  box-shadow: 0 4px 12px rgba(0, 89, 156, 0.15);
  background: #ffffff;
  z-index: 10;
  position: relative;
}
.toolbar-panel.active .panel-title {
  color: #00599c;
}
.toolbar-panel .panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
  transition: color 0.3s ease;
}
.toolbar-panel .panel-option-btn {
  width: 100%;
  margin-bottom: 8px;
  justify-content: flex-start;
  gap: 10px;
}
.toolbar-panel .panel-option-btn:last-of-type {
  margin-bottom: 0;
}
.toolbar-panel .panel-option-btn.button--outline {
  background: #ffffff;
}
.toolbar-panel .panel-option-btn svg {
  flex-shrink: 0;
}
.toolbar-panel .panel-option-btn span {
  font-size: 12px;
  font-weight: 500;
}

.ai-storage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 60vh;
  overflow-y: auto;
  justify-items: center;
}
.ai-storage-grid::-webkit-scrollbar {
  width: 8px;
}
.ai-storage-grid::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}
.ai-storage-grid::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.ai-storage-grid::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.ai-storage-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid #e9ecef;
  transition: all 0.2s ease;
  max-width: 100px;
}
.ai-storage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ai-storage-item:hover {
  transform: scale(1.05);
  border-color: #00599c;
  box-shadow: 0 4px 12px rgba(0, 89, 156, 0.3);
}

.ai-storage-loading,
.ai-storage-empty,
.ai-storage-error {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  font-size: 12px;
}

.ai-storage-loading {
  color: #666;
}

.ai-storage-empty {
  color: #999;
}

.ai-storage-error {
  color: #dc3545;
}

.ai-storage-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.ai-storage-nav-btn {
  padding: 6px 12px;
  background: #00599c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}
.ai-storage-nav-btn:hover:not(:disabled) {
  background: #003c69;
}
.ai-storage-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-storage-page-info {
  font-size: 12px;
  color: #666;
}

.library-designs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}
.library-designs-grid::-webkit-scrollbar {
  width: 8px;
}
.library-designs-grid::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}
.library-designs-grid::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.library-designs-grid::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.library-design-item {
  position: relative;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}
.library-design-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #00599c;
}

.library-design-preview {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f8f9fa;
  overflow: hidden;
}
.library-design-preview img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.library-design-actions {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: white;
  border-top: 1px solid #e9ecef;
}

.library-action-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.library-action-btn.use-btn {
  background: #00599c;
  color: white;
}
.library-action-btn.use-btn:hover {
  background: #003c69;
}
.library-action-btn.delete-btn {
  background: #dc3545;
  color: white;
}
.library-action-btn.delete-btn:hover {
  background: #bd2130;
}

.library-loading,
.library-empty,
.library-error {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  font-size: 12px;
}

.library-loading {
  color: #666;
}

.library-empty {
  color: #999;
}

.library-error {
  color: #dc3545;
}

.library-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.library-nav-btn {
  padding: 6px 12px;
  background: #00599c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}
.library-nav-btn:hover:not(:disabled) {
  background: #003c69;
}
.library-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.library-page-info {
  font-size: 12px;
  color: #666;
}

@keyframes fadeInPanel {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.toolbar-panels-column {
  animation: fadeInPanelContainer 0.2s ease forwards;
}

@keyframes fadeInPanelContainer {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media screen and (max-width: 760px) {
  .toolbar-dual-container {
    flex-direction: column;
    width: 100%;
  }
  .toolbar-dual-container h3 {
    display: none;
  }
  .toolbar-dual-container.has-open-panel {
    width: 400px;
    padding-right: 12px;
  }
  .toolbar-dual-container.has-open-panel .toolbar-buttons-column {
    width: 100%;
  }
  .toolbar-dual-container.has-open-panel .toolbar-panels-column {
    flex: 1;
  }
  .toolbar-buttons-column {
    padding-top: 5px;
    padding-bottom: 5px;
    width: 100%;
    flex-direction: row;
  }
  .toolbar-buttons-column .toolbar-section {
    width: 25%;
  }
  .toolbar-buttons-column .toolbar-section svg {
    width: 40%;
  }
}
.upload-history-section .history-grid {
  /* Scrollbar styling */
}
.upload-history-section .history-grid::-webkit-scrollbar {
  width: 6px;
}
.upload-history-section .history-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.upload-history-section .history-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}
.upload-history-section .history-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}
.upload-history-section .history-item {
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.upload-history-section .history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}
.upload-history-section .history-item:hover .history-remove-btn {
  opacity: 1;
}
.upload-history-section .history-item img {
  transition: opacity 0.2s;
}
.upload-history-section .history-item:active {
  transform: translateY(0);
}
.upload-history-section .history-remove-btn {
  transition: all 0.2s;
}
.upload-history-section .history-remove-btn:hover {
  background: rgba(255, 0, 0, 0.8) !important;
  transform: scale(1.1);
}
.upload-history-section .history-remove-btn:active {
  transform: scale(0.95);
}

.view-selector {
  position: absolute;
  z-index: 1;
  right: 1%;
  top: 40%;
}
.view-selector .view-option {
  width: 90px !important;
}
.view-selector .view-option.active {
  border-color: #007bff !important;
  box-shadow: 0 0 0 1px #007bff;
}
.view-selector .view-option.active div {
  color: #007bff !important;
}
.view-selector .view-option:hover:not(.active) {
  border-color: #007bff !important;
  box-shadow: 0 0 0 1px #007bff;
}
.view-selector .view-option:hover:not(.active) div {
  color: #007bff !important;
}
.view-selector .view-option .view-preview {
  height: 70px;
}
.view-selector .view-option .view-preview.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
.view-selector .view-option .view-preview.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 11px;
}

.view-preview {
  height: 100px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@media screen and (max-width: 768px) {
  .view-selector div:first-child {
    flex-direction: column;
  }
  .view-selector .view-option {
    display: none;
  }
}
.desing-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.desing-options svg {
  width: 40%;
}
.desing-options .button--solid {
  background-color: white;
  fill: white;
  border: 2px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}
.desing-options .button--solid svg path {
  fill: #666;
}
.desing-options .button--solid:hover {
  border-color: #007bff !important;
  box-shadow: 0 0 0 1px #007bff;
}
.desing-options .button--solid:hover svg path {
  fill: #007bff !important;
}
.desing-options .button--solid:hover h3 {
  color: #007bff !important;
}
@media screen and (max-width: 760px) {
  .desing-options {
    grid-template-columns: repeat(5, 1fr);
    gap: 0px;
  }
  .desing-options h3 {
    display: none;
  }
  .desing-options .button--solid {
    padding: 10px 5px !important;
    background-color: #004080;
  }
  .desing-options h3 {
    color: #fff !important;
  }
  .desing-options svg {
    width: 55%;
  }
}

.pod-trigger-section {
  margin: 15px 0;
  text-align: center;
}

.btn-design-editor {
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  width: 100%;
  background: var(--button-background, #007bff) !important;
  border-color: var(--button-background, #007bff) !important;
  text-transform: uppercase;
}
.btn-design-editor:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-design-editor:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.btn-design-editor:hover:not(:disabled) {
  background: var(--button-background-hover, #0056b3) !important;
  border-color: var(--button-background-hover, #0056b3) !important;
}
.btn-design-editor:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-design-editor.button--loading .button__text {
  opacity: 0;
}
.btn-design-editor.button--loading .button__loader {
  opacity: 1;
}
.btn-design-editor .button__loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn-design-editor .button__loader .spinner {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.design-stepper {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  flex: 10;
}
@media (max-width: 768px) {
  .design-stepper {
    gap: 12px;
    padding: 0 10px;
    display: none;
  }
}

.stepper-step {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
  margin: 0px 20px;
}
.stepper-step.disabled {
  opacity: 0.5;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #adb5bd;
  color: white;
  transition: all 0.3s ease;
  flex-shrink: 0;
  font-family: "Alleyn Pro Bold", sans-serif;
  font-size: 20px;
}
.stepper-step.active .step-number {
  background: #00599c;
  box-shadow: 0 4px 12px rgba(0, 89, 156, 0.3);
}
.stepper-step.completed .step-number {
  background: #28a745;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: #adb5bd;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.stepper-step.active .step-title {
  color: #00599c;
}
.stepper-step.completed .step-title {
  color: #28a745;
}
@media (max-width: 768px) {
  .step-title {
    font-size: 11px;
  }
}

.step-underline {
  width: 100%;
  height: 3px;
  background: #adb5bd;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.stepper-step.active .step-underline {
  background: #00599c;
  box-shadow: 0 2px 8px rgba(0, 89, 156, 0.3);
}
.stepper-step.completed .step-underline {
  background: #28a745;
}

.stepper-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 16px;
  left: calc(100% + 12px);
  width: 24px;
  height: 2px;
  background: #adb5bd;
  transition: background 0.3s ease;
}
@media (max-width: 768px) {
  .stepper-step:not(:last-child)::after {
    width: 12px;
    left: calc(100% + 6px);
  }
}

.stepper-step.completed:not(:last-child)::after {
  background: #28a745;
}

/* AI Image Generator Editor Styles */
.ai-generator-editor {
  width: 100%;
  padding: 20px;
}

.generator-form {
  margin-bottom: 20px;
}

.ai-prompt-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.ai-prompt-input:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.ai-generate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.ai-generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-generate-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ai-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-generate-btn svg {
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
}
.ai-loading-container {
  text-align: center;
  padding: 30px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.ai-loader {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.ai-loading-text {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
.ai-message-container {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 15px;
  display: none;
}

.ai-message-info {
  background-color: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #1976d2;
}

.ai-message-success {
  background-color: #e8f5e9;
  color: #388e3c;
  border-left: 4px solid #388e3c;
}

.ai-message-error {
  background-color: #ffebee;
  color: #d32f2f;
  border-left: 4px solid #d32f2f;
}

.ai-results-container {
  margin-top: 20px;
}

.results-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

.ai-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 12px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

.ai-results-grid::-webkit-scrollbar {
  width: 8px;
}

.ai-results-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.ai-results-grid::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.ai-results-grid::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.ai-result-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.ai-result-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.ai-result-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.ai-use-btn {
  width: 100%;
  padding: 8px;
  background: #667eea;
  color: white;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.ai-use-btn:hover {
  background: #5568d3;
}

.ai-use-btn:active {
  background: #4a5bbd;
}

/* Preview Modal */
.ai-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  cursor: pointer;
}
.ai-preview-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-generator-editor {
    padding: 15px;
  }
  .ai-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
  }
  .ai-result-image {
    height: 120px;
  }
}
@keyframes blink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.8);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 4px rgba(40, 167, 69, 0.4);
  }
}
.chat-status-indicator {
  width: 8px;
  height: 8px;
  background-color: #28a745;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: blink 1.5s infinite;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.8);
}

.chat-response-time {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: #000;
}

.design-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
  z-index: 99999999 !important;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  height: 0 !important;
  /* Cuando esté visible */
}
.design-modal[style*=flex] {
  height: 100dvh !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}
@media screen and (max-width: 768px) {
  .design-modal[style*=flex] {
    height: 100dvh !important;
  }
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 30px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  z-index: 99999999;
  position: relative;
  align-items: center;
}
.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
}
.modal-header .modal-header__logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
}
.modal-header .modal-header__logo .logo {
  display: block;
  max-height: 57px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.modal-header .modal-header__logo .logo--light {
  display: none;
}
.modal-header .modal-header__logo .logo--dark {
  display: block;
}
[data-theme=light] .modal-header .modal-header__logo .logo--light {
  display: block;
}
[data-theme=light] .modal-header .modal-header__logo .logo--dark {
  display: none;
}
.modal-header .modal-header__logo .logo-img {
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .modal-header .modal-header__logo {
    justify-content: left;
  }
  .modal-header .modal-header__logo img {
    width: 50%;
    height: auto;
  }
}
.modal-header .modal-header__logo .logo-txt {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  font-family: var(--font-heading-family, inherit);
}
@media (max-width: 768px) {
  .modal-header .modal-header__logo .logo-txt {
    font-size: 16px;
  }
}
.modal-header .modal-close {
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: none;
  color: #666;
  font-size: 28px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer !important;
  pointer-events: auto;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.modal-header .modal-close:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.modal-header .modal-close:hover {
  background: #e9ecef;
  color: #333;
}
@media screen and (max-width: 768px) {
  .modal-header {
    padding: 20px 30px;
  }
}

.modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  z-index: 99999999;
  position: relative;
  justify-content: space-between;
}

.design-toolbar {
  width: auto;
  max-width: 500px;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000002;
  position: relative;
  transition: width 0.3s ease;
}
.design-toolbar .toolbar-section h3 {
  color: #333;
  font-size: 16px;
  font-weight: 600;
}
.design-toolbar .button {
  width: 100%;
  margin-bottom: 8px;
  cursor: pointer !important;
  pointer-events: auto;
}
.design-toolbar .button.button--small {
  padding: 6px 8px;
  font-size: 12px;
  margin: 2px;
  width: auto;
  cursor: pointer !important;
}
@media screen and (max-width: 760px) {
  .design-toolbar .button {
    margin-bottom: 0;
  }
}
.design-toolbar .control-row {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.design-toolbar .control-row .button {
  flex: 1;
  cursor: pointer !important;
}
.design-toolbar .property-control label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}
.design-toolbar .property-control input[type=range] {
  width: 100%;
  margin-bottom: 5px;
  accent-color: #00599c;
  cursor: pointer !important;
}
.design-toolbar .property-control span {
  font-size: 12px;
  color: #333;
  font-weight: 500;
}
.design-toolbar .property-info {
  background: #e9ecef;
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
}
.design-toolbar .property-info small {
  font-size: 11px;
  color: #666;
  line-height: 1.4;
}
.design-toolbar input[type=file] {
  cursor: pointer !important;
}

.canvas-workspace {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  position: relative;
  z-index: 100;
  overflow: hidden;
}
@media screen and (max-width: 768px) {
  .canvas-workspace {
    width: 100%;
    flex: 1;
  }
}
.canvas-workspace .canvas-display-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.canvas-workspace .canvas-container {
  position: relative !important;
}
.canvas-workspace #design-canvas {
  background: #ffffff;
  cursor: crosshair;
}
.canvas-workspace .canvas-with-rulers,
.canvas-workspace .front-canvas,
.canvas-workspace .back-canvas {
  border-radius: 8px;
  padding: 20px;
}
.canvas-workspace .drop-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(70, 170, 227, 0.1);
  border: 3px dashed #46aae3;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
}
.canvas-workspace .drop-indicator p {
  color: #46aae3;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.canvas-workspace.drag-over .drop-indicator {
  display: flex !important;
}
.canvas-workspace .canvas-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 5px;
  z-index: 10;
}
.canvas-workspace .canvas-controls .button {
  padding: 6px 8px;
  cursor: pointer !important;
  pointer-events: auto;
}
.canvas-workspace .rulers-container .horizontal-ruler,
.canvas-workspace .rulers-container .vertical-ruler {
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.canvas-workspace .rulers-container .ruler-corner {
  font-weight: 500;
}
.canvas-workspace .rulers-container .horizontal-indicator,
.canvas-workspace .rulers-container .vertical-indicator {
  box-shadow: 0 0 3px rgba(220, 53, 69, 0.3);
}
@media (max-width: 768px) {
  .canvas-workspace .rulers-container .horizontal-ruler,
  .canvas-workspace .rulers-container .vertical-ruler {
    font-size: 8px;
  }
  .canvas-workspace .rulers-container .ruler-corner {
    font-size: 8px;
  }
}

.canvas-loading-overlay {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 123% !important;
  background: rgba(255, 255, 255, 0.95) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  backdrop-filter: blur(2px);
}
.canvas-loading-overlay .loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #00599c;
  border-radius: 50%;
  animation: canvas-loading-spin 1s linear infinite;
  margin-bottom: 15px;
}
.canvas-loading-overlay .loading-message {
  font-size: 16px;
  color: #333;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
}

@keyframes canvas-loading-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.properties-panel {
  width: 20%;
  background: #f8f9fa;
  border-left: 1px solid #e9ecef;
  padding: 0;
  overflow-y: auto;
  z-index: 1000002;
  position: relative;
  padding: 15px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease 0.1s, padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), border 0.3s ease;
}
.properties-panel.no-selection {
  width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  display: none;
}
@media screen and (max-width: 768px) {
  .properties-panel.no-selection {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
.properties-panel h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}
.properties-panel .button {
  cursor: pointer !important;
  pointer-events: auto;
}
.properties-panel .button.locked {
  background-color: #ff6b6b !important;
  border-color: #ff6b6b !important;
  color: white !important;
}
.properties-panel .button.locked:hover {
  background-color: #ff5252 !important;
  border-color: #ff5252 !important;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  margin-top: 0px !important;
}
.modal-footer .footer-actions {
  margin-right: 4%;
}
.modal-footer .button {
  min-width: 120px;
}

@media (max-width: 768px) {
  .design-modal .modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  .footer-info {
    display: none;
  }
  .modal-body {
    flex-direction: column;
  }
  .design-toolbar,
  .properties-panel {
    width: 100%;
    height: auto;
    max-height: 150px;
    border: none;
    border-bottom: 1px solid #e9ecef;
    padding: 3px !important;
  }
  .design-toolbar p,
  .properties-panel p {
    display: none;
  }
  .canvas-workspace {
    flex: 1;
    min-height: 300px;
    width: 100% !important; /* Siempre 100% en móvil, sin importar selección */
  }
  .modal-header {
    padding: 15px 20px;
  }
  .modal-header h2 {
    font-size: 18px;
  }
  .modal-footer {
    padding: 15px 20px;
    flex-direction: row;
    gap: 10px;
  }
  .modal-footer .btn {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .design-toolbar {
    padding: 10px;
  }
  .design-toolbar .tool-btn {
    padding: 8px;
    font-size: 12px;
  }
  .design-toolbar .control-row {
    flex-wrap: wrap;
  }
  .canvas-workspace .canvas-display-area {
    padding: 10px;
  }
  #design-canvas {
    max-width: 100%;
    max-height: 100%;
  }
  .canvas-container {
    touch-action: manipulation;
  }
  canvas {
    touch-action: manipulation;
  }
}
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.tool-btn:focus,
.btn:focus {
  outline: 2px solid #00599c;
  outline-offset: 2px;
}

.property-control input[type=range]:focus {
  outline: 2px solid #00599c;
  outline-offset: 2px;
}

.work-area-controls {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.work-area-controls label {
  font-size: 11px;
  color: #666;
  margin: 0;
}
.work-area-controls .size-info {
  padding: 5px;
  background: #f8f9fa;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
  color: #666;
}
.work-area-controls select {
  background: white;
  background-repeat: no-repeat;
  cursor: pointer;
  border-width: 2px;
  border-color: #5da2cf !important;
  border-style: dashed !important;
  border-radius: 20px !important;
  background-color: rgba(93, 162, 207, 0.231372549);
  background-position: calc(100% - 1.5rem) center;
  background-size: 0.75rem 0.4375rem;
  padding: var(--input-padding) 3.3125rem var(--input-padding) 1rem;
  width: 100%;
  cursor: pointer;
  transition: border 100ms linear;
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
}

.canvas-work-area {
  pointer-events: none;
  z-index: 1;
}

.work-area-info {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  z-index: 10;
  pointer-events: none;
}
.work-area-info.hidden {
  display: none;
}

.toolbar-section {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left center;
}
.toolbar-section.active {
  transform: scale(1.1);
  z-index: 10;
}
.toolbar-section.active .button {
  border-color: #00599c !important;
  box-shadow: 0 2px 8px rgba(0, 89, 156, 0.1);
  background-color: #f8f9fa;
  padding: 10px 0;
}
.toolbar-section.active .button svg path {
  fill: #00599c !important;
}
.toolbar-section.active h3 {
  color: #00599c !important;
  margin-bottom: 0.1rem;
}
.toolbar-section .work-area-controls {
  margin-top: 10px;
}
.toolbar-section .work-area-controls .button {
  width: 100%;
}

[x-cloak] {
  display: none !important;
}

.dual-canvas-wrapper .back-canvas {
  display: none !important;
}
.dual-canvas-wrapper .front-canvas {
  display: flex !important;
}
.dual-canvas-wrapper[x-cloak] .back-canvas {
  display: none !important;
}
.dual-canvas-wrapper[x-cloak] .front-canvas {
  display: flex !important;
}
.dual-canvas-wrapper .front-canvas[style*="display: none"] {
  display: none !important;
}
.dual-canvas-wrapper .back-canvas[style*="display: none"] {
  display: none !important;
}
.dual-canvas-wrapper .front-canvas:not([style*="display: none"]) {
  display: flex !important;
}
.dual-canvas-wrapper .back-canvas:not([style*="display: none"]) {
  display: flex !important;
}

.modal-body {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-body .design-toolbar,
.modal-body .properties-panel {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  opacity: 1;
}
.modal-body .canvas-workspace {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-body .native-variants-panel {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-body .native-variants-panel.panel-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-body.variants-mode .design-toolbar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.modal-body.variants-mode .properties-panel {
  width: 0;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}
.modal-body.variants-mode .canvas-workspace {
  width: 65%;
}
.modal-body.variants-mode .canvas-workspace .canvas-container {
  width: 100%;
  max-width: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-body.variants-mode .canvas-workspace .front-canvas,
.modal-body.variants-mode .canvas-workspace .back-canvas {
  justify-content: center;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-body.variants-mode .canvas-controls button[disabled],
.modal-body.variants-mode .zoom-controls button[disabled],
.modal-body.variants-mode .view-switcher button[disabled] {
  opacity: 0.3 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  transform: scale(0.95);
  transition: all 0.3s ease;
}
.modal-body.variants-mode .native-variants-panel {
  z-index: 1000;
  position: relative;
  max-width: 100%;
}
.modal-body.variants-mode .native-variants-panel.panel-visible {
  animation: slideInFromBottom 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  50% {
    opacity: 0.7;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes slideOutToBottom {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
}
@keyframes fadeInPanel {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.canvas-controls button,
.zoom-controls button,
.view-switcher button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.canvas-controls button:not([disabled]):hover,
.zoom-controls button:not([disabled]):hover,
.view-switcher button:not([disabled]):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}
.canvas-controls button:not([disabled]):active,
.zoom-controls button:not([disabled]):active,
.view-switcher button:not([disabled]):active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.toolbar-section p {
  margin-bottom: 0px;
}

.fabric-inline-edit-btn {
  transition: all 0.3s ease;
}
.fabric-inline-edit-btn:hover {
  background: #0056b3 !important;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4) !important;
}
.fabric-inline-edit-btn:active {
  transform: scale(0.95);
}

.mobile-close-panel-btn {
  animation: fadeInPanel 0.3s ease forwards;
}

@media screen and (max-width: 768px) {
  .properties-panel {
    position: absolute !important;
    overflow-y: visible !important;
    top: 50%;
  }
}
div#modal-header-icons {
  width: 35%;
}

.modal-header-icons {
  margin-right: 50px;
}
.modal-header-icons .icon-button svg path {
  stroke: #000 !important;
}

body:has(.design-modal[style*=flex]) .sidebar {
  position: absolute !important;
  z-index: 99999999 !important;
  margin-top: 65px;
  top: 65%;
  height: 89vh !important;
  box-shadow: 0 4px 15px rgba(143, 143, 143, 0.3);
  border-radius: 14px 0 0 14px;
}
