/* Modern Sign Builder UI - Clean & Contemporary Design */
.jfm-sb { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  width: 100vw;
  max-width: 1800px;
  margin: 0 auto;
}

/* Theme tokens (keep available even if wrapper classes vary) */
.jfm-sb,
#jfm-sign-builder {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --secondary: #f1f5f9;
  --accent: #0d9488;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --bg-card: #ffffff;
  --bg-soft: #f8fafc;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
}

/* Ensure borders and padding don't make elements overflow their grid cells */
.jfm-sb, .jfm-sb * , .jfm-sb *::before, .jfm-sb *::after {
  box-sizing: border-box;
}

#jfm-sign-builder { 
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 6px;
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 6px;
  box-shadow: var(--shadow-lg);
  height: 90vh;
  max-height: 90vh;
  width: 100%;
  /* Allow vertical scrolling so side panels don't get clipped */
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 800px;
}

.jfm-panel { 
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* Make each panel independently scrollable within the fixed-height builder */
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  /* Critical for flex children to allow panel scrolling instead of overflow */
  min-height: 0;
}

.jfm-panel:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.jfm-row { 
  margin-bottom: 12px;
}

.jfm-row:last-child {
  margin-bottom: 0;
}

.jfm-row label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: -0.025em;
}

.jfm-shapes { 
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

.jfm-shape { 
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden; /* keep focus ring visible via outline, not box-shadow overflow */
  aspect-ratio: 1;
}

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

.jfm-shape:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.jfm-shape:hover::before {
  left: 100%;
}

.jfm-shape.active { 
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.05);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.jfm-shape-preview { 
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jfm-shape-preview svg { 
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.jfm-preview { 
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
}

.jfm-preview-header {
  padding: 12px 16px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.jfm-progress-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.jfm-progress-segment {
  flex: 1;
  height: 6px;
  background: #d0d0d0;
  border-radius: 3px;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jfm-progress-segment.active {
  background: var(--primary);
}

.jfm-preview-step-indicator {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.jfm-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(13, 148, 136, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.jfm-preview svg { 
  max-width: 95%;
  max-height: 95%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

#jfm-text { 
  cursor: move;
  transition: opacity 0.2s ease;
}

#jfm-text:hover { 
  opacity: 0.8;
}

.draggable-text { 
  pointer-events: all;
}

.jfm-actions { 
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.jfm-actions-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jfm-actions-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.jfm-actions-amount {
  display: flex;
  align-items: baseline;
}

.jfm-price { 
  font-weight: 800;
  font-size: 24px;
  color: var(--text-primary);
  text-shadow: none;
}

.jfm-actions-each {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 8px;
}

button.jfm-add { 
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

button.jfm-add svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

button.jfm-add::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

button.jfm-add:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button.jfm-add:hover::before {
  opacity: 1;
}

button.jfm-add:active {
  transform: translateY(0);
}

input, select { 
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

input:hover, select:hover {
  border-color: var(--text-secondary);
}

.jfm-image-preview { 
  margin-top: 12px;
  padding: 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}

.jfm-image-controls { 
  margin-top: 12px;
  padding: 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}

.jfm-remove-btn { 
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.jfm-remove-btn:hover { 
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#jfm-image { 
  cursor: move;
  transition: opacity 0.2s ease;
}

#jfm-image:hover { 
  opacity: 0.8;
}

input[type="range"] { 
  flex: 1;
  margin: 0 12px;
  height: 6px;
  border-radius: 3px;
  background: var(--border-light);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
}

#fontSizeValue, #imageSizeValue {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: center;
  background: var(--bg-soft);
  padding: 4px 8px;
  border-radius: 4px;
}

.jfm-panel-controls { 
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--bg-soft) 0%, #ffffff 100%);
  border-radius: 0 0 var(--radius) var(--radius);
}

.jfm-color-grid { 
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin-top: 6px;
  padding: 3px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  max-height: 240px;
  overflow-y: auto;
  /* Avoid overlap with vertical scrollbar */
  scrollbar-gutter: stable both-edges;
}

.jfm-color-option { 
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}

.jfm-color-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.jfm-color-option:hover { 
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.jfm-color-option:hover::before {
  opacity: 1;
}

.jfm-color-option.active { 
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
  transform: translateY(-1px);
}

.jfm-color-preview { 
  width: 28px;
  height: 28px;
  padding: 2px;
  border-radius: var(--radius-sm);
  position: relative;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.jfm-color-bg, .jfm-color-text { 
  width: 100%;
  height: 100%;
  border-radius: 5px;
  display: block;
  margin: 0;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: none;
}

/* Color Section Labels */
.jfm-color-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 12px 0 6px 0;
  padding-left: 2px;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.8;
}

.jfm-color-section-label:first-child {
  margin-top: 0;
}

/* Custom Color Picker Styles */
.jfm-custom-colors {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.jfm-custom-color {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.jfm-custom-color::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.jfm-custom-color:hover {
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-md);
}

.jfm-custom-color:hover::before {
  opacity: 1;
}

.jfm-custom-color.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
  transform: translateY(-1px);
}

/* Textured Backgrounds */
.jfm-textured-backgrounds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin-top: 6px;
  padding: 3px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  max-height: 240px;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

.jfm-textured-bg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  padding: 2px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-soft);
}

.jfm-textured-bg:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.jfm-textured-bg.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
  background: rgba(13, 148, 136, 0.05);
}

.jfm-textured-bg-preview {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.jfm-textured-bg-name {
  font-size: 6px;
  text-align: center;
  color: var(--text-secondary);
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
}

.jfm-loading-backgrounds,
.jfm-no-backgrounds,
.jfm-error {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.jfm-error {
  color: var(--danger);
}

/* Color Type Toggle */
.jfm-color-type-toggle {
  display: flex;
  gap: 4px;
  margin: 8px 0;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.jfm-color-type-btn {
  flex: 1;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.jfm-color-type-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.jfm-color-label { 
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  letter-spacing: -0.025em;
}

/* Enhanced Interactive Elements */
.jfm-section {
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  overflow: visible;
}

.jfm-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.jfm-section-header:hover {
  background: var(--primary);
  color: white;
}

.jfm-section-icon {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

.jfm-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.jfm-section-content {
  padding: 8px;
}

.jfm-section.collapsed .jfm-section-content {
  display: none;
}

.jfm-section-toggle {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.jfm-section.collapsed .jfm-section-toggle {
  transform: rotate(-90deg);
}

/* Improved Form Controls */
.jfm-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.jfm-control-group:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
}

.jfm-control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 70px;
  flex-shrink: 0;
}

.jfm-slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

/* Compact Input Styling */
input[type="text"], input[type="number"], select, textarea {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
}

textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

/* Compact Range Sliders */
input[type="range"] {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Number Input Container */
.jfm-number-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.jfm-number-container input[type="number"] {
  flex: 1;
  min-width: 70px;
  max-width: 90px;
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: all 0.2s ease;
}

.jfm-number-container input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1);
  outline: none;
}

.jfm-number-container input[type="number"]:hover {
  border-color: var(--text-secondary);
}

/* Style the number input spinners - keep them visible and functional */
.jfm-number-container input[type="number"]::-webkit-outer-spin-button,
.jfm-number-container input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: auto;
  margin: 0;
  height: 20px;
  cursor: pointer;
}

/* Custom spinner buttons */
.jfm-number-container {
  position: relative;
}

.jfm-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 25px;
  text-align: left;
  background: var(--bg-soft);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* Remove container padding/margins */
.container {
  padding: 0 !important;
  margin: 0 !important;
}

.elementor-container {
  padding: 0 !important;
  margin: 0 !important;
}

.elementor-section {
  padding: 0 !important;
  margin: 0 !important;
}

.elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* Enhanced Upload Area */
.jfm-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  background: var(--bg-soft);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.jfm-upload-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.jfm-upload-area:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.jfm-upload-area:hover::before {
  opacity: 1;
}

.jfm-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.jfm-upload-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.jfm-upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Loading States */
.jfm-loading {
  position: relative;
  overflow: hidden;
}

.jfm-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shimmer 1.5s infinite;
}

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

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET ONLY
   Desktop layout remains unchanged above 1200px
   ============================================ */

/* Tablet and smaller (1200px and below) */
@media (max-width: 1200px) {
  /* Change to single column stacked layout */
  #jfm-sign-builder {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    height: auto;
    min-height: auto;
    max-height: none;
  }
  
  .jfm-panel {
    max-height: none;
  }
}

/* Tablet Portrait (992px and below) */
@media (max-width: 992px) {
  .jfm-sb {
    padding: 12px;
  }
  
  #jfm-sign-builder {
    padding: 12px;
    gap: 12px;
  }
  
  .jfm-step-content {
    padding: 16px;
  }
}

/* Mobile and Tablet (768px and below) */
@media (max-width: 768px) {
  .jfm-sb {
    width: 100%;
    padding: 8px;
  }
  
  #jfm-sign-builder {
    padding: 8px;
    gap: 12px;
    border-radius: 8px;
  }
  
  .jfm-panel {
    padding: 12px;
    border-radius: 8px;
  }
  
  /* Shape Selection Grid */
  .jfm-shapes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    max-height: none;
    padding: 8px;
  }
  
  .jfm-shape {
    padding: 8px;
    min-height: 60px;
  }
  
  /* Color Grid */
  .jfm-color-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  
  .jfm-color-option {
    border-radius: 6px;
  }
  
  /* Textured Backgrounds */
  .jfm-textured-backgrounds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  
  /* Step Navigation */
  .jfm-step-nav {
    gap: 8px;
    padding: 12px;
  }
  
  .jfm-step-btn {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 12px;
  }
  
  /* Form Controls */
  .jfm-row label {
    font-size: 13px;
  }
  
  input[type="number"],
  input[type="text"],
  textarea,
  select {
    font-size: 14px;
    padding: 10px;
  }
  
  /* Step Header */
  .jfm-step-header h2 {
    font-size: 18px;
  }
  
  .jfm-step-indicator {
    font-size: 12px;
  }
}

/* Mobile Portrait (576px and below) */
@media (max-width: 576px) {
  .jfm-sb {
    padding: 4px;
  }
  
  #jfm-sign-builder {
    padding: 6px;
    gap: 8px;
  }
  
  .jfm-panel {
    padding: 10px;
  }
  
  /* Shape Selection - 3 columns on small phones */
  .jfm-shapes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
  }
  
  .jfm-shape {
    padding: 6px;
    min-height: 50px;
  }
  
  /* Color Grid - 3 columns */
  .jfm-color-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  
  .jfm-color-option {
    border-radius: 6px;
  }
  
  .jfm-color-label {
    font-size: 10px;
    padding: 2px 4px;
  }
  
  /* Textured Backgrounds */
  .jfm-textured-backgrounds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  
  /* Step Navigation - Stack buttons */
  .jfm-step-nav {
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }
  
  .jfm-step-btn {
    width: 100%;
    padding: 8px 16px;
    border-radius: 12px;
  }
  
  /* Step Header */
  .jfm-step-header {
    padding: 12px;
  }
  
  .jfm-step-header h2 {
    font-size: 16px;
  }
  
  .jfm-step-indicator {
    font-size: 11px;
  }
  
  .jfm-step-content {
    padding: 12px;
  }
  
  /* Preview */
  #preview {
    min-height: 200px;
    padding: 8px;
  }
  
  /* Info Panel */
  .jfm-selection-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px;
  }
  
  .jfm-selection-label {
    font-size: 11px;
  }
  
  .jfm-selection-value {
    font-size: 12px;
    width: 100%;
  }
}

