/** Shopify CDN: Minification failed

Line 2383:0 Unexpected "}"

**/
/* ==========================================
   🎄 HERITAGE LETTER BUILDER - OPTIMIZED CSS (PHASE 1)
   ========================================== */

/* ==========================================
   📁 BASE STYLES & FONTS
   ========================================== */

/* REMOVED DUPLICATE FONT IMPORT - Already in global CSS */

/* Custom Fonts */
@font-face {
  font-family: 'FancyFont';
  src: url('/cdn/shop/files/FancyFont.woff?v=1746761729') format('woff');
  font-display: swap;
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'BlockFont';
  src: url('/cdn/shop/files/BlockFont.woff?v=1746762239') format('woff');
  font-display: swap;
  font-weight: normal;
  font-style: normal;
}

/* Heritage Variables */
:root {
  --heritage-forest: #14302A;
  --heritage-burgundy: #4b0000;
  --heritage-gold: #d4af37;
  --heritage-cream: #faf7f2;
  --heritage-sage: #f0f7f4;
  
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Letter Sizing Defaults - Desktop */
  --letter-h3-size: 2.1rem;
  --letter-p-size: 2.1rem;
  --letter-line-height: 1.3;
  --letter-date-size: 3.0rem;
  --letter-scale: 1.4;
}

/* ==========================================
   DESKTOP FONT SIZING SYSTEM (701px and above)
   ========================================== */

/* Individual Letter Desktop Sizing - OPTIMIZED FOR DYNAMIC */
[data-letter-type="individual"] .letter-text-overlay.Block {
  --letter-h3-size: 3.2rem; /* Start larger for dynamic sizing */
  --letter-p-size: 3.2rem; /* Start larger for dynamic sizing */
  --letter-line-height: 1.2; /* Tighter to fit more */
}

[data-letter-type="individual"] .letter-text-overlay.Fancy {
  --letter-h3-size: 3.0rem; /* Start larger */
  --letter-p-size: 2.9rem; /* Start larger */
  --letter-line-height: 1.1; /* Tighter for Fancy */
  --letter-date-size: 2.1rem;
}

/* Special: The Brave One - with minimum size protection */
[data-letter-type="individual"][data-template="The Brave One"] .letter-text-overlay.Block {
  --letter-p-size: 2.8rem;      /* DEFAULT SIZE for paragraphs - starting point before dynamic sizing */
  --letter-h3-size: 2.8rem;     /* DEFAULT SIZE for headings - starting point before dynamic sizing */
  --letter-line-height: 1.2;    /* SPACING between lines - lower = tighter, higher = more spaced */
  --letter-min-size: 1.2rem;    /* MINIMUM SIZE - text will never shrink below this */
}

[data-letter-type="individual"][data-template="The Brave One"] .letter-text-overlay.Fancy {
  --letter-p-size: 3.9rem;      /* DEFAULT SIZE for paragraphs - INCREASED from 3.2rem */
  --letter-h3-size: 3.9rem;     /* DEFAULT SIZE for headings - INCREASED from 3.3rem */
  --letter-line-height: 1.05;   /* SPACING between lines - tighter for fancy font */
  --letter-min-size: 1.3rem;    /* MINIMUM SIZE - text will never shrink below this */
}

/* Special: Keeper of Small Things - needs to stay smaller */
[data-letter-type="individual"][data-template="Keeper Of Small Things"] .letter-text-overlay.Block {
  --letter-p-size: 2.0rem; /* Increased from 1.65rem but still smaller than others */
  --letter-h3-size: 2.0rem;
  --letter-line-height: 1.25;
}

/* First Christmas Desktop - MUCH BIGGER */
[data-letter-type="first-christmas"] .letter-text-overlay.Block {
  --letter-h3-size: 2.8rem; /* Increased from 1.8rem */
  --letter-p-size: 2.6rem; /* Increased from 1.7rem */
  --letter-line-height: 1.3;
}

[data-letter-type="first-christmas"] .letter-text-overlay.Fancy {
  --letter-h3-size: 3.2rem; /* Increased from 2.5rem */
  --letter-p-size: 3.0rem; /* Increased from 2.5rem */
  --letter-line-height: 1.1; /* Tight for Fancy */
  --letter-date-size: 2.3rem;
}

/* Family Letter Desktop - OPTIMIZED FOR DYNAMIC */
[data-letter-type="family"] .letter-text-overlay.Block {
  --letter-h3-size: 3.5rem; /* Start much larger */
  --letter-p-size: 3.5rem; /* Start much larger */
  --letter-line-height: 1.15; /* Tighter line height */
}

[data-letter-type="family"] .letter-text-overlay.Fancy {
  --letter-h3-size: 3.6rem; /* Start much larger */
  --letter-p-size: 3.5rem; /* Start much larger */
  --letter-line-height: 1.05; /* Very tight for Fancy */
}

/* Non-Believer Desktop - BIGGER */
[data-letter-type="non-believer"] .letter-text-overlay.Block {
  --letter-h3-size: 2.4rem; /* Increased from 2.0rem */
  --letter-p-size: 2.4rem; /* Increased from 2.0rem */
  --letter-line-height: 1.3;
}

[data-letter-type="non-believer"] .letter-text-overlay.Fancy {
  --letter-h3-size: 2.6rem; /* Increased from 2.2rem */
  --letter-p-size: 2.5rem; /* Increased from 2.1rem */
  --letter-line-height: 1.15; /* Tight for Fancy */
}

