/* ═══════════════════════════════════════════════════════════════
   DL Premium Upgrade — Component Styles
   Namespaced under .dl-premium-* to avoid conflicts
   ═══════════════════════════════════════════════════════════════ */

/* ─── Premium Section Container ─── */
.dl-premium-section {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  max-width: 900px;
  margin: 32px auto;
  padding: 0 16px;
}

/* For tabbed pages — tabs added to existing tab bar */
.dl-premium-tab-btn {
  padding: 16px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6366f1;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  position: relative;
}
.dl-premium-tab-btn::before {
  content: '★';
  margin-right: 6px;
  font-size: 0.75rem;
}
.dl-premium-tab-btn:hover {
  color: #4f46e5;
  background: #f5f3ff;
}
.dl-premium-tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  background: #fff;
}

/* For sidebar pages — collapsible panel */
.dl-premium-sidebar-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  margin-top: 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.dl-premium-sidebar-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.dl-premium-sidebar-trigger .arrow {
  margin-left: auto;
  transition: transform 0.2s;
}
.dl-premium-sidebar-trigger.open .arrow {
  transform: rotate(180deg);
}

/* ─── Premium Panel (shared across layouts) ─── */
.dl-premium-panel {
  background: #ffffff;
  border: 2px solid #e0e7ff;
  border-radius: 14px;
  overflow: hidden;
  margin: 24px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.dl-premium-panel-header {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
  padding: 20px 24px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.dl-premium-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-premium-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dl-premium-panel-nav {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dl-premium-panel-nav button {
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dl-premium-panel-nav button:hover {
  color: #4f46e5;
  background: #f5f3ff;
}
.dl-premium-panel-nav button.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  background: white;
}
.dl-premium-panel-body {
  padding: 24px;
}
.dl-premium-panel-tab {
  display: none;
}
.dl-premium-panel-tab.active {
  display: block;
}

/* ─── Calculator Styles ─── */
.dl-premium-calc {
  max-width: 640px;
}
.dl-premium-calc-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-premium-calc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dl-premium-calc-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dl-premium-calc-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dl-premium-calc-group input,
.dl-premium-calc-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}
.dl-premium-calc-group input:focus,
.dl-premium-calc-group select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.dl-premium-calc-group .hint {
  font-size: 0.78rem;
  color: #6b7280;
}
.dl-premium-calc-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  margin-top: 4px;
}
.dl-premium-calc-btn:hover {
  background: #4338ca;
}

/* HelpTip */
.dl-premium-helptip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}
.dl-premium-helptip:hover .dl-premium-helptip-text {
  display: block;
}
.dl-premium-helptip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 400;
  white-space: normal;
  width: 220px;
  line-height: 1.4;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.dl-premium-helptip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

/* Calculator Results */
.dl-premium-calc-results {
  background: #f0fdf4;
  border: 2px solid #22c55e;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}
.dl-premium-calc-results.hidden {
  display: none;
}
.dl-premium-calc-results-title {
  font-size: 1rem;
  font-weight: 700;
  color: #166534;
  margin: 0 0 12px;
}
.dl-premium-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #dcfce7;
  font-size: 0.9rem;
}
.dl-premium-calc-row:last-child {
  border-bottom: none;
}
.dl-premium-calc-row.total {
  border-top: 2px solid #22c55e;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #166534;
}
.dl-premium-calc-row-label {
  color: #374151;
}
.dl-premium-calc-row-value {
  font-weight: 600;
  color: #1e40af;
}
.dl-premium-calc-row.total .dl-premium-calc-row-value {
  color: #166534;
}
/* Expandable row explanation */
.dl-premium-calc-row-expand {
  cursor: pointer;
}
.dl-premium-calc-row-expand:hover {
  background: #ecfdf5;
}
.dl-premium-calc-row-detail {
  font-size: 0.8rem;
  color: #6b7280;
  padding: 0 0 8px 8px;
  border-bottom: 1px solid #dcfce7;
  display: none;
  line-height: 1.5;
}
.dl-premium-calc-row-detail.open {
  display: block;
}