/* Extra Small Mobile (375px and below) */
@media (max-width: 375px) {
  /* Shape Selection - 2 columns on very small phones */
  .jfm-shapes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  
  .jfm-shape {
    padding: 8px;
    min-height: 60px;
  }
  
  /* Color Grid - 2 columns */
  .jfm-color-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  
  .jfm-color-option {
    border-radius: 6px;
  }
  
  /* Textured Backgrounds - single column */
  .jfm-textured-backgrounds {
    grid-template-columns: 1fr;
  }
}

/* Accessibility Improvements */
.jfm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
.jfm-shape:focus,
.jfm-color-option:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Enhanced Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* Step Navigation Styles */
.jfm-stepper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.jfm-step {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.jfm-step.active {
  display: flex;
}

.jfm-step-section .jfm-section-header {
  cursor: default;
  pointer-events: none;
}

.jfm-step-section .jfm-section-content {
  max-height: none;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.jfm-step-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 2px solid var(--border-light);
  background: var(--bg-card);
  border-radius: 0 0 var(--radius) var(--radius);
}

.jfm-step-indicator {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding: 8px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}

.jfm-step-buttons {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.jfm-step-btn {
  flex: 1;
  padding: 8px 20px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.jfm-step-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.jfm-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.jfm-step-btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.jfm-step-btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Info Panel - Current Selection Summary */
.jfm-panel-info {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-soft) 100%);
}

.jfm-info-section {
  padding: 12px;
}

.jfm-info-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.025em;
}