/* Family Backdated Desktop - MUCH BIGGER */
[data-letter-type="family-backdated"] .letter-text-overlay.Block {
  --letter-h3-size: 2.8rem; /* Much bigger */
  --letter-p-size: 2.8rem; /* Much bigger */
  --letter-line-height: 1.3;
}

[data-letter-type="family-backdated"] .letter-text-overlay.Fancy {
  --letter-h3-size: 3.0rem; /* Much bigger */
  --letter-p-size: 2.9rem; /* Much bigger */
  --letter-line-height: 1.15; /* Tight for Fancy */
}

/* Individual Backdated Desktop - Same as regular individual */
[data-letter-type="individual-backdated"] .letter-text-overlay.Block {
  --letter-h3-size: 2.4rem;
  --letter-p-size: 2.4rem;
  --letter-line-height: 1.3;
}

[data-letter-type="individual-backdated"] .letter-text-overlay.Fancy {
  --letter-h3-size: 2.6rem;
  --letter-p-size: 2.5rem;
  --letter-line-height: 1.15; /* Tight for Fancy */
  --letter-date-size: 2.1rem;
}

/* Write Your Own Desktop */
[data-letter-type="write-your-own"] .letter-text-overlay.Block {
  --letter-h3-size: 2.3rem;
  --letter-p-size: 2.3rem;
  --letter-line-height: 1.35;
}

[data-letter-type="write-your-own"] .letter-text-overlay.Fancy {
  --letter-h3-size: 2.5rem;
  --letter-p-size: 2.4rem;
  --letter-line-height: 1.25;
}

/* Write Your Own - Center content vertically */
[data-letter-type="write-your-own"] .letter-content-inner {
  justify-content: center !important; /* Center instead of space-between */
  text-align: left;
  
}

[data-letter-type="write-your-own"] .dynamic-letter-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 1 auto; /* Don't grow, just be your natural size */
}


/* ==========================================
   End Font Sizing
   ========================================== */

   /* Vertically center ALL letter content */
.letter-content-inner {
  display: flex;
  flex-direction: column;
  justify-content: center !important; /* Center vertically */
  align-items: stretch;
  height: 100%;
}

.dynamic-letter-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0; /* Don't grow, just center */
}

/* Base Typography - Match Product Page */
body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--heritage-forest);
}

/* Global Typography - Headings use Crimson Text */
h1, h2, h3, h4, h5, h6,
.field-label,
.examples-title,
.builder-title,
.step-header h3 {
  font-family: 'Crimson Text', serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: none !important;
}

/* Labels, buttons, and UI text use Inter */
label, button, input, select, textarea,
.helper-text, .char-counter, .proof-text,
.step-label, .selection-description,
.summary-label, .summary-value {
  font-family: 'Inter', sans-serif;
}

/* Global Animations */
@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

@keyframes gentle-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   🛒 CART EDIT MODE STYLES
   ========================================== */

/* Edit Mode Indicator */
.edit-mode-icon {
  width: 24px;
  height: 24px;
  background: #d97706;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.edit-mode-content h3 {
  font-family: 'Crimson Text', serif;
  font-size: 18px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px;
}

.edit-mode-content p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #a16207;
  line-height: 1.4;
  margin: 0;
}

.edit-mode-cancel {
  background: white;
  border: 1px solid #d97706;
  color: #d97706;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.edit-mode-cancel:hover {
  background: #fef3c7;
}

/* Edit Mode Button States */
.btn.edit-mode {
  background: #d97706;
  border-color: #d97706;
}

.btn.edit-mode:hover {
  background: #b45309;
  border-color: #b45309;
}

/* Edit Mode Loading States */
.btn.loading.edit-mode::before {
  border-top-color: white;
}

/* ==========================================
   🖥️ DESKTOP STYLES
   ========================================== */

/* Container & Layout */
/* Container & Layout */
.letter-builder-container {
  background: var(--heritage-cream);
  padding: var(--space-2xl) 0 calc(var(--space-2xl) + 50px) 0; /* Extra bottom padding */
  position: relative;
  z-index: 2;
}

.builder-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.builder-title {
  font-family: 'Crimson Text', serif;
  font-size: 40px;
  font-weight: 400;
  color: var(--heritage-forest);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-md);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.builder-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Desktop Grid Layout */
/* Desktop Grid Layout */
.builder-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-2xl);
  align-items: start;
  min-height: 800px;
  padding-bottom: 100px; /* Add padding to prevent overlap with next section */
  position: relative;
  z-index: 2;
}

.preview-column {
  position: static !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start; /* Changed from center to flex-start */
  min-height: 100%;
  padding: 0;
  margin-top: 0; /* Removed negative margin */
  overflow: hidden;
  z-index: 1;
}


.form-column {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid #e5e7eb;
  align-self: start;
  margin-top: 0; /* Ensure no top margin */
}

/* Desktop Step Progress */
.step-progress-bar {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg) 0;
}

.step-progress-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.step-dots,
.step-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 360px;
  align-items: center;
  position: relative;
}

.step-dots {
  margin-bottom: var(--space-sm);
}

.step-dots::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 12%;
  right: 12%;
  height: 2px;
  background: #e5e7eb;
  z-index: 1;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all var(--transition-normal);
  position: relative;
  z-index: 2;
  border: 2px solid white;
  justify-self: center;
}

.step-dot.active {
  background: var(--heritage-forest);
  color: white;
  box-shadow: 0 0 0 3px rgba(14, 40, 20, 0.2);
}

