/** Shopify CDN: Minification failed

Line 562:0 All "@import" rules must come first

**/
/* Engraving Drawer Component */
.engraving-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100%;
  max-width: 420px;
  background: var(--COLOR-BG);
  z-index: 50000;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  /* Reset any inherited transforms or positions */
  margin: 0 !important;
}

@media screen and (max-width: 768px) {
  .engraving-drawer {
    max-width: 100%;
    width: 100%;
    box-shadow: none;
  }

  .engraving-drawer__header {
    padding: calc(var(--inner) / 2) var(--inner);
  }

  .engraving-drawer__content {
    padding: var(--inner);
  }

  .engraving-styles,
  .engraving-layouts {
    gap: calc(var(--inner) / 2);
  }

  .engraving-preview {
    height: 250px;
  }
}

.engraving-drawer--open {
  transform: translateX(0);
}

.engraving-drawer__overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  margin: 0 !important;
  transform: none !important;
}

.engraving-drawer__overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* Body styles when drawer is open */
body.engraving-drawer-open {
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

.engraving-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem; /* Using a fixed value for consistency */
  border-bottom: 1px solid var(--COLOR-BORDER);
}

.engraving-drawer__title {
  margin: 0;
  font-size: 1.25rem; /* Using a fixed value */
  color: var(--COLOR-HEADING);
}

.engraving-drawer__close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  border-radius: 50%;
}

.engraving-drawer__close:hover {
  opacity: 0.7;
  background: var(--COLOR-BG-DARKEN);
}

.engraving-drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--inner);
}

.engraving-drawer__footer {
  padding: 1.5rem;
  border-top: 1px solid var(--COLOR-BORDER);
}

/* Engraving Steps */
.engraving-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--inner);
  position: relative;
}

.engraving-steps::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--COLOR-BORDER);
  z-index: 1;
}

.engraving-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.engraving-step:hover {
  background: var(--COLOR-BG-DARKEN);
}

.engraving-step:disabled,
.engraving-step--disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.engraving-step__number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--COLOR-BG);
  border: 2px solid var(--COLOR-BORDER);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.engraving-step--active .engraving-step__number,
.engraving-step--completed .engraving-step__number {
  background: var(--COLOR-TEXT);
  color: var(--COLOR-BG);
  border-color: var(--COLOR-TEXT);
}

.engraving-step__label {
  font-size: calc(var(--font-2) * 0.9);
  text-align: center;
}

/* Style Selection */
.engraving-styles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--inner);
  margin-bottom: var(--inner);
}

.engraving-style-selection-wrapper {
  padding-top: var(--inner);
  border-top: 1px solid var(--border);
}
.engraving-style,
.engraving-layout {
  position: relative;
  cursor: pointer;
  border: 2px solid var(--COLOR-BORDER);
  border-radius: calc(var(--RADIUS, 8px) / 2); /* Fallback for --RADIUS */
  transition: all 0.2s ease-in-out;
}

.engraving-style:hover,
.engraving-layout:hover {
  border-color: var(--COLOR-TEXT);
  transform: translateY(-2px);
}

.engraving-style--selected,
.engraving-layout--selected {
  border-color: var(--COLOR-TEXT);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.engraving-layout {
  padding: 1rem;
  background: var(--COLOR-BG);
}

.engraving-style {
  overflow: hidden;
}

.engraving-style__image {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  -ms-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.engraving-style__label {
  position: relative;
  display: block;
  background: var(--COLOR-BG);
  padding: 12px 8px;
  text-align: center;
  font-weight: 500;
  font-size: var(--font-2);
  border-top: 1px solid var(--COLOR-BORDER);
}

/* Layout Selection */
.engraving-layouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--inner);
  margin-bottom: var(--inner);
}

.engraving-layout__icon {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.engraving-layout__icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  -ms-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.engraving-layout__label {
  text-align: center;
  font-size: calc(var(--font-2) * 0.9);
  margin-top: 8px;
}

/* Text Input */
.engraving-input {
  margin-bottom: var(--inner);
}

.engraving-input__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.engraving-input__label {
  font-weight: 500;
}

.engraving-input__field {
  margin-top: 8px;
}

.engraving-input__field {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--COLOR-BORDER);
  border-radius: var(--RADIUS, 4px); /* Fallback for --RADIUS */
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.engraving-input__field:focus {
  outline: none;
  border-color: var(--COLOR-TEXT);
}

.engraving-input__field[type='date'] {
  font-family: inherit;
}

.engraving-input__field[type='date']::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.engraving-input__counter {
  font-size: 0.875rem;
  color: var(--COLOR-TEXT-LIGHTEN);
}

/* Preview */
.engraving-preview {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 300px;
  margin: 0 auto var(--inner);
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f5;
}

.engraving-preview__canvas {
  width: 100%;
  height: 100%;
}

/* Checkbox */
.engraving-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--inner);
  position: relative;
  cursor: pointer;
  user-select: none;
}