.jfm-current-selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jfm-selection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.jfm-selection-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   THEME REFRESH - MARCH 2026
   ============================================ */

.jfm-sb,
#jfm-sign-builder {
  --jfm-theme-bg: #08111f;
  --jfm-theme-bg-soft: #0f172a;
  --jfm-theme-panel: rgba(15, 23, 42, 0.76);
  --jfm-theme-panel-light: rgba(255, 255, 255, 0.78);
  --jfm-theme-card: rgba(15, 23, 42, 0.62);
  --jfm-theme-card-light: rgba(255, 255, 255, 0.08);
  --jfm-theme-border: rgba(148, 163, 184, 0.18);
  --jfm-theme-border-strong: rgba(16, 185, 129, 0.35);
  --jfm-theme-text: #e2e8f0;
  --jfm-theme-muted: #94a3b8;
  --jfm-theme-dark-text: #0f172a;
  --jfm-theme-accent: #10b981;
  --jfm-theme-accent-strong: #059669;
  --jfm-theme-shadow: 0 28px 70px rgba(2, 8, 23, 0.34);
  --jfm-theme-radius: 28px;
  --jfm-theme-radius-md: 20px;
  --jfm-theme-radius-sm: 16px;
}

.jfm-sb {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 18px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #eef4ff 0%, #dbeafe 18%, #eff6ff 42%, #ecfeff 100%);
  border-radius: 26px;
}