.step-dot.completed {
  background: var(--heritage-gold);
  color: var(--heritage-forest);
}

.step-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  text-align: center;
  justify-self: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-label.active {
  color: var(--heritage-forest);
  font-weight: 600;
}

/* Mobile Step Dots (Hidden on Desktop) */
.mobile-step-dots {
  display: none;
}

/* Desktop Step Headers */
.step-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-lg) 0;
}

.step-header h3 {
  font-family: 'Crimson Text', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--heritage-forest);
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.step-header p {
  font-family: 'Inter', sans-serif;
  color: #6b7280;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Desktop Preview Areas */
.preview-area {
  width: 100%;
  min-height: 700px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: flex-start; /* Changed to align at top */
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding-top: 0; /* Ensure no top padding */
  z-index: 1;
}

#letterPreview.preview-area {
  min-height: 900px; /* Increased to accommodate P.S. below signature */
  height: auto !important;
  overflow: visible !important; /* Keep visible to show full letter */
  background: var(--heritage-cream);
  position: relative;
  z-index: 1;
  margin-bottom: 150px; /* Increased space for scaled content */
  padding-bottom: 100px; /* Additional padding for P.S. area */
}

@media (min-width: 701px) {
  #letterPreview .preview-wrapper {
    height: auto !important;
    min-height: 100%;
    overflow: visible !important;
  }
}

@media (min-width: 701px) {
  .letter-bg-wrapper {
    transform: scale(1.0);
    transform-origin: top center; /* Add this - scales from top down */
  }
}
@media (min-width: 701px) {
  .letter-bg-wrapper:hover {
    transform: scale(1.4);
    transform-origin: top center; /* Add this too */
  }
}

#envelopePreview.preview-area {
  min-height: 700px;
  align-items: center;
  justify-content: center;
}

.preview-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%; /* Ensure full height */
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  padding: var(--space-sm);
  padding-bottom: 150px; /* Extra bottom padding for P.S. */
}

.envelope-bg-wrapper,
.letter-bg-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  transition: transform var(--transition-slow);
}

.envelope-bg-wrapper:hover {
  transform: rotateY(2deg) rotateX(1deg);
}

/* Remove any hover effect on letter */
.letter-bg-wrapper:hover {
  /* No hover effect */
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  border-radius: 0;  /* Remove rounded corners */
  box-shadow: none;  /* Remove shadow */
  transition: transform var(--transition-normal);
  object-fit: contain;
}

.envelope-shadow,
.letter-shadow {
  position: absolute;
  background: rgba(0,0,0,0.1);
  top: 15px;
  left: 15px;
  right: -15px;
  bottom: -15px;
  border-radius: var(--radius-lg);
  filter: blur(20px);
  z-index: 1;
}

/* Desktop Text Overlays */
.envelope-text-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  pointer-events: none;
  padding-top: 350px;
  z-index: 3;
}

.envelope-name-preview {
  font-family: 'FancyFont', 'Brush Script MT', cursive;
  color: #fff;
  font-size: 4.6rem;
  text-align: center;
  font-weight: normal;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  max-width: 75%; /* Reduced from 70% to force earlier line breaks */
  overflow-wrap: break-word;
  word-break: break-word;
  text-shadow: 0 2px 14px rgba(0,0,0,0.3), 0 1.5px 4px rgba(0,0,0,0.2);
  white-space: pre-wrap !important;
}

.envelope-address-preview {
  font-family: 'FancyFont', 'Brush Script MT', cursive;
  color: #fff;
  font-size: 2.4rem;
  text-align: center;
  font-weight: normal;
  line-height: 1.4;
  width: 88%;
  white-space: pre-wrap;
  word-break: break-word;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3), 0 1.5px 4px rgba(0,0,0,0.2);
}

/* Desktop Letter Text Layout */
/* Desktop Letter Text Layout */
/* Desktop Letter Text Layout */
.letter-text-overlay {
  position: absolute;
  top: 20%;
  left: 50%;  /* Center horizontally */
  transform: translateX(-50%);  /* Center adjustment */
  width: 100%;
  height: 64%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  padding: 0;  /* Remove padding to let content handle it */
  z-index: 3;
}

.letter-text-overlay.Block {
  font-family: 'BlockFont', 'Times New Roman', serif;
}

.letter-text-overlay.Fancy {
  font-family: 'FancyFont', 'Brush Script MT', cursive;
}

.letter-content {
  width: 86%;  /* Slightly reduced to center better */
  max-width: 100%;
  text-align: left;
  padding: 0 1rem;  /* Equal padding on both sides */
  height: 100%;
  margin: 0 auto;  /* Center the content */
}

/* Desktop Letter Content */
.letter-content-inner {
  text-align: left;
  font-family: inherit;
  padding: var(--space-sm);
  padding-bottom: 2rem; /* Add extra bottom padding to avoid signature */
  max-width: 100%;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important; /* Back to original */
}

.letter-content-inner h3 {
  font-family: inherit;
  margin-bottom: var(--space-lg);
  color: var(--heritage-forest);
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 0;
  font-size: var(--letter-h3-size, 2.1rem);
}

.letter-content-inner p {
  font-family: inherit;
  margin-bottom: var(--space-sm);
  line-height: var(--letter-line-height, 1.3);
  color: #2d3748;
  text-align: left;
  text-shadow: none; /* Match PS text - no shadow */
  font-size: var(--letter-p-size, 2.1rem);
}

