/* Customization Modal Styles - Clean Black & White Design */

.lpop-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lpop-modal.active {
  opacity: 1;
  visibility: visible;
}

@keyframes lpop-fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lpop-modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 95%;
  max-width: 1200px;
  height: 90%;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: lpop-slideUp 0.4s ease;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s ease;
}

@keyframes lpop-slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lpop-modal.active .lpop-modal-content {
  transform: scale(1) translateY(0);
}

/* Prevent immediate closing */
.lpop-modal {
  pointer-events: none;
}

.lpop-modal.active {
  pointer-events: auto;
}

.lpop-modal-content {
  pointer-events: auto;
}

.lpop-modal-header {
  background: #ffffff;
  color: #000000;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

/* .lpop-modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
} */

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.lpop-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lpop-modal-title .lpop-icon {
  margin-right: 12px;
  font-size: 28px;
}

.lpop-modal-close {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #6c757d;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lpop-modal-close:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.lpop-modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.lpop-preview-panel {
  flex: 0 0 60%;
  background: #ffffff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f0f0f0;
  position: relative;
  overflow: hidden;
  width: 60%;
  max-width: 60%;
  box-sizing: border-box;
}

.lpop-preview-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.lpop-canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  min-height: 400px;
  /* padding: 20px; */
}

.lpop-canvas-container img,
.lpop-canvas-container canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lpop-canvas-container:hover {
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lpop-canvas-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  /* let content define height */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

#lpop-canvas {
  border-radius: 8px;
  cursor: crosshair;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lpop-canvas-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.lpop-canvas-btn {
  background: #ffffff;
  border: 1px solid #e9ecef;
  color: #6c757d;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.lpop-canvas-btn:hover {
  background: #f8f9fa;
  border-color: #6c757d;
  color: #495057;
  transform: translateY(-1px);
}

.lpop-canvas-btn.active {
  background: #6c757d;
  color: #ffffff;
  border-color: #6c757d;
}

.lpop-canvas-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lpop-product-gallery {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lpop-gallery-thumb {
  width: 60px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.lpop-gallery-thumb.active {
  border-color: #0073aa;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 115, 170, 0.3);
}

.lpop-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.lpop-options-panel {
  flex: 0 0 40%;
  background: #f8f9fa;
  padding: 32px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 40%;
  max-width: 40%;
  box-sizing: border-box;
  max-height: 100%;
  /* Added to enable scrolling */
}

.lpop-options-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.02) 100%);
  pointer-events: none;
}