.jfm-sb::before,
.jfm-sb::after {
  content: none;
}

#jfm-sign-builder {
  position: relative;
  display: grid;
  grid-template-columns: minmax(224px, 256px) minmax(0, 1fr) minmax(208px, 256px);
  gap: 18px;
  min-height: 680px;
  height: auto;
  max-height: none;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

#jfm-sign-builder .jfm-panel {
  position: relative;
  padding: 18px;
  border-radius: var(--jfm-theme-radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66));
  box-shadow: var(--jfm-theme-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

#jfm-sign-builder .jfm-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 32%);
  pointer-events: none;
}

#jfm-sign-builder .jfm-panel-sidebar,
#jfm-sign-builder .jfm-panel-info {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.72));
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--jfm-theme-text);
}

#jfm-sign-builder .jfm-panel-stage {
  padding: 14px;
}

.jfm-sidebar-header,
.jfm-info-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.jfm-sidebar-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #d1fae5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.jfm-sidebar-title,
.jfm-info-header h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.jfm-stepper {
  position: relative;
  z-index: 1;
  gap: 14px;
}

.jfm-step-section {
  background: transparent;
  border: 0;
  margin: 0;
}

.jfm-step-section .jfm-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 10px;
  background: transparent;
  border: 0;
}

.jfm-step-section .jfm-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.jfm-step-section .jfm-section-title {
  color: #f8fafc;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.jfm-step-section .jfm-section-content {
  padding: 0;
}

.jfm-shapes,
.jfm-color-grid,
.jfm-textured-backgrounds,
.jfm-custom-colors {
  padding: 6px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.jfm-shapes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
}

.jfm-shape,
.jfm-color-option,
.jfm-textured-bg {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.jfm-shape {
  padding: 5px;
  min-height: 48px;
}

.jfm-shape:hover,
.jfm-color-option:hover,
.jfm-textured-bg:hover,
.jfm-custom-color:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 18px rgba(8, 15, 30, 0.1);
}