.letter-content-inner p:first-child {
  margin-top: 0 !important;
}

.letter-content-inner p:last-child {
  margin-bottom: 0 !important;
  margin-top: var(--space-lg);
  padding-bottom: 1rem; /* Extra space before signature */
}

.letter-content-inner p + p {
  margin-top: var(--space-md);
}

/* Font stroke enhancement */
.envelope-name-preview,
.envelope-address-preview,
.letter-text-overlay.Fancy,
.letter-text-overlay.Fancy *,
.font-preview-text.Fancy {
  letter-spacing: -0.008em !important;
}

/* Additional spacing adjustment for Fancy font in letter overlay */
.letter-text-overlay.Fancy .letter-content-inner p {
  letter-spacing: -0.3px !important; /* Slightly tighter for better connection */
}

/* Desktop Inline Highlighting */
.personalized-text {
  display: inline;
  background: rgba(212, 175, 55, 0.18);
  padding: 0px;
  border-radius: 2px;
  transition: background-color 0.2s;
}

.personalized-text:hover {  
  background: rgba(212, 175, 55, 0.25);
}

.letter-content-inner p .personalized-text {
  display: inline !important;
  align-self: auto !important;
}

/* Desktop Zoom Controls */
.zoom-control {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all var(--transition-normal);
  font-size: 1.1rem;
}

.zoom-control:hover {
  background: var(--heritage-sage);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* Enhanced multi-line child name textarea */
#childName.form-control,
#familyNames.form-control {
  resize: none;
  overflow: hidden;
  min-height: auto;
  height: auto;
  line-height: 1.4;
  padding: var(--space-sm) var(--space-md);
  max-height: 4.8em;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* Style the scrollbar if it appears */
#childName.form-control::-webkit-scrollbar,
#familyNames.form-control::-webkit-scrollbar {
  width: 4px;
}

#childName.form-control::-webkit-scrollbar-track,
#familyNames.form-control::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#childName.form-control::-webkit-scrollbar-thumb,
#familyNames.form-control::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 2px;
}

/* Two-line name handling */
.envelope-name-preview.has-two-lines {
  line-height: 1.2 !important;
}

/* Desktop Form Sections */
.form-section {
  background: #f9fafb;
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-xl) var(--space-xl) var(--space-xl);
  margin-bottom: var(--space-lg);
  border: 1px solid #e5e7eb;
  transition: all var(--transition-normal);
}

.form-section:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.field-label {
  font-family: 'Crimson Text', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--heritage-forest);
  margin-bottom: var(--space-md);
  display: block;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.helper-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 6px;
  margin-left: 0;
}

/* Desktop Form Controls */
.form-group {
  margin-bottom: var(--space-md);
}

.form-control {
  display: block;
  width: 100%;
  padding: var(--space-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--heritage-forest);
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  box-sizing: border-box;
}

.form-control::placeholder {
  font-size: 14px;
  opacity: 0.7;
}

.form-control:focus {
  border-color: var(--heritage-gold);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

textarea.form-control {
  min-height: 88px;
  resize: vertical;
}

/* Special handling for achievement field in write-your-own mode */
#achievement.form-control.write-your-own {
  min-height: 200px;
  max-height: 300px;
}

/* Desktop Character Counters */
.char-counter {
  font-family: 'Inter', sans-serif;
  text-align: right;
  font-size: 11px;
  margin-top: var(--space-xs);
  font-weight: 500;
  color: var(--heritage-forest);
}

.char-counter.warning {
  color: #d97706;
}

.char-counter.error {
  color: #dc2626;
  font-weight: 600;
}

/* Desktop Color Swatches - CONSOLIDATED */
.colour-swatches {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.colour-swatch {
  width: 64px;
  height: 64px;
  border-radius: 50%; /* Changed from var(--radius-lg) to 50% */
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  box-sizing: border-box;
}

.colour-swatch:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.colour-swatch.selected {
  border-color: var(--heritage-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3), var(--shadow-md);
}

.colour-swatch::after {
  content: attr(title);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--heritage-forest);
  white-space: nowrap;
  transform-origin: center top;
  pointer-events: none;
}

.colour-swatch-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--heritage-gold);
  color: var(--heritage-forest);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

#redSwatch {
  background: linear-gradient(135deg, #7D2323, #5a1a1a);
}

#greenSwatch {
  background: linear-gradient(135deg, #3C5551, #2a3e3a);
}

/* Desktop Selection Cards */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.font-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.selection-card,
.font-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid #e5e7eb;
  position: relative;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
}

.selection-card:hover,
.font-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--heritage-gold);
}

.selection-card.active,
.font-card.active {
  border-color: var(--heritage-gold);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.02));
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
  transform: translateY(-1px);
}

.selection-preview {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  background: #f9fafb;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 1.0rem;
  font-weight: 600;
  position: relative;
  border: 1px solid #e5e7eb;
}

.selection-card.active .selection-preview {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--heritage-gold);
  color: var(--heritage-forest);
}

.selection-description {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.3;
}

.template-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--heritage-gold);
  color: var(--heritage-forest);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

/* ==========================================
   🎨 FONT STROKE ENHANCEMENT
   ========================================== */

/* Block Font Preview Text in Selection Cards */
.font-preview-text.Block {
  font-family: 'BlockFont', 'Times New Roman', serif;
  font-weight: normal;
  -webkit-text-stroke: 0.2px var(--heritage-forest);
  text-stroke: 0.2px var(--heritage-forest);
}

