/**
 * Loop Menu — Calculator CRO Styles v1.0
 * ========================================
 * Shared stylesheet for all calculator consulting panels.
 * Does NOT conflict with existing per-page styles.
 * Uses .lm- prefix namespace throughout.
 */

/* ─── Trust Strip ────────────────────────────────────────────────────────────── */

.lm-trust-strip {
  background: linear-gradient(135deg, #f0f4ff 0%, #f8faff 100%);
  border-bottom: 1px solid #e8eeff;
  padding: 1.25rem 0;
}
.lm-trust-strip__inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.lm-trust-strip__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4b5563;
  margin-bottom: 1rem;
}
.lm-trust-strip__testimonials {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.lm-testimonial {
  background: #fff;
  border: 1px solid #e8eeff;
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  text-align: left;
  max-width: 280px;
  min-width: 220px;
}
.lm-testimonial__stars {
  color: #f59e0b;
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
}
.lm-testimonial__text {
  font-size: 0.825rem;
  color: #374151;
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 0.3rem;
}
.lm-testimonial__author {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
}

/* ─── Consultant Panel ───────────────────────────────────────────────────────── */

.lm-consultant-panel {
  max-width: 860px;
  margin: 2.5rem auto;
  font-family: 'Poppins', 'Inter', sans-serif;
  animation: lmPanelIn 0.4s ease;
}
@keyframes lmPanelIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Panel Header */
.lm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-radius: 20px 20px 0 0;
  padding: 1.5rem 2rem;
  margin-bottom: 0;
  border-bottom: none;
}
.lm-panel-header--healthy {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #a7f3d0;
}
.lm-panel-header--warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #fde68a;
}
.lm-panel-header--risk {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1.5px solid #fca5a5;
}

.lm-panel-status {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.lm-status-emoji {
  font-size: 1.75rem;
  line-height: 1;
}
.lm-status-label {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}
.lm-benchmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lm-benchmark__label {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}
.lm-benchmark__value {
  font-size: 0.8rem;
  font-weight: 700;
  color: #374151;
  background: rgba(255,255,255,0.7);
  padding: 2px 8px;
  border-radius: 100px;
}

/* Annual Loss Badge */
.lm-annual-loss {
  background: rgba(255,255,255,0.7);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  text-align: right;
}
.lm-annual-loss__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.2rem;
}
.lm-annual-loss__amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
}
.lm-annual-loss__sub {
  font-size: 0.7rem;
  color: #7c828a;
  max-width: 160px;
}

/* Panel Sections */
.lm-panel-section {
  background: #fff;
  border: 1.5px solid #f0f0f0;
  border-top: none;
  padding: 1.5rem 2rem;
}
.lm-panel-section:last-of-type {
  border-radius: 0;
}

.lm-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* AI Badge */
.lm-ai-badge {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* AI Insights section */
.lm-ai-insights {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border-color: #e9d5ff;
}
.lm-ai-subtext {
  font-size: 0.8rem;
  color: #7c828a;
  margin-bottom: 0.75rem;
  margin-top: -0.5rem;
}

/* Lists */
.lm-reasons-list,
.lm-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.lm-reasons-list li,
.lm-insights-list li {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}
.lm-reasons-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #9ca3af;
  font-weight: 600;
}
.lm-insights-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #7c3aed;
  font-weight: 700;
}

/* Action Items */
.lm-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.lm-action-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
}
.lm-action-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: #0052ff;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 1px;
}

/* How Loop Helps */
.lm-how-loop {
  background: #fff;
  border: 1.5px solid #f0f0f0;
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 2rem;
}
.lm-how-loop__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
  margin-bottom: 0.75rem;
}
.lm-how-loop__text {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* CTA Row */
.lm-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
}
.lm-cta-primary {
  display: inline-flex;
  align-items: center;
  background: #0052ff;
  color: #fff;
  padding: 0.875rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.lm-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 82, 255, 0.3);
  color: #fff;
}
.lm-cta-secondary {
  display: inline-flex;
  align-items: center;
  color: #0052ff;
  padding: 0.875rem 1.5rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid #0052ff;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.lm-cta-secondary:hover {
  background: rgba(0, 82, 255, 0.06);
  color: #0052ff;
}

/* Micro CTA Row */
.lm-micro-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 2rem;
  background: #f8fafc;
  border: 1.5px solid #f0f0f0;
  border-top: none;
}
.lm-micro-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  padding: 0.55rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.lm-micro-btn:hover {
  border-color: #0052ff;
  color: #0052ff;
}