.jfm-shape.active,
.jfm-color-option.active,
.jfm-textured-bg.active,
.jfm-custom-color.active {
  border-color: rgba(16, 185, 129, 0.95);
  background: rgba(16, 185, 129, 0.14);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.22);
}

.jfm-shape-preview svg {
  width: 100%;
  height: 100%;
}

.jfm-shape-preview svg * {
  fill: rgba(226, 232, 240, 0.78);
  stroke: rgba(226, 232, 240, 0.78);
}

.jfm-shape.active .jfm-shape-preview svg * {
  fill: #10b981;
  stroke: #10b981;
}

.jfm-control-group,
.jfm-row,
.jfm-image-preview,
.jfm-image-controls {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.jfm-row label,
.jfm-control-label,
.jfm-color-section-label {
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.jfm-row label {
  margin-bottom: 10px;
}

.jfm-color-section-label {
  margin: 0 0 10px;
  padding-left: 2px;
}

.jfm-control-group {
  display: grid;
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.jfm-control-group:hover {
  box-shadow: none;
  border-color: rgba(16, 185, 129, 0.28);
}

.jfm-sb input,
.jfm-sb select,
.jfm-sb textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.32);
  color: #f8fafc;
  font-size: 13px;
}

.jfm-sb input::placeholder,
.jfm-sb textarea::placeholder {
  color: #94a3b8;
}

.jfm-sb input:focus,
.jfm-sb select:focus,
.jfm-sb textarea:focus {
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.jfm-sb input[type="checkbox"] {
  width: auto;
  accent-color: #10b981;
}

.jfm-slider-container,
.jfm-number-container {
  min-width: 0;
}

.jfm-number-container input[type="number"] {
  max-width: none;
}

#fontSize {
  background: rgba(15, 23, 42, 0.32);
  color: #f8fafc;
}

.jfm-unit {
  color: #cbd5e1;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.jfm-custom-colors {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.jfm-custom-color {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
}


.jfm-color-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jfm-textured-backgrounds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jfm-color-option,
.jfm-textured-bg {
  padding: 12px;
}

.jfm-color-option {
  padding: 12px;
}

.jfm-color-preview,
.jfm-textured-bg-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.08);
}

.jfm-color-bg,
.jfm-color-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: -0.04em;
}

.jfm-color-text {
  text-transform: none;
}

.jfm-textured-bg-name {
  margin-top: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #cbd5e1;
}

.jfm-step-footer {
  margin-top: 14px;
  padding: 14px 0 0;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
}

.jfm-step-indicator {
  margin-bottom: 10px;
  padding: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.jfm-step-buttons {
  gap: 10px;
}

.jfm-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.jfm-step-btn:hover:not(:disabled) {
  border-color: rgba(16, 185, 129, 0.44);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.jfm-step-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  box-shadow: none;
}

.jfm-step-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #14b88a 0%, #047857 100%);
}

.jfm-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.jfm-btn-icon {
  font-size: 14px;
  line-height: 1;
}

.jfm-preview-header {
  padding: 14px 18px 12px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.78));
}

.jfm-preview-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.jfm-preview-step-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(226, 232, 240, 0.5);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jfm-preview-step-number {
  color: rgba(226, 232, 240, 0.38);
  font-size: 9px;
}

.jfm-preview-step-label.is-active,
.jfm-preview-step-label.is-complete {
  color: #d1fae5;
}

.jfm-preview-step-label.is-active .jfm-preview-step-number,
.jfm-preview-step-label.is-complete .jfm-preview-step-number {
  color: #10b981;
}

.jfm-progress-bar {
  gap: 8px;
  margin-bottom: 8px;
}

.jfm-progress-segment {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.jfm-progress-segment.active {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  box-shadow: none;
}

.jfm-preview-step-indicator {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.jfm-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  margin-bottom: 0;
  border: 0;
  border-radius: 0 0 18px 18px;
  background-color: #e5e7eb;
  background-image: radial-gradient(circle at 2px 2px, rgba(15, 23, 42, 0.14) 1px, transparent 0);
  background-size: 30px 30px;
  overflow: hidden;
}

.jfm-preview::before {
  content: none;
}

.jfm-preview > svg {
  width: min(88%, 640px);
  height: auto;
  filter: none;
}

.jfm-actions {
  margin-top: 14px;
  padding: 16px 18px;
  border-top: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82));
}