/* Block Font in Letter Preview Overlay */
.letter-text-overlay.Block,
.letter-text-overlay.Block * {
  font-family: 'BlockFont', 'Times New Roman', serif;
  -webkit-text-stroke: 0.2px #2d3748;
  text-stroke: 0.2px #2d3748;
}

/* Block Font in Letter Content */
.letter-content-inner.Block,
.letter-content-inner.Block h3,
.letter-content-inner.Block p {
  -webkit-text-stroke: 0.2px #2d3748;
  text-stroke: 0.2px #2d3748;
}

/* Fancy Font Preview Text in Selection Cards */
.font-preview-text.Fancy {
  font-family: 'FancyFont', 'Brush Script MT', cursive;
  font-weight: normal;
  -webkit-text-stroke: 0.1px var(--heritage-forest);
  text-stroke: 0.1px var(--heritage-forest);
}

/* Fancy Font in Letter Preview Overlay */
.letter-text-overlay.Fancy,
.letter-text-overlay.Fancy * {
  font-family: 'FancyFont', 'Brush Script MT', cursive;
  -webkit-text-stroke: 0.1px #2d3748;
  text-stroke: 0.1px #2d3748;
letter-spacing: 0.0em !important; /* Add this - brings letters closer */

}

/* Fancy Font in Letter Content */
.letter-content-inner.Fancy,
.letter-content-inner.Fancy h3,
.letter-content-inner.Fancy p {
  -webkit-text-stroke: 0.1px #2d3748;
  text-stroke: 0.1px #2d3748;
  line-height: 1.15; /* Tighter line spacing for Fancy font */
    letter-spacing: 0.0em !important; /* Add this too */

}

/* Fancy Font in Envelope Preview */
.envelope-name-preview,
.envelope-address-preview {
  -webkit-text-stroke: 0.1px rgba(255,255,255,0.3);
  text-stroke: 0.1px rgba(255,255,255,0.3);

}

/* Desktop Font Cards */
.font-preview-text {
  font-size: 1.8rem;
  color: var(--heritage-forest);
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Desktop Example Chips */
.examples-section {
  margin-top: var(--space-md);
}

.examples-title {
  font-family: 'Crimson Text', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--heritage-forest);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  letter-spacing: 0.02em;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.example-chip {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: var(--space-sm) var(--space-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.90rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-block;
}

.example-chip:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--heritage-gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Desktop Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  padding: var(--space-md) var(--space-lg);
  font-size: 1.1rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  text-decoration: none;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

.btn:hover:not(.disabled):not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn.disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary,
.next-btn,
#nextBtn {
  background: var(--heritage-forest);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(.disabled):not(:disabled),
.next-btn:hover:not(.disabled):not(:disabled),
#nextBtn:hover:not(.disabled):not(:disabled) {
  background: #0a2210;
  box-shadow: var(--shadow-lg);
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-primary.success {
  background: var(--heritage-gold);
  color: var(--heritage-forest);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--heritage-forest);
  color: var(--heritage-forest);
  box-sizing: border-box;
  padding: calc(var(--space-md) - 1px) var(--space-lg);
}

.btn-outline:hover:not(.disabled) {
  background: var(--heritage-sage);
  box-shadow: var(--shadow-md);
}

/* Desktop View Preview Button (Hidden) */
.view-preview-button {
  display: none;
}

/* Desktop Navigation */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #e5e7eb;
}

.navigation-buttons .btn {
  min-width: 120px;
  flex: 1;
  max-width: 48%;
  pointer-events: auto;
}

.btn-full-width {
  width: 100% !important;
  max-width: 100% !important;
}

/* ==========================================
   🎯 CLEAN HERITAGE SUMMARY BOX
   ========================================== */

   /* Checkout Info Box - Desktop */
.checkout-info-box {
  background: linear-gradient(135deg, #f0f9f4 0%, #e8f5ee 100%);
  border: 1px solid rgba(15, 76, 58, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.info-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-title {
  font-weight: 600;
  color: var(--heritage-forest);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--heritage-forest);
  font-weight: 400;
}

.info-list li:last-child {
  margin-bottom: 0;
}

.info-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--heritage-gold);
  font-weight: 600;
  font-size: 0.875rem;
}

.summary-box {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}

.summary-item {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  text-align: left;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px dashed #d1d5db;
}

.summary-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.summary-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  max-width: 45%;
}

.summary-value {
  font-family: 'Inter', sans-serif;
  text-align: right !important;
  font-size: 13px;
  font-weight: 400;
  flex: 1;
  margin-left: var(--space-sm);
  word-wrap: break-word;
}



/* Desktop Social Proof */
.social-proof-section {
  background: #fef7e5;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid #f4d078;
}

.social-proof-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  gap: var(--space-sm);
}

.social-proof-item:last-child {
  margin-bottom: 0;
}

.proof-icon {
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
  display: inline;
  margin-right: var(--space-sm);
  font-size: 1.2rem;
  letter-spacing: 0;
  font-weight: normal;
  color: inherit;
  padding: 0;
}

.proof-text {
  font-family: 'Inter', sans-serif;
  flex: 1;
  color: var(--heritage-forest);
  font-weight: 500;
  line-height: 1.4;
}

.proof-value {
  font-weight: 700;
  color: var(--heritage-forest);
}

/* Desktop Confirmation */
.confirmation-section {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.confirmation-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: 0;
}