/* Smart Insights */
.dl-premium-calc-insights {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}
.dl-premium-calc-insights-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dl-premium-calc-insight {
  font-size: 0.85rem;
  color: #374151;
  padding: 6px 0;
  line-height: 1.5;
  display: flex;
  gap: 8px;
}
.dl-premium-calc-insight::before {
  content: '💡';
  flex-shrink: 0;
}

/* ─── Generator / Sample Language Styles ─── */
.dl-premium-generator {
  max-width: 720px;
}
.dl-premium-gen-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.dl-premium-gen-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dl-premium-gen-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}
.dl-premium-gen-group input,
.dl-premium-gen-group select,
.dl-premium-gen-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}
.dl-premium-gen-group textarea {
  min-height: 80px;
  resize: vertical;
}
.dl-premium-gen-group input:focus,
.dl-premium-gen-group select:focus,
.dl-premium-gen-group textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.dl-premium-gen-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) {
  .dl-premium-gen-row {
    grid-template-columns: 1fr;
  }
}
.dl-premium-gen-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e40af;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
}
.dl-premium-gen-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}
.dl-premium-gen-btn:hover {
  background: #4338ca;
}

/* Preview container */
.dl-premium-preview {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-top: 20px;
  overflow: hidden;
}
.dl-premium-preview-header {
  background: #f8fafc;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5e7eb;
}
.dl-premium-preview-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
}
.dl-premium-preview-actions {
  display: flex;
  gap: 8px;
}
.dl-premium-preview-actions button {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.dl-premium-copy-btn {
  background: #e5e7eb;
  color: #374151;
}
.dl-premium-copy-btn:hover {
  background: #4f46e5;
  color: white;
}
.dl-premium-download-btn {
  background: #4f46e5;
  color: white;
}
.dl-premium-download-btn:hover {
  background: #4338ca;
}
.dl-premium-download-btn:disabled,
.dl-premium-copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.dl-premium-preview-body {
  padding: 32px;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #1f2937;
  position: relative;
  min-height: 200px;
}

/* Watermark overlay for free mode */
.dl-premium-preview-body.watermarked {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.dl-premium-preview-body.watermarked::after {
  content: 'PREVIEW — Unlock for $19.95';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(99, 102, 241, 0.08);
  white-space: nowrap;
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
  z-index: 10;
}

/* ─── Evidence Checklist ─── */
.dl-premium-checklist {
  max-width: 640px;
}
.dl-premium-checklist-title {
  font-size: 1rem;
  font-weight: 700;
  color: #166534;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-premium-checklist-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dl-premium-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.dl-premium-checklist-item:last-child {
  border-bottom: none;
}
.dl-premium-check {
  width: 22px;
  height: 22px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 2px;
  background: white;
}
.dl-premium-check:hover {
  border-color: #22c55e;
}
.dl-premium-check.checked {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}
.dl-premium-check-label {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
}
.dl-premium-check-label strong {
  display: block;
  color: #111827;
}
.dl-premium-check-label .detail {
  font-size: 0.8rem;
  color: #6b7280;
}
.dl-premium-checklist-progress {
  background: #f3f4f6;
  border-radius: 8px;
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
}
.dl-premium-checklist-progress-bar {
  height: 100%;
  background: #22c55e;
  border-radius: 8px;
  transition: width 0.3s;
  width: 0%;
}

/* ─── Legal Basis Panel ─── */
.dl-premium-legal {
  max-width: 640px;
}
.dl-premium-legal-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0 0 16px;
}
.dl-premium-statute {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.dl-premium-statute-code {
  font-weight: 700;
  color: #4f46e5;
  font-size: 0.9rem;
}
.dl-premium-statute-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
  margin-top: 2px;
}
.dl-premium-statute-desc {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 6px;
  line-height: 1.5;
}
.dl-premium-statute-penalty {
  font-size: 0.82rem;
  color: #dc2626;
  font-weight: 600;
  margin-top: 6px;
}

/* ─── Paywall Modal ─── */
.dl-premium-paywall-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dl-premium-paywall-modal {
  background: white;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.dl-premium-paywall-header {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
  padding: 24px;
  border-radius: 16px 16px 0 0;
  color: white;
  text-align: center;
}
.dl-premium-paywall-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 4px;
}
.dl-premium-paywall-header p {
  font-size: 0.85rem;
  color: #c7d2fe;
  margin: 0;
}
.dl-premium-paywall-body {
  padding: 24px;
}
.dl-premium-paywall-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}
.dl-premium-paywall-features li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-premium-paywall-features li::before {
  content: '✓';
  color: #22c55e;
  font-weight: 700;
}
.dl-premium-paywall-price {
  text-align: center;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 20px;
}
.dl-premium-paywall-price .amount {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
}
.dl-premium-paywall-price .period {
  font-size: 0.85rem;
  color: #64748b;
  display: block;
}
.dl-premium-paywall-paypal {
  min-height: 55px;
}
.dl-premium-paywall-alt {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: #64748b;
}
.dl-premium-paywall-alt a {
  color: #4f46e5;
  text-decoration: underline;
}
.dl-premium-paywall-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
}
.dl-premium-paywall-close:hover {
  color: white;
}