.jfm-actions-label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.jfm-price {
  color: #f8fafc;
  font-size: 28px;
  line-height: 1;
}

.jfm-actions-each {
  color: #94a3b8;
}

.jfm-add {
  padding: 13px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: none;
}

.jfm-add:hover {
  box-shadow: none;
}

.jfm-info-section {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.jfm-current-selection {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jfm-selection-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.jfm-selection-label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.jfm-selection-body,
.jfm-selection-value-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jfm-selection-value-wrap {
  justify-content: flex-start;
  min-width: 0;
}

.jfm-selection-value {
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.3;
  font-size: 14px;
  word-break: break-word;
}

.jfm-selection-swatch {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.jfm-selection-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1fae5;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.jfm-selection-link:hover {
  color: #ffffff;
  text-decoration: none;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  transform: none;
}

.jfm-selection-link:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.9);
  outline-offset: 2px;
}

.jfm-offer-card {
  position: relative;
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ecfdf5;
  overflow: hidden;
}

.jfm-offer-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jfm-offer-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

.jfm-offer-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.jfm-offer-copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.92;
}

.jfm-offer-mark {
  position: absolute;
  right: 12px;
  bottom: -12px;
  font-size: 100px;
  line-height: 1;
  opacity: 0.14;
}

.jfm-loading-backgrounds,
.jfm-no-backgrounds,
.jfm-error {
  color: #cbd5e1;
}

.jfm-error {
  color: #fca5a5;
}

@media (max-width: 1280px) {
  #jfm-sign-builder {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  #jfm-sign-builder .jfm-panel-info {
    grid-column: 1 / -1;
  }

  .jfm-info-section {
    gap: 18px;
  }

  .jfm-current-selection {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .jfm-sb {
    padding: 14px;
    border-radius: 24px;
  }

  #jfm-sign-builder {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #jfm-sign-builder .jfm-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .jfm-preview {
    min-height: 440px;
  }

  .jfm-current-selection {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .jfm-preview-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jfm-preview-step-label:nth-child(4),
  .jfm-preview-step-label:nth-child(5) {
    display: none;
  }

  .jfm-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .jfm-add {
    width: 100%;
    justify-content: center;
  }

  .jfm-control-group {
    grid-template-columns: 1fr;
  }

  .jfm-current-selection {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .jfm-sb {
    padding: 8px;
    border-radius: 20px;
  }

  #jfm-sign-builder .jfm-panel {
    padding: 14px;
  }

  .jfm-shapes,
  .jfm-color-grid,
  .jfm-textured-backgrounds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jfm-custom-colors {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .jfm-step-buttons {
    flex-direction: column;
  }

  .jfm-preview {
    min-height: 320px;
  }

  .jfm-price {
    font-size: 28px;
  }
}

.jfm-selection-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.jfm-selection-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 4px 8px;
  background: var(--bg-soft);
  border-radius: 4px;
}

/* Final cascade guard for refreshed summary theme */
.jfm-panel-info .jfm-selection-label {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.jfm-panel-info .jfm-selection-value {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 15px;
  font-weight: 700;
}

.jfm-panel-info .jfm-selection-body,
.jfm-panel-info .jfm-selection-value-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Full-bleed desktop layout: escape the theme's narrow content column. */
@media (min-width: 981px) {
  .jfm-sb {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    margin-right: 0;
    padding-left: clamp(18px, 3vw, 48px);
    padding-right: clamp(18px, 3vw, 48px);
  }

  /* Keep the fixed-width sidebar navigation inside its panel on desktop. */
  #jfm-sign-builder .jfm-step-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
  }

  #jfm-sign-builder .jfm-step-btn {
    width: 100%;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    gap: 4px;
    white-space: nowrap;
  }
}

#jfm-sign-builder .jfm-stage-offer-card {
  flex: 0 0 auto;
  margin: 14px 0;
}