.confirmation-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--heritage-forest);
  cursor: pointer;
  flex-shrink: 0;
}

.confirmation-checkbox label {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--heritage-forest);
  font-family: 'Crimson Text', serif;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* Desktop Step Management */
.builder-step {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.builder-step.active {
  display: block;
  opacity: 1;
}

/* Desktop Zoom */
.preview-wrapper.zoomed {
  transform: scale(1.5);
  cursor: grab;
}

.preview-wrapper.zoomed:active {
  cursor: grabbing;
}

/* ==========================================
   🖥️ DESKTOP OVERRIDES - Force Desktop Behavior
   ========================================== */

@media (min-width: 701px) {
  .mobile-step-dots {
    display: none !important;
  }
  
  .step-progress-bar {
    display: block !important;
  }
  
  .step-dots {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  .step-labels {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
  
  .desktop-only {
    display: block !important;
  }
  
  .mobile-only {
    display: none !important;
  }
  
  .form-section,
  .builder-step {
    order: initial !important;
  }
  
  .form-column {
    display: block !important;
    flex-direction: initial !important;
  }
  
  .view-preview-button {
    display: none !important;
  }
}

/* ==========================================
   📱 TABLET BREAKPOINT (1024px)
   ========================================== */

@media (max-width: 1024px) {
  .builder-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .preview-column {
    order: 1;
    justify-content: center;
    min-height: auto;
    padding: var(--space-md);
    margin-top: 0;
  }
  
  .form-column {
    order: 2;
  }
}



/* ==========================================
   🔒 MODAL BODY LOCK & HERITAGE MODALS
   ========================================== */

body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* Heritage Modal System */
.heritage-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 40, 20, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.heritage-modal-overlay.active {
  opacity: 1;
}

.heritage-modal {
  background: var(--heritage-cream);
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  padding: 40px;
  position: relative;
  box-shadow: 0 25px 50px rgba(14, 40, 20, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.heritage-modal-overlay.active .heritage-modal {
  transform: translateY(0);
}

.heritage-modal-compact {
  max-width: 720px;
  padding: 40px;
}

.heritage-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid #e5e7eb;
  color: var(--heritage-forest);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.heritage-modal-close:hover {
  background: var(--heritage-forest);
  color: white;
  transform: rotate(90deg);
}

.heritage-success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.heritage-modal-title {
  font-family: 'Crimson Text', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--heritage-forest);
  text-align: center;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.heritage-modal-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  color: #4b5563;
  text-align: center;
  margin: 0 0 28px;
}

/* Upsell Card */
.heritage-upsell-card {
  background: white;
  border: 2px solid var(--heritage-gold);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.heritage-upsell-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--heritage-gold), #f4d03f);
}

.heritage-upsell-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.heritage-upsell-header h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--heritage-forest);
  margin: 0;
}

.heritage-savings-badge {
  background: var(--heritage-gold);
  color: var(--heritage-forest);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

.heritage-upsell-content {
  text-align: center;
}

.heritage-upsell-text {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #4b5563;
  margin: 0 0 20px;
}

.heritage-social-proof {
  background: var(--heritage-cream);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.heritage-stars {
  color: var(--heritage-gold);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.heritage-story-container {
  text-align: center;
}

.heritage-story-quote {
  font-family: 'Inter', sans-serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--heritage-forest);
  margin: 12px 0 8px;
  line-height: 1.5;
}

.heritage-story-author {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: #4b5563;
  font-weight: 500;
}

.heritage-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1;
}

.heritage-btn-primary {
  background: var(--heritage-forest);
  color: white;
  width: 100%;
}

.heritage-btn-primary:hover {
  background: #0a1f0f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 40, 20, 0.2);
}

.heritage-btn-outline {
  background: white;
  color: var(--heritage-forest);
  border: 2px solid var(--heritage-forest);
}

.heritage-btn-outline:hover {
  background: var(--heritage-forest);
  color: white;
}

.heritage-quick-add {
  margin-bottom: 20px;
}

.heritage-quick-add-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: #374151;
  text-align: center;
  margin: 0 0 12px;
}

.heritage-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.heritage-product-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.heritage-product-card:hover {
  border-color: var(--heritage-gold);
  background: rgba(212, 175, 55, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 40, 20, 0.1);
}

.heritage-product-icon {
  font-size: 1.75rem;
  margin-bottom: 2px;
}

.heritage-product-name {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--heritage-forest);
  line-height: 1.2;
}

.heritage-product-price {
  font-size: 0.813rem;
  color: var(--heritage-gold);
  font-weight: 600;
}

.heritage-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.heritage-letter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.heritage-letter-option {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.heritage-letter-option:hover {
  border-color: var(--heritage-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(14, 40, 20, 0.1);
}

.heritage-letter-option-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.heritage-letter-option h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.25rem;
  color: var(--heritage-forest);
  margin: 0 0 8px;
}

.heritage-letter-option p {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}




/* Date as separate overlay - completely outside letter content */
/* Date as separate overlay - completely outside letter content */
#letterPreview .letter-date-display {
  position: absolute;
  top: -3%;  /* CHANGED from 0% - moves up by about 1 line */
  right: 10%;
  z-index: 1000;
  pointer-events: none;
  text-align: right;
}

.letter-date-display span {
  font-size: 3rem !important; /* Now uses CSS variable */
  color: #2d3748;  /* Match PS text color */
  text-shadow: none; /* Match PS text - no shadow */
  font-weight: 500;
  display: block;
  line-height: 1;
}