.lpop-options-header {
  margin-bottom: 0px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.lpop-options-title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 12px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lpop-price-display {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.lpop-price-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
  font-weight: 500;
}

.lpop-price-amount {
  font-size: 24px;
  font-weight: 700;
  color: #0073aa;
  margin: 0;
}

.lpop-options-form {
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.lpop-field-group {
  margin-bottom: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  width: 400px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.lpop-field-group:hover {
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(102, 126, 234, 0.1);
  transform: translateY(-3px);
  border-color: rgba(102, 126, 234, 0.2);
}

.lpop-field-label {
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  margin-bottom: 8px;
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lpop-field-required {
  color: #dc3545;
  font-size: 14px;
}

.lpop-field-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.lpop-field-input {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  min-width: 0;
}

.lpop-field-input:focus {
  outline: none;
  border-color: #6c757d;
  box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

.lpop-field-input.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.lpop-field-error {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.lpop-field-error.show {
  display: block;
}

.lpop-color-picker {
  width: 60px;
  height: 40px;
  border: 2px solid #e1e1e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lpop-color-picker:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.lpop-file-upload {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: 100%;
}

.lpop-file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.lpop-file-upload-btn {
  background: #fff;
  border: 2px dashed #0073aa;
  color: #0073aa;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
}

.lpop-file-upload-btn:hover {
  background: #f0f8ff;
  border-color: #005177;
}

.lpop-file-preview {
  margin-top: 10px;
  text-align: center;
}

.lpop-file-preview img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* File Preview Item Styling */
.lpop-file-preview-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  margin-top: 10px;
}

.lpop-file-info {
  flex: 1;
}

.lpop-file-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: block;
  margin-bottom: 8px;
}

.lpop-file-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

.lpop-file-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.lpop-btn-preview,
.lpop-btn-download {
  background: #667eea;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lpop-btn-preview:hover,
.lpop-btn-download:hover {
  background: #5a67d8;
  transform: translateY(-1px);
}

.lpop-error {
  color: #dc3545;
  background: #f8d7da;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
  margin-top: 10px;
}

.lpop-modal-footer {
  background: #f8f9fa;
  padding: 20px 30px;
  border-top: 1px solid #e1e1e1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  border-radius: 0 0 12px 12px;
}

.lpop-footer-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.lpop-footer-right {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}

.lpop-canvas-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: 15px;
  padding-left: 15px;
  border-left: 1px solid #ddd;
}

.lpop-canvas-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 11px;
  white-space: nowrap;
}

.lpop-canvas-btn:hover {
  background: #f0f0f0;
  border-color: #0073aa;
}

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

.lpop-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.lpop-btn-primary {
  background: #8b5cf6;
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lpop-btn-primary:hover {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.lpop-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.lpop-btn-primary:hover::before {
  left: 100%;
}

.lpop-btn-secondary {
  background: #6c757d;
  color: #fff;
}

.lpop-btn-secondary:hover {
  background: #545b62;
  transform: translateY(-2px);
  color: #fff;
}

.lpop-btn-outline {
  background: #ffffff;
  color: #000000;
  border: 1px solid #d1d5db;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
}

.lpop-btn-outline:hover {
  background: #f8fafc;
  border-color: #000000;
}

.lpop-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.lpop-btn .lpop-loading {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: lpop-spin 1s linear infinite;
}

.lpop-progress-bar {
  display: none;
  width: 100%;
  height: 4px;
  background: #e1e1e1;
  border-radius: 2px;
  overflow: hidden;
  margin: 15px 0;
}

.lpop-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0073aa, #005177);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Footer Layout - Center Canvas Controls */
.lpop-modal-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #ddd;
  background: #f9f9f9;
}

.lpop-footer-left {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.lpop-footer-center {
  display: flex;
  justify-content: center;
}

.lpop-footer-right {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.lpop-canvas-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.lpop-canvas-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
}

.lpop-canvas-btn:hover {
  background: #f0f0f0;
  border-color: #0073aa;
}

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

/* Zoom Controls */
.lpop-zoom-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.lpop-zoom-btn {
  width: 35px;
  height: 35px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lpop-zoom-btn:hover {
  background: rgba(102, 126, 234, 0.9);
  border-color: #667eea;
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.lpop-zoom-btn:active {
  transform: scale(0.95);
}

/* Modal Layout - Full Width Canvas */
.lpop-preview-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 20px;
  min-height: 500px;
  width: 100%;
}

.lpop-canvas-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* flex: 1; */
  width: 100%;
}

.lpop-canvas-container {
  width: 100%;
  height: 100%;
  border: 2px solid #ddd;
  border-radius: 8px;
  position: relative;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lpop-canvas-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#lpop-canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.lpop-product-gallery {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding: 15px 0;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}

.lpop-gallery-thumb {
  width: 100px;
  height: 100px;
  border: 2px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lpop-gallery-thumb:hover {
  border-color: #0073aa;
  transform: scale(1.05);
}

.lpop-gallery-thumb.active {
  border-color: #0073aa;
  box-shadow: 0 0 10px rgba(0, 115, 170, 0.3);
}

.lpop-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gallery Placeholder for Single Image Products */
.lpop-gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: #f9f9f9;
  border: 2px dashed #ddd;
  border-radius: 8px;
  color: #999;
  text-align: center;
}

.lpop-gallery-placeholder span {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.lpop-gallery-placeholder p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.lpop-single-image .lpop-product-gallery {
  justify-content: center;
}



.lpop-options-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.lpop-options-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
}

.lpop-price-display {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  text-align: center;
}

.lpop-price-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.lpop-price-amount {
  font-size: 24px;
  font-weight: 700;
  color: #28a745;
}

.lpop-progress-bar {
  display: none;
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.lpop-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0073aa, #28a745);
  transition: width 0.3s ease;
  width: 0%;
}

/* Field Groups */
.lpop-field-group {
  margin-bottom: 20px;
  padding: 15px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.lpop-field-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.lpop-field-input,
.lpop-field-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  color: #333333;
  transition: all 0.2s ease;
}

.lpop-field-input:focus,
.lpop-field-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lpop-field-input.error {
  border-color: #dc3545;
}

.lpop-field-error {
  color: #dc3545;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.lpop-field-error.show {
  display: block;
}

/* Typography Controls */
.lpop-typo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.lpop-typo-family,
.lpop-typo-weight,
.lpop-typo-size,
.lpop-typo-color {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 12px;
  background: #ffffff;
  color: #000000;
}

.lpop-typo-size {
  text-align: center;
}

.lpop-typo-color {
  padding: 4px;
  height: 35px;
  width: 35px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

/* File Upload */
.lpop-file-upload {
  background: #ffffff;
  color: #000000;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #d1d5db;
  font-size: 16px;
  font-weight: 500;
  width: 330px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.lpop-file-upload:hover {
  background: #f8fafc;
  border-color: #000000;
}

/* Action buttons container */
.lpop-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.lpop-btn-outline {
  background: transparent;
  color: #3b82f6;
  border: 1px solid #d1d5db;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
}

.lpop-btn-outline:hover {
  background: #f8fafc;
  border-color: #3b82f6;
}

/* Close and Add to Cart buttons */
.lpop-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.lpop-btn-close {
  background: #6b7280;
  color: #ffffff;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lpop-btn-close:hover {
  background: #4b5563;
}

.lpop-add-to-cart {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lpop-add-to-cart:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Gallery thumbnails - horizontal scroll */
.lpop-product-gallery {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.lpop-gallery-thumb {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lpop-gallery-thumb:hover,
.lpop-gallery-thumb.active {
  border-color: #3b82f6;
}

.lpop-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .lpop-preview-layout {
    grid-template-columns: 1fr 200px;
    gap: 15px;
  }

  .lpop-gallery-thumb {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 768px) {
  .lpop-modal-content {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    max-width: none;
    max-height: none;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    transform: none;
    animation: lpop-mobileSlideUp 0.3s ease;
  }

  @keyframes lpop-mobileSlideUp {
    from {
      opacity: 0;
      transform: translateY(100%);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .lpop-modal-header {
    border-radius: 0;
    padding: 10px 20px;
    flex-shrink: 0;
    background: #ffffff;
    color: #000000;
    border-bottom: 1px solid #f0f0f0;
  }

  .lpop-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
  }

  .lpop-modal-close {
    width: 36px;
    height: 36px;
    font-size: 16px;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 8px;
    border: 1px solid #e9ecef;
  }

  .lpop-modal-close:hover {
    background: #e9ecef;
    color: #495057;
  }

  .lpop-modal-body {
    overflow: hidden;
    min-height: 0;
    /* allow inner panels to scroll */
    background: #ffffff;
    display: flex;
    flex-direction: column;
  }

  .lpop-file-upload {
    width: 310px;
    max-height: 70vh;
    overflow: hidden;
  }

  .lpop-preview-panel {
    /* flex: 0 0 auto; */
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
    /* REMOVED padding */
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* REMOVED gap */
    width: 100%;
    max-width: 100%;
    /* margin-bottom: 20px; */
    box-sizing: border-box;
  }

  .lpop-canvas-container {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    /* follow wrapper height */
    min-height: 0;
    /* allow shrink to content */
    margin-bottom: 0;
    padding: 0;
  }

  .lpop-canvas-container img,
  .lpop-canvas-container canvas {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }

  .lpop-canvas-controls {
    display: none !important;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .lpop-canvas-btn {
    background: #ffffff;
    border: 1px solid #e9ecef;
    color: #6c757d;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    box-sizing: border-box;
    touch-action: manipulation;
  }

  .lpop-canvas-btn:hover,
  .lpop-canvas-btn:active {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
  }

  .lpop-product-gallery {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    margin: 0;
  }

  .lpop-gallery-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .lpop-gallery-thumb:hover,
  .lpop-gallery-thumb.active {
    border-color: #6c757d;
  }

  .lpop-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .lpop-options-panel {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    /* allow full list scroll */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* smooth on iOS */
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 0;
    /* enable scrolling area */
    max-height: none;
    /* show all fields with scroll */
    padding-bottom: 80px;
    /* avoid footer overlap while scrolling */
  }

  /* Ensure the options form doesn't clip its children on mobile */
  .lpop-options-form {
    overflow: visible;
  }

  /* Title and progress subtle styling for mobile */
  .lpop-options-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
  }

  .lpop-progress-bar {
    height: 3px;
    background: #e5e7eb;
    border-radius: 999px;
    margin: 8px 0 16px 0;
  }

  .lpop-progress-fill {
    background: #8b5cf6;
  }

  /* Field and label clarity */
  .lpop-field-group {
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    border: none;
    width: 100%;
    /* override desktop fixed width */
    display: block;
    /* Ensure vertical stacking */
    clear: both;
    /* Prevent floating issues */
  }

  .lpop-field-label {
    font-size: 14px;
    color: #111827;
    margin-bottom: 8px;
  }

  .lpop-field-input,
  .lpop-field-select {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    font-size: 16px;
    width: 100%;
    max-width: 100%;
  }

  /* Typography controls layout like the reference */
  .lpop-typo-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 72px 48px;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
  }

  .lpop-typo-family,
  .lpop-typo-weight {
    height: 44px;
    border-radius: 10px;
  }

  .lpop-typo-size {
    height: 27px;
    border-radius: 10px;
    text-align: center;
  }

  .lpop-typo-color {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .lpop-modal-footer {
    flex-shrink: 0;
    background: #ffffff;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
  }

  .lpop-footer-left {
    display: flex;
    gap: 8px;
    flex: 1;
  }

  .lpop-footer-right {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
  }

  /* Hide Close button on mobile to match reference */
  .lpop-btn-close {
    display: none;
  }

  .lpop-btn-download {
    background: #ffffff;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
  }

  .lpop-btn-download:hover {
    background: #f8f9fa;
    border-color: #6c757d;
  }

  .lpop-btn-add-to-cart {
    background: #8b5cf6;
    color: #ffffff;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
  }

  .lpop-btn-add-to-cart:hover {
    background: #7c3aed;
    transform: translateY(-1px);
  }
}

@media (max-width: 480px) {
  .lpop-modal-header {
    padding: 16px 20px;
  }

  .lpop-modal-title {
    font-size: 16px;
  }

  .lpop-modal-close {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .lpop-preview-panel {
    padding: 20px;
  }

  .lpop-options-panel {
    padding: 20px;
  }

  .lpop-field-input,
  .lpop-field-select {
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
  }

  .lpop-field-group {
    margin-bottom: 16px;
    padding: 15px;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .lpop-field-label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 8px;
  }

  .lpop-modal-footer {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
  }

  .lpop-footer-left {
    display: flex;
    gap: 8px;
    flex: 1;
  }

  .lpop-footer-right {
    display: flex;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
  }

  .lpop-btn-download,
  .lpop-btn-add-to-cart {
    padding: 12px 14px;
    font-size: 14px;
    flex: 1;
  }

  .lpop-canvas-container {
    min-height: 240px;
  }

  .lpop-canvas-controls {
    gap: 6px;
    margin-top: 12px;
    padding: 8px 0;
  }

  .lpop-canvas-btn {
    padding: 10px 12px;
    font-size: 16px;
    min-width: 44px;
    min-height: 44px;
  }

  .lpop-gallery-thumb {
    width: 56px;
    height: 56px;
  }
}

/* Loading States */
.lpop-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.lpop-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: lpop-spin 1s linear infinite;
}

/* Animations */
@keyframes lpop-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.lpop-pulse {
  animation: lpop-pulse 2s infinite;
}

/* Focus Effects */
.lpop-field-group.focused {
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(102, 126, 234, 0.15),
    0 0 0 2px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.lpop-field-group.focused .lpop-field-label {
  color: #667eea;
  transform: translateX(5px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll Indicators */
.lpop-options-panel.scrolled {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lpop-options-panel.scrolled::before {
  background:
    linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%),
    linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, transparent 20px);
}

/* Loading States */
.lpop-loading {
  position: relative;
  pointer-events: none;
}

.lpop-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: lpop-spin 1s linear infinite;
}

/* Hover Effects */
.lpop-gallery-thumb.hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Enhanced Animations */
@keyframes lpop-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes lpop-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.lpop-pulse {
  animation: lpop-pulse 2s infinite;
}

/* Additional Clean Design Styles */
.lpop-field-select {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  min-width: 0;
}

.lpop-field-select:focus {
  outline: none;
  border-color: #6c757d;
  box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

/* Color picker styling */
.lpop-color-picker {
  width: 48px;
  height: 32px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
}

.lpop-color-picker:hover {
  border-color: #6c757d;
}

/* File upload styling */
.lpop-file-upload-btn {
  background: #ffffff;
  border: 2px dashed #e9ecef;
  color: #6c757d;
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.2s ease;
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-sizing: border-box;
}

.lpop-file-upload-btn:hover {
  background: #f8f9fa;
  border-color: #6c757d;
  color: #495057;
}

/* Typography controls */
.lpop-typo-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.lpop-typo-family,
.lpop-typo-weight {
  padding: 8px 12px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: #ffffff;
  color: #000000;
  min-width: 0;
  box-sizing: border-box;
}

.lpop-typo-size {
  /* width: 60px; */
  padding: 8px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  background: #ffffff;
  color: #000000;
  text-align: center;
}

.lpop-typo-color {
  padding: 0px;
  width: 32px;
  height: 32px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  /* background: #000000; */
}

/* Clean button styles */
.lpop-btn-outline {
  background: #ffffff;
  color: #6c757d;
  border: 1px solid #e9ecef;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lpop-btn-outline:hover {
  background: #f8f9fa;
  border-color: #6c757d;
  color: #495057;
}

/* Modal footer clean styling */
.lpop-modal-footer {
  background: #ffffff;
  padding: 20px 32px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 0 0 16px 16px;
}

/* Clean scrollbar for options panel */
.lpop-options-panel::-webkit-scrollbar {
  width: 6px;
}

.lpop-options-panel::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.lpop-options-panel::-webkit-scrollbar-thumb {
  background: #e9ecef;
  border-radius: 3px;
}

.lpop-options-panel::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}

/* Tooltips */
.lpop-tooltip {
  position: relative;
  cursor: help;
}

.lpop-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.lpop-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Smooth Transitions */
.lpop-modal * {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Button States */
.lpop-btn:active {
  transform: translateY(1px) scale(0.98);
}

.lpop-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Progress Bar Enhancement */
.lpop-progress-bar {
  background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 100%);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.lpop-progress-fill {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.lpop-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: lpop-progress-shimmer 2s infinite;
}

@keyframes lpop-progress-shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* Pred
efined Color Swatches */
.lpop-color-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lpop-predefined-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.lpop-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.lpop-color-swatch:hover {
  transform: scale(1.1);
  border-color: #007cba;
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.lpop-color-swatch.selected {
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
  transform: scale(1.05);
}

.lpop-color-swatch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
  background-size: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lpop-color-swatch.selected::after {
  opacity: 1;
}

.lpop-custom-color-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.lpop-custom-color-label {
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  margin: 0;
}

.lpop-custom-color-section .lpop-color-picker {
  width: 40px;
  height: 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* T
ypography Color Controls */
.lpop-typo-color-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lpop-typo-predefined-colors {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.lpop-typo-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.lpop-typo-color-swatch:hover {
  transform: scale(1.1);
  border-color: #007cba;
}

.lpop-typo-color-swatch.selected {
  border-color: #007cba;
  box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
}

.lpop-typo-color-swatch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
  background-size: contain;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lpop-typo-color-swatch.selected::after {
  opacity: 1;
}

.lpop-typo-color-wrapper .lpop-typo-color {
  width: 32px;
  height: 24px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  cursor: pointer;
}

/* P
redefined Color Selection Interface */
.lpop-color-picker-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lpop-predefined-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.lpop-color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lpop-color-swatch:hover {
  transform: translateY(-2px);
  border-color: #007cba;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.lpop-color-swatch.selected {
  border-color: #007cba;
  background: #f0f8ff;
  box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
  transform: translateY(-2px);
}

.lpop-color-swatch::before {
  content: '';
  width: 60px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid #ddd;
  background-color: inherit;
}

.lpop-color-name {
  font-size: 12px;
  font-weight: 500;
  color: #495057;
  text-align: center;
  word-break: break-all;
}

.lpop-color-swatch.selected .lpop-color-name {
  color: #007cba;
  font-weight: 600;
}

.lpop-selected-color-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lpop-selected-color-label {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
}

.lpop-selected-color-preview {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid #ddd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lpop-selected-color-value {
  font-size: 14px;
  font-family: monospace;
  color: #6c757d;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

/* Typograp
hy Color Controls */
.lpop-typo-color-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lpop-typo-predefined-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.lpop-typo-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.lpop-typo-color-swatch:hover {
  transform: scale(1.1);
  border-color: #007cba;
  box-shadow: 0 2px 6px rgba(0, 124, 186, 0.3);
}

.lpop-typo-color-swatch.selected {
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
  transform: scale(1.05);
}

.lpop-typo-color-swatch::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lpop-typo-color-swatch.selected::after {
  opacity: 1;
}

/*
 Color Field Sections */
.lpop-predefined-colors-section,
.lpop-custom-color-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lpop-section-label {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin: 0;
}

.lpop-custom-color-section .lpop-color-picker {
  width: 60px;
  height: 40px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lpop-custom-color-section .lpop-color-picker:hover {
  border-color: #007cba;
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

/* Updated 
Typography Color Controls */
.lpop-typo-color-wrapper .lpop-typo-color {
  width: 32px;
  height: 24px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 8px;
}/* Perform
ance Optimizations */
.lpop-modal {
    will-change: opacity, transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.lpop-modal-content {
    will-change: transform;
    backface-visibility: hidden;
}

.lpop-canvas-wrapper {
    will-change: transform;
    backface-visibility: hidden;
}

/* Optimize animations */
.lpop-modal.show {
    animation: lpopFadeIn 0.2s ease-out;
}

.lpop-modal.hide {
    animation: lpopFadeOut 0.2s ease-out;
}

@keyframes lpopFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes lpopFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

/* Reduce repaints */
.lpop-field-group {
    contain: layout style;
}

.lpop-canvas-container {
    contain: layout;
}

/* GPU acceleration for smooth scrolling */
.lpop-modal-body {
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}