/*
 * blog-triggers.css — Mortgagefy Blog Lead Trigger System
 * Styles for T1 inline callout, T2 slide-up widget, and reading progress bar.
 */

/* ─── TRIGGER 1 — inline callout box ──────────────────────────── */
.mfy-t1-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f0fdf4;
  border-left: 4px solid #006633;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 28px 0;
  box-shadow: 0 2px 12px rgba(0, 102, 51, 0.08);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.mfy-t1-box.mfy-t1-visible {
  opacity: 1;
  transform: translateY(0);
}

.mfy-t1-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.mfy-t1-content {
  flex: 1;
  min-width: 0;
}

.mfy-t1-content strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #003319;
  margin-bottom: 5px;
  line-height: 1.4;
}

.mfy-t1-content p {
  font-size: 0.875rem;
  color: #374151;
  margin: 0 0 12px;
  line-height: 1.55;
}

.mfy-t1-btn {
  display: inline-flex;
  align-items: center;
  background: #006633;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.mfy-t1-btn:hover {
  background: #004d26;
}

.mfy-t1-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.15s;
}

.mfy-t1-close:hover {
  color: #374151;
}

/* ─── TRIGGER 2 — slide-up mini widget ────────────────────────── */
#mfy-t2 {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: #fff;
  border-top: 3px solid #006633;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.14);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 480px;
  margin: 0 auto;
  border-radius: 16px 16px 0 0;
}

@media (min-width: 640px) {
  #mfy-t2 {
    bottom: 16px;
    right: 16px;
    left: auto;
    border-radius: 16px;
    border: none;
    border-top: 3px solid #006633;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    max-width: 400px;
    margin: 0;
  }
}

#mfy-t2.mfy-t2-visible {
  transform: translateY(0);
}

.mfy-t2-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.mfy-t2-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #006633;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mfy-t2-body {
  flex: 1;
  min-width: 0;
}

.mfy-t2-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #006633;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.mfy-t2-msg {
  font-size: 0.8rem;
  color: #374151;
  margin: 0;
  line-height: 1.45;
}

.mfy-t2-btn {
  flex-shrink: 0;
  background: #F5A623;
  color: #1a1a1a;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.mfy-t2-btn:hover {
  background: #e0961c;
}

#mfy-t2-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.15s;
}

#mfy-t2-close:hover {
  color: #374151;
}

/* ─── Mobile: push above existing sticky CTA bar ──────────────── */
@media (max-width: 1023px) {
  #mfy-t2 {
    bottom: 64px; /* height of .mobile-cta bar */
  }

  #mfy-t2.mfy-t2-visible {
    transform: translateY(0);
  }
}

/* ─── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mfy-t1-box,
  #mfy-t2 {
    transition: none;
  }
}