/* Allow text selection on letter content */
.letter-content,
.letter-content-inner,
.letter-content-inner p,
.letter-content-inner h3 {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  pointer-events: auto !important;
}

/* Keep date and P.S. non-selectable */
.letter-date-display,
.letter-ps-display,
.envelope-text-overlay {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Font-specific date styling */
.letter-text-overlay.Block .letter-date-display span {
  font-family: 'BlockFont', 'Times New Roman', serif !important;
  font-weight: normal;
  color: #2d3748;
  -webkit-text-stroke: 0.15px #2d3748;
  font-size: 1.8rem; /* Keep Block font at original size */
}

.letter-text-overlay.Fancy .letter-date-display span {
  font-family: 'FancyFont', 'Brush Script MT', cursive !important;
  font-weight: normal;
  color: #2d3748;
  -webkit-text-stroke: 0.08px #2d3748;
  font-size: 2.1rem; /* Increased from default 1.8rem */
}


/* P.S. Message - positioned relative to preview area */
#letterPreview .letter-ps-display {
  position: absolute;
  top: 79.5%;
  left: 8%;    /* Changed from 9.5% to 7% */
  transform: translateX(0) scale(1.0);
  transform-origin: top left;
  width: 84%;  /* Changed from 72% to 85% to match letter content width */
  z-index: 100;
  pointer-events: none;
  text-align: left;
  padding: 0 1rem;
  height: 100px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 10px;
}

.letter-ps-display p {
  margin: 0;
  font-size: var(--letter-ps-size, inherit); /* Now uses CSS variable */
  color: #2d3748;
  line-height: 1.0;  /* Slightly increased from 0.95 */
  text-shadow: none;
  /* Removed flex display to keep text flowing naturally */
}

/* Make P.S. inherit the same font size as letter content */
.letter-text-overlay[style*="font-size"] + .letter-ps-display p {
  font-size: inherit !important;
}

.letter-ps-display.Block p {
  font-family: 'BlockFont', 'Times New Roman', serif !important;
  font-weight: normal;
  -webkit-text-stroke: 0.15px #2d3748;
}

.letter-ps-display.Block p strong {
  font-weight: normal; /* Remove bold from P.S. */
}

.letter-ps-display.Fancy p {
  font-family: 'FancyFont', 'Brush Script MT', cursive !important;
  font-weight: normal;
  -webkit-text-stroke: 0.08px #2d3748;
  line-height: 1.1; /* Tighter line spacing for Fancy font */
  letter-spacing: -0.5px; /* Reduce letter spacing to connect characters better */
}

.letter-ps-display.Fancy p strong {
  font-weight: normal; /* Remove bold from P.S. */
}


/* Hide P.S. when empty */
.letter-ps-display:empty,
.letter-ps-display p:empty {
  display: none;
}

/* Magical Address Modal - Desktop Styles */
.magic-modal-overlay {
  display: none;
  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.7);
  z-index: 2147483647 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.magic-modal-overlay.active {
  display: flex !important;
  align-items: center !important;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.magic-modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  margin: 40px auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative !important;
}

.modal-header {
  background: var(--heritage-forest);
  color: white;
  padding: 20px;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: 'Crimson Text', serif;
  font-size: 20px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 30px;
}

.modal-intro {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.magic-form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.magic-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.magic-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--heritage-forest);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.magic-input {
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  background: var(--heritage-cream);
}

.magic-input:focus {
  outline: none;
  border-color: var(--heritage-gold);
  background: white;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.modal-generate-btn {
  background: var(--heritage-forest);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
  width: 100%;
  box-shadow: 0 3px 10px rgba(20, 48, 42, 0.2);
}

.modal-generate-btn:hover:not(:disabled) {
  background: #1a3d36;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(20, 48, 42, 0.3);
}

.modal-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-generating {
  text-align: center;
  padding: 20px;
  color: var(--heritage-forest);
  font-style: italic;
  font-size: 14px;
}

.modal-preview {
  background: var(--heritage-cream);
  border: 2px solid var(--heritage-gold);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.modal-preview h4 {
  font-family: 'Crimson Text', serif;
  font-size: 18px;
  color: var(--heritage-forest);
  margin: 0 0 12px 0;
  text-align: center;
}

.modal-preview .preview-text {
  background: white;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 16px;
  text-align: center;
  font-style: italic;
}

.preview-actions {
  display: flex;
  gap: 10px;
}

.use-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: var(--heritage-gold);
  color: var(--heritage-forest);
}

.use-btn:hover {
  background: #c4a237;
  transform: translateY(-1px);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Body lock when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Magic Fill Button - Desktop */
.magic-fill-btn {
  background: rgba(250, 247, 242, 0.8);
  border: 2px dashed var(--heritage-gold);
  color: var(--heritage-forest);
  padding: 14px 24px;
  border-radius: 30px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  margin-top: 12px;
}

.magic-fill-btn:hover {
  background: var(--heritage-cream);
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* Ensure step 4 navigation shows on desktop */
.navigation-buttons.step-4-nav {
  display: flex !important;
  position: relative !important;
  bottom: auto !important;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #e5e7eb;
  background: transparent;
  box-shadow: none;
 display: none !important;}
}

/* Ensure the button works on both mobile and desktop */
#nextBtnMobile {
  display: inline-flex !important;
}

/* Magic Address Helper Button - Desktop */
/* Replace .smart-address-helper and .magic-fill-btn with: */
.smart-address-helper {
    margin-top: 12px;
}

.magic-helper-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.magic-icon-button {
    background: var(--heritage-forest);
    border: 2px solid var(--heritage-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.magic-icon-button::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid var(--heritage-gold);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

.desktop-tooltip {
    background: white;
    border: 1px solid var(--heritage-gold);
    color: var(--heritage-forest);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: gentleBounce 2s ease-in-out infinite;
}

/* Arrow pointing to button */
.desktop-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 6px solid var(--heritage-gold);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}


/* Gentle bounce animation */
@keyframes gentleBounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(3px); /* Moves right instead of up */
    }
}