/* ─── Unlock Banner (shown on paid features before payment) ─── */
.dl-premium-unlock-banner {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.dl-premium-unlock-text {
  font-size: 0.9rem;
  font-weight: 500;
}
.dl-premium-unlock-text strong {
  font-weight: 700;
}
.dl-premium-unlock-btn {
  background: white;
  color: #4f46e5;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.dl-premium-unlock-btn:hover {
  background: #f5f3ff;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   GOLD-STANDARD GENERATOR — Split-Pane Live Preview Layout
   Uses .dlg-* namespace (demand letter generator)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Builder Container ─── */
.dlg-builder {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ─── Split-Pane Layout ─── */
.dlg-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  min-height: 600px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

/* ─── Sidebar (form) ─── */
.dlg-sidebar {
  background: #f8fafc;
  border-right: 2px solid #e5e7eb;
  position: sticky;
  top: 52px;
  max-height: calc(100vh - 52px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.dlg-sidebar-inner {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── Form Fields ─── */
.dlg-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid #e5e7eb;
}
.dlg-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dlg-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}
.dlg-input {
  width: 100%;
  padding: 9px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 7px;
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
  box-sizing: border-box;
}
.dlg-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.dlg-textarea {
  min-height: 70px;
  resize: vertical;
}
.dlg-hint {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}
.dlg-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dlg-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
}
.dlg-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* ─── Preview Panel ─── */
.dlg-preview-panel {
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

/* ─── Toolbar ─── */
.dlg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f1f5f9;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 5;
}
.dlg-toolbar-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dlg-toolbar-actions {
  display: flex;
  gap: 8px;
}

/* ─── Toolbar Buttons ─── */
.dlg-btn {
  padding: 7px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}
.dlg-btn-secondary {
  background: #e5e7eb;
  color: #374151;
}
.dlg-btn-secondary:hover {
  background: #4f46e5;
  color: white;
}
.dlg-btn-primary {
  background: #4f46e5;
  color: white;
}
.dlg-btn-primary:hover {
  background: #4338ca;
}
.dlg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Document Container ─── */
.dlg-doc-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.dlg-doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dlg-doc-title { color: #e2e8f0; }
.dlg-doc-status {
  background: #22c55e;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  animation: dlg-pulse 2s infinite;
}
@keyframes dlg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ─── Document Body (the actual letter preview) ─── */
.dlg-doc-body {
  flex: 1;
  padding: 40px 48px;
  font-family: 'Georgia', 'Times New Roman', 'Garamond', serif;
  font-size: 12pt;
  line-height: 1.8;
  color: #1f2937;
  overflow-y: auto;
  position: relative;
}
.dlg-doc-body h1 {
  text-align: center;
  font-size: 16pt;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 5px;
  color: #111827;
}
.dlg-doc-body h2 {
  font-size: 13pt;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 28px 0 5px;
  text-align: center;
  color: #111827;
}
.dlg-doc-body h3 {
  font-size: 12pt;
  font-weight: bold;
  margin: 18px 0 8px;
  color: #111827;
}
.dlg-doc-body h4 {
  font-size: 11pt;
  font-weight: bold;
  margin: 14px 0 6px;
  color: #374151;
}
.dlg-doc-body p {
  margin: 0 0 12px;
  text-align: justify;
}
.dlg-doc-body ul, .dlg-doc-body ol {
  margin: 12px 0 12px 20px;
  padding-left: 15px;
}
.dlg-doc-body li {
  margin-bottom: 8px;
}
.dlg-doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 11pt;
}
.dlg-doc-body table th,
.dlg-doc-body table td {
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  text-align: left;
}
.dlg-doc-body table th {
  background: #f3f4f6;
  font-weight: 600;
  font-size: 10pt;
  text-transform: uppercase;
}

/* ─── Highlighted Fields (contenteditable spans) ─── */
.dlg-doc-body .doc-highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 1px 5px;
  border-radius: 3px;
  border-bottom: 2px solid #f59e0b;
  font-weight: 600;
  cursor: text;
  transition: background 0.2s;
}
.dlg-doc-body .doc-highlight:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}
.dlg-doc-body .doc-highlight.empty {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-bottom-color: #ef4444;
  color: #dc2626;
}

/* ─── Scroll-to-view highlight flash ─── */
@keyframes dlgFieldFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.35); }
}
.dlg-field-flash {
  animation: dlgFieldFlash 0.6s ease-out !important;
}