.engraving-checkbox input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.engraving-checkbox__label {
  font-size: calc(var(--font-2) * 0.9);
  line-height: 1.5;
  cursor: pointer;
  padding-left: 32px;
  position: relative;
  display: block;
  color: var(--COLOR-TEXT, #333);
  transition: color 0.2s ease;
}

.engraving-checkbox__label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--COLOR-BORDER, #ddd);
  border-radius: 4px;
  background: var(--COLOR-BG, #fff);
  transition: all 0.2s ease;
}

.engraving-checkbox__label::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  width: 6px;
  height: 10px;
  border: solid var(--COLOR-BG, #fff);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.engraving-checkbox
  input[type='checkbox']:checked
  + .engraving-checkbox__label::before {
  background: var(--COLOR-PRIMARY, #1a1a1a);
  border-color: var(--COLOR-PRIMARY, #1a1a1a);
}

.engraving-checkbox
  input[type='checkbox']:checked
  + .engraving-checkbox__label::after {
  transform: rotate(45deg) scale(1);
}

.engraving-checkbox:hover .engraving-checkbox__label::before {
  border-color: var(--COLOR-PRIMARY, #1a1a1a);
  box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

.engraving-checkbox
  input[type='checkbox']:focus
  + .engraving-checkbox__label::before {
  border-color: var(--COLOR-PRIMARY, #1a1a1a);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.2);
}

.engraving-checkbox
  input[type='checkbox']:disabled
  + .engraving-checkbox__label {
  opacity: 0.6;
  cursor: not-allowed;
}

.engraving-checkbox
  input[type='checkbox']:disabled
  + .engraving-checkbox__label::before {
  background: var(--COLOR-BG-LIGHTEN, #f8f9fa);
  border-color: var(--COLOR-BORDER-LIGHT, #e9ecef);
}

/* Navigation Buttons */
.engraving-navigation {
  display: flex;
  gap: calc(var(--inner) / 2);
}

.engraving-navigation .btn {
  flex: 1;
}

/* Add Engraving Button - extends theme button styles */
.engraving-add-button {
  width: 100%;
  line-height: 1;
  align-items: center;
  margin-bottom: calc(var(--inner) / 2);
}

/* Step Content */
.engraving-step-content {
  display: none;
}

.engraving-step-content--active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Debug Panel */
.engraving-debug-panel {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--inner);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 60000;
}

.engraving-debug-panel h3 {
  margin-bottom: calc(var(--inner) / 2);
  font-size: var(--font-2);
  color: var(--text);
}

.engraving-debug-controls {
  display: flex;
  flex-direction: column;
  gap: calc(var(--inner) / 2);
}

.engraving-debug-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--font-1);
}

.engraving-debug-controls input[type='range'] {
  width: 100%;
  cursor: pointer;
}

.engraving-debug-controls span {
  font-weight: 600;
  color: var(--text);
}

#debug-copy-values {
  margin-top: calc(var(--inner) / 2);
  align-self: flex-start;
}

/* Mobile adjustments for debug panel */
@media screen and (max-width: 768px) {
  .engraving-debug-panel {
    width: calc(100% - 40px);
    left: 20px;
    right: 20px;
    max-height: 50vh;
  }
}

/* Combined Steps 2 & 3 */
.engraving-combined-step {
  display: flex;
  flex-direction: column;
  gap: var(--inner);
}

/* Import fonts for engraving preview */
@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Raleway:wght@400;600&display=swap');

.engraving-navigation .btn--loading {
  position: relative;
  color: transparent !important;
}

.engraving-navigation .btn--loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  color: var(--text); /* Fallback for button classes */
}

.engraving-navigation .btn-primary-border.btn--loading::after,
.engraving-navigation .btn-secondary-border.btn--loading::after {
  color: inherit;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Cart Selector */
.engraving-cart-selector-container {
  margin-bottom: var(--inner);
}

.engraving-cart-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.loading-spinner {
  display: block;
  width: 24px;
  height: 24px;
  margin: 16px auto;
  border: 3px solid var(--COLOR-BORDER);
  border-top-color: var(--COLOR-TEXT);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  transform: translate(-50%, -50%);
}

.engraving-preview-disclaimer {
  font-size: 0.875rem;
  color: var(--COLOR-TEXT-LIGHTEN);
  font-style: italic;
  text-align: center;
  margin-top: -8px; /* Reduce space after preview */
  margin-bottom: 0.5rem;
}