/* Next Tools Rail */
.lm-next-tools {
  margin-top: 0;
  background: #f8fafc;
  border: 1.5px solid #f0f0f0;
  border-top: 1px solid #e8eeff;
  border-radius: 0 0 20px 20px;
  padding: 1.5rem 2rem;
}
.lm-next-tools__header {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c828a;
  margin-bottom: 1rem;
}
.lm-next-tools__rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.lm-next-tool {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1.5px solid #e8eeff;
  border-radius: 14px;
  padding: 0.875rem 1rem;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.lm-next-tool:hover {
  border-color: #0052ff;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.1);
  transform: translateY(-1px);
}
.lm-next-tool__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}
.lm-next-tool__body {
  flex: 1;
  min-width: 0;
}
.lm-next-tool__name {
  font-size: 0.825rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lm-next-tool__desc {
  font-size: 0.75rem;
  color: #7c828a;
  margin-top: 2px;
}
.lm-next-tool__arrow {
  font-size: 0.875rem;
  color: #0052ff;
  flex-shrink: 0;
  font-weight: 600;
}

/* ─── Exit Intent Modal ───────────────────────────────────────────────────────── */

.lm-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lm-exit-modal.open { display: flex; }

.lm-exit-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.lm-exit-modal__card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  animation: lmModalIn 0.3s ease;
}
@keyframes lmModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.lm-exit-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: #6b7280;
  transition: background 0.15s ease;
}
.lm-exit-modal__close:hover { background: #e5e7eb; }

.lm-exit-modal__emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.lm-exit-modal__title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.lm-exit-modal__sub {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
}
.lm-exit-modal__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.lm-exit-modal__list li {
  font-size: 0.825rem;
  color: #374151;
}
.lm-exit-modal__value {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 1.25rem;
}
.lm-exit-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lm-exit-modal__input {
  width: 100%;
  height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111827;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.lm-exit-modal__input:focus {
  outline: none;
  border-color: #0052ff;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}
.lm-exit-modal__btn {
  height: 52px;
  background: #0052ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lm-exit-modal__btn:hover { background: #0041cc; transform: translateY(-1px); }
.lm-exit-modal__note { font-size: 0.75rem; color: #9ca3af; }

.lm-exit-success-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* ─── Email Report Modal ──────────────────────────────────────────────────────── */

.lm-email-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lm-email-modal.open { display: flex; }

.lm-email-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.lm-email-modal__card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  animation: lmModalIn 0.3s ease;
}
.lm-email-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  color: #6b7280;
  transition: background 0.15s ease;
}
.lm-email-modal__close:hover { background: #e5e7eb; }

.lm-email-modal__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.lm-email-modal__card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.lm-email-modal__card p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
#lmEmailForm {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lm-email-modal__input {
  width: 100%;
  height: 48px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111827;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lm-email-modal__input:focus {
  outline: none;
  border-color: #0052ff;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.12);
}
.lm-email-modal__btn {
  height: 52px;
  background: #0052ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.lm-email-modal__btn:hover { background: #0041cc; transform: translateY(-1px); }
.lm-email-modal__note { font-size: 0.75rem; color: #9ca3af; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .lm-consultant-panel {
    margin: 1.5rem auto;
  }
  .lm-panel-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.25rem;
  }
  .lm-annual-loss {
    text-align: left;
    width: 100%;
  }
  .lm-panel-section {
    padding: 1.25rem;
  }
  .lm-reasons-list,
  .lm-insights-list {
    grid-template-columns: 1fr;
  }
  .lm-how-loop {
    padding: 1.25rem;
    border-radius: 0 0 16px 16px;
  }
  .lm-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .lm-cta-primary,
  .lm-cta-secondary {
    text-align: center;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.875rem 1rem;
  }
  .lm-next-tools__rail {
    grid-template-columns: 1fr;
  }
  .lm-next-tools {
    padding: 1.25rem;
    border-radius: 0 0 16px 16px;
  }
  .lm-micro-cta {
    padding: 1rem 1.25rem;
  }
  .lm-trust-strip__testimonials {
    flex-direction: column;
    align-items: center;
  }
  .lm-exit-modal__list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .lm-exit-modal__card,
  .lm-email-modal__card {
    padding: 1.75rem 1.25rem;
  }
}