/* ─── Watermark (free mode) ─── */
.dlg-watermarked {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}
.dlg-watermarked::after {
  content: 'PREVIEW — Unlock for $19.95';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(99, 102, 241, 0.08);
  white-space: nowrap;
  pointer-events: none;
  font-family: 'Inter', system-ui, sans-serif;
  z-index: 10;
}

/* ─── Signature Block ─── */
.dlg-doc-body .doc-signature-block {
  margin-top: 40px;
  page-break-inside: avoid;
}
.dlg-doc-body .doc-signature-line {
  display: flex;
  align-items: flex-end;
  margin-bottom: 8px;
  min-height: 35px;
}
.dlg-doc-body .doc-signature-line .sig-label {
  width: 80px;
  font-size: 10pt;
  color: #6b7280;
}
.dlg-doc-body .doc-signature-line .sig-value {
  flex: 1;
  border-bottom: 1px solid #333;
  min-height: 30px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .dl-premium-panel-body {
    padding: 16px;
  }
  .dl-premium-panel-nav button {
    padding: 10px 14px;
    font-size: 0.8rem;
  }
  .dl-premium-preview-body {
    padding: 20px;
  }
  .dl-premium-preview-body.watermarked::after {
    font-size: 1.5rem;
  }
  .dl-premium-calc-row,
  .dl-premium-checklist-item {
    font-size: 0.85rem;
  }
  .dl-premium-unlock-banner {
    flex-direction: column;
    text-align: center;
  }

  /* Generator responsive */
  .dlg-layout {
    grid-template-columns: 1fr;
  }
  .dlg-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 2px solid #e5e7eb;
  }
  .dlg-doc-body {
    padding: 24px 20px;
  }
  .dlg-watermarked::after {
    font-size: 1.4rem;
  }
  .dlg-toolbar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .dlg-toolbar-actions {
    justify-content: center;
  }
}

/* ─── Print ─── */
@media print {
  .dlg-sidebar, .dlg-toolbar, .dlg-doc-header, .dl-premium-unlock-banner { display: none !important; }
  .dlg-layout { display: block; }
  .dlg-doc-body { padding: 0.5in; }
  .dlg-doc-body .doc-highlight { background: none !important; border: none !important; padding: 0 !important; }
}