/* Sign Builder hero: intentionally scoped to shortcode-rendered builders. */
.jfm-sb .jfm-builder-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  margin: 0 0 18px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(52, 211, 153, 0.2), transparent 26%),
    linear-gradient(124deg, #071322 0%, #0d2530 52%, #075443 100%);
  box-shadow: 0 28px 70px rgba(2, 8, 23, 0.26);
  color: #f8fafc;
}

.jfm-sb .jfm-builder-hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  right: -190px;
  bottom: -340px;
  border: 1px solid rgba(167, 243, 208, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(167, 243, 208, 0.04), 0 0 0 68px rgba(167, 243, 208, 0.025);
  pointer-events: none;
}

.jfm-sb .jfm-builder-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.24;
  background-image: radial-gradient(rgba(167, 243, 208, 0.45) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 52%, #000 100%);
  pointer-events: none;
}

.jfm-sb .jfm-builder-hero__content,
.jfm-sb .jfm-builder-hero__steps {
  position: relative;
  z-index: 1;
}

.jfm-sb .jfm-builder-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.jfm-sb .jfm-builder-hero__eyebrow-mark {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.14), 0 0 18px rgba(52, 211, 153, 0.7);
}

.jfm-sb .jfm-builder-hero h2 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.jfm-sb .jfm-builder-hero__copy {
  max-width: 640px;
  margin: 20px 0 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.6;
}

.jfm-sb .jfm-builder-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 28px;
}

.jfm-sb .jfm-builder-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid rgba(167, 243, 208, 0.12);
  border-radius: 14px;
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 12px 26px rgba(4, 120, 87, 0.24);
  color: #052e24;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.jfm-sb .jfm-builder-hero__cta:hover {
  color: #022c22;
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(4, 120, 87, 0.34);
  text-decoration: none;
}

.jfm-sb .jfm-builder-hero__cta:focus-visible {
  outline: 3px solid rgba(167, 243, 208, 0.95);
  outline-offset: 3px;
}

.jfm-sb .jfm-builder-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d1fae5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.jfm-sb .jfm-builder-hero__status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.12);
}

.jfm-sb .jfm-builder-hero__steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jfm-sb .jfm-builder-hero__steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  position: relative;
  padding: 16px 0 16px 18px;
  border-left: 1px solid rgba(167, 243, 208, 0.24);
}

.jfm-sb .jfm-builder-hero__steps li:first-child {
  padding-top: 0;
}

.jfm-sb .jfm-builder-hero__steps li:last-child {
  padding-bottom: 0;
}

.jfm-sb .jfm-builder-hero__step-number {
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.jfm-sb .jfm-builder-hero__steps strong,
.jfm-sb .jfm-builder-hero__steps small {
  display: block;
}

.jfm-sb .jfm-builder-hero__steps strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.jfm-sb .jfm-builder-hero__steps small {
  margin-top: 3px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .jfm-sb .jfm-builder-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .jfm-sb .jfm-builder-hero__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .jfm-sb .jfm-builder-hero__steps li,
  .jfm-sb .jfm-builder-hero__steps li:first-child,
  .jfm-sb .jfm-builder-hero__steps li:last-child {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 0 0 0 14px;
  }
}

@media (max-width: 560px) {
  .jfm-sb .jfm-builder-hero {
    margin-bottom: 12px;
    padding: 24px 20px;
    border-radius: 22px;
  }

  .jfm-sb .jfm-builder-hero__eyebrow {
    font-size: 9px;
    letter-spacing: 0.13em;
  }

  .jfm-sb .jfm-builder-hero h2 {
    font-size: clamp(31px, 11vw, 46px);
  }

  .jfm-sb .jfm-builder-hero__copy {
    margin-top: 16px;
    font-size: 15px;
  }

  .jfm-sb .jfm-builder-hero__actions {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 22px;
  }

  .jfm-sb .jfm-builder-hero__cta {
    width: 100%;
  }

  .jfm-sb .jfm-builder-hero__steps {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .jfm-sb .jfm-builder-hero__steps li,
  .jfm-sb .jfm-builder-hero__steps li:first-child,
  .jfm-sb .jfm-builder-hero__steps li:last-child {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 0 0 0 12px;
  }
}