@media (min-width: 701px) {
  #letterPreview .letter-bg-wrapper {
    transform: scale(1.0) !important; /* Increase from the existing 1.15 */
  }
}

/* Hide collapse tooltip on desktop */
@media (min-width: 701px) {
  .collapse-tooltip-wrapper,
  #collapseTooltip {
    display: none !important;
  }
}


/* Special handling for all letters with potentially longer P.S. */
.letter-ps-display {
  max-height: 90px; /* Slightly more room for all letter types */
}

/* ==========================================
   PERSONAL NOTE FROM OWNER - DESKTOP
   ========================================== */

/* Base Owner Note Container */
.owner-note {
  background: linear-gradient(135deg, #fef3c7 0%, #fef7e5 100%);
  border: 1px solid var(--heritage-gold);
  border-radius: var(--radius-lg);
  padding: 20px 24px; /* Compact but comfortable */
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

/* Gold bar at top */
.owner-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--heritage-gold), #f4d03f);
}

/* Close Button */
.owner-note .note-close-btn {
  position: absolute;
  top: 12px !important;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #92400e;
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  border-radius: 50%;
}

.owner-note .note-close-btn:hover {
  color: var(--heritage-forest);
  background: rgba(146, 64, 14, 0.1);
  transform: scale(1.1);
}

/* Content Layout - Inline for desktop efficiency */
.owner-note-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 40px; /* Space for close button */
}

/* Icon - Inline and compact */
.owner-note-icon {
  font-size: 24px;
  color: var(--heritage-gold);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Text Container */
.owner-note-text {
  flex: 1;
}

/* Title Styling - Compact */
.owner-note-text h5 {
  font-family: 'Crimson Text', serif;
  color: var(--heritage-forest);
  margin: 0 0 10px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Subtitle with bullet - All on one line for desktop */
.owner-note-text h5 .owner-subtitle {
  display: inline;
  font-size: 13px;
  font-weight: 400;
  color: var(--heritage-forest);
  opacity: 0.8;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Bullet separator */
.owner-note-text h5 .owner-subtitle::before {
  content: '•';
  margin: 0 6px;
  opacity: 0.6;
}

/* Paragraph Styling - Readable but compact */
.owner-note-text p {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #92400e;
  margin: 0;
  text-align: left;
  padding-left: 0;  /* Reduces left padding */
  padding-right: 0; /* Reduces right padding */
margin-left: -8px;  /* Pulls text more to the left */
margin-right: -8px; /* Pulls text more to the right */
}

/* Optional: Make it even more compact on very wide screens */
@media (min-width: 1200px) {
  .owner-note {
    max-width: 800px; /* Prevent it from getting too wide */
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 701px) {
  .owner-note .note-close-btn {
    top: 16px !important; /* Desktop position */
  }
}

/* ==========================================
   Out Of Stock Swatches
   ========================================== */

/* Enhanced out-of-stock styling - subtle like Shopify */
.colour-swatch.out-of-stock {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  position: relative !important;
}

/* Semi-transparent overlay to grey out the color */
.colour-swatch.out-of-stock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5); /* White overlay at 50% */
  border-radius: 50%;
  pointer-events: none;
}

/* Ensure badge is visible */
.colour-swatch.out-of-stock .colour-swatch-badge {
  opacity: 1 !important;
  background: #dc2626 !important;
  color: white !important;
  font-weight: 600 !important;
  z-index: 1;
  position: relative;
}

/* Remove hover effects for out of stock */
.colour-swatch.out-of-stock:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Example Pills */
.example-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.example-pill {
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.example-pill:hover {
  background: var(--heritage-gold);
  color: white;
  border-color: var(--heritage-gold);
  transform: translateY(-1px);
}

/* Mobile adjustments */
@media (max-width: 700px) {
  .example-pills {
    gap: 6px;
  }
  
  .example-pill {
    font-size: 12px;
    padding: 6px 12px;
    white-space: normal;
    text-align: left;
  }
}

/* Force Fancy font content to end higher to avoid signature */
[data-letter-type="first-christmas"] .letter-text-overlay.Fancy .letter-content-inner {
  padding-bottom: 2.5rem !important; /* Reduced from 4rem */
  max-height: 98% !important; /* Increased from 85% */
}

/* Alternative approach - reduce the height of the content area */
[data-letter-type="first-christmas"] .letter-text-overlay.Fancy .letter-content {
  height: 96% !important; /* Increased from 90% */
}



/* Accessibility: focus-visible outlines for interactive elements */
.colour-swatch:focus-visible,
.selection-card:focus-visible,
.font-card:focus-visible,
.btn:focus-visible,
.magic-pill-badge:focus-visible,
.template-read-link:focus-visible {
  outline: 3px solid rgba(212,175,55,.5);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(212,175,55,.35);
}



/* Utility: visually-hidden (screen-reader only) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

