/* premium-overrides.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --ff-font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body, html {
  font-family: var(--ff-font-primary) !important;
}

/* Modernize cards with softer shadows and smoother transitions */
.ff-v12-tool-card {
  border-radius: 24px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0,0,0,0.02) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.ff-v12-tool-card:hover {
  transform: translateY(-4px) scale(1.01) !important;
  box-shadow: 0 20px 40px rgba(11, 143, 130, 0.08), 0 1px 3px rgba(0,0,0,0.02) !important;
  border-color: rgba(11, 143, 130, 0.2) !important;
}

/* Make headers more elegant */
h1, h2, h3, h4, .ff12-brand-copy strong {
  letter-spacing: -0.03em !important;
  font-weight: 800 !important;
}

/* Better buttons */
.ff12-nav-link, .ff12-nav-button {
  border-radius: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

/* Add a subtle elegant mesh gradient to the hero background */
body.ff-v12-home #root main > div.space-y-7 > div:first-child {
  background: linear-gradient(145deg, #ffffff 0%, #f7fdfb 100%) !important;
  border: 1px solid rgba(11, 143, 130, 0.1) !important;
  border-radius: 28px !important;
  position: relative;
  overflow: hidden;
}

body.ff-v12-home #root main > div.space-y-7 > div:first-child::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(11, 143, 130, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* =========================================================
   COMPREHENSIVE COLOR UNIFICATION (ANTI-DARK MODE)
   Fixes all remaining dark blue / slate surfaces so text is visible
   ========================================================= */

/* Neutralize all deep dark backgrounds to white/light surfaces */
body #root [class*="bg-slate-9"],
body #root [class*="bg-slate-8"],
body #root [class*="bg-sky-9"],
body #root [class*="bg-indigo-9"],
body #root [class*="bg-rose-9"],
body #root [class*="bg-[#0b101b]"],
body #root [class*="bg-[#0b141a]"],
body #root [class*="bg-[#0d1522]"],
body #root [class*="bg-[#0f172a]"],
body #root [class*="bg-[#0f1e36]"],
body #root [class*="bg-[#111c2e]"],
body #root [class*="bg-[#141d2b]"],
body #root [class*="bg-[#1e293b]"],
body #root [class*="bg-[#202c33]"],
body #root [class*="bg-[#223047]"],
body #root [class*="bg-[#2a3942]"] {
  background-color: #ffffff !important;
  color: #123b3b !important;
  border-color: #d3e4df !important;
}

/* Soften slightly lighter dark surfaces */
body #root [class*="bg-slate-7"],
body #root [class*="bg-slate-6"] {
  background-color: #f7fbfa !important;
  color: #123b3b !important;
  border-color: #d3e4df !important;
}

/* Fix text colors that become invisible on light backgrounds */
body #root .text-white,
body #root [class*="text-white/"],
body #root [class*="text-slate-50"],
body #root [class*="text-slate-100"],
body #root [class*="text-slate-200"],
body #root [class*="text-slate-300"],
body #root [class*="text-gray-100"],
body #root [class*="text-gray-200"],
body #root [class*="text-gray-300"] {
  color: #123b3b !important; /* Dark text for visibility */
}

/* Mid-tone texts */
body #root [class*="text-slate-400"],
body #root [class*="text-gray-400"] {
  color: #55736e !important;
}

/* Standardize Borders */
body #root [class*="border-slate-9"],
body #root [class*="border-slate-8"],
body #root [class*="border-slate-7"] {
  border-color: #d3e4df !important;
}

/* Standardize Primary Buttons (Teal) */
body #root button[class*="bg-[#10b981]"]:not([class*="/"]),
body #root a[class*="bg-[#10b981]"]:not([class*="/"]),
body #root button.bg-blue-600,
body #root button.bg-indigo-600 {
  background-color: #0b8f82 !important;
  color: #ffffff !important;
  border-color: #0b8f82 !important;
}
body #root button[class*="bg-[#10b981]"]:not([class*="/"]):hover,
body #root a[class*="bg-[#10b981]"]:not([class*="/"]):hover,
body #root button.bg-blue-600:hover,
body #root button.bg-indigo-600:hover {
  background-color: #08756b !important;
}

/* Ensure icons inside primary buttons are white */
body #root button[class*="bg-[#10b981]"]:not([class*="/"]) *,
body #root a[class*="bg-[#10b981]"]:not([class*="/"]) * {
  color: #ffffff !important;
}

/* Fix previously dark buttons that are now white */
body #root button[class*="bg-slate-9"],
body #root button[class*="bg-slate-8"],
body #root a[class*="bg-slate-9"],
body #root a[class*="bg-slate-8"] {
  background-color: #ffffff !important;
  color: #123b3b !important;
  border: 1px solid #d3e4df !important;
}
body #root button[class*="bg-slate-9"]:hover,
body #root button[class*="bg-slate-8"]:hover,
body #root a[class*="bg-slate-9"]:hover,
body #root a[class*="bg-slate-8"]:hover {
  background-color: #eef6f3 !important;
  border-color: #9fcfc6 !important;
}

/* Uniform transparent/subtle backgrounds for inputs/dropzones */
body #root [class*="border-dashed"] {
  background-color: #f4f8f7 !important;
  border-color: #b8d8d2 !important;
  color: #123b3b !important;
}
body #root [class*="border-dashed"]:hover {
  background-color: #eaf5f2 !important;
  border-color: #72bdb3 !important;
}
body #root [class*="border-dashed"] > div[class*="w-16"] {
  background-color: #0b8f82 !important;
  color: #ffffff !important;
}
body #root [class*="border-dashed"] > div[class*="w-16"] * {
  color: #ffffff !important;
}

/* =========================================================
   FOOTER CONTRAST (PROTECT FROM ANTI-DARK MODE)
   Highly specific selectors to beat the brute-force rules
   ========================================================= */
body #root footer[class],
body footer.site-footer[class] {
  background-color: #0d4947 !important;
  color: #eef8f6 !important;
  border-top: 1px solid #17625e !important;
}

body #root footer[class] h1,
body #root footer[class] h2,
body #root footer[class] h3,
body #root footer[class] h4,
body #root footer[class] strong,
body #root footer[class] [class*="font-semibold"],
body #root footer[class] [class*="text-slate-200"],
body footer.site-footer[class] strong {
  color: #ffffff !important;
}

body #root footer[class] p,
body #root footer[class] span,
body #root footer[class] li,
body #root footer[class] [class*="text-slate-400"],
body #root footer[class] [class*="text-slate-500"],
body footer.site-footer[class] p,
body footer.site-footer[class] span,
body footer.site-footer[class] li {
  color: #b9d6d1 !important;
}

body #root footer[class] a,
body #root footer[class] a[class],
body footer.site-footer[class] a {
  color: #d7ece8 !important;
}

body #root footer[class] a:hover,
body #root footer[class] a[class]:hover,
body footer.site-footer[class] a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

body #root footer[class] [class*="text-emerald"],
body #root footer[class] [class*="text-amber"] {
  color: #72bdb3 !important;
}

/* Ensure React icons inherit color properly inside the footer */
body #root footer[class] svg {
  color: inherit !important;
}

/* =========================================================
   METHODOLOGY CARDS (ANTI-DARK MODE BRUTE-FORCE)
   Ensures the technical process cards are clean and legible
   ========================================================= */
body #root .snp-formula-card,
body #root .snp-example,
body #root .snp-limits,
body #root .snp-references {
  background-color: #f7fbfa !important;
  border: 1px solid #d3e4df !important;
  color: #123b3b !important;
  box-shadow: none !important;
}
body #root .snp-formula-card h4,
body #root .snp-example h3,
body #root .snp-limits h3,
body #root .snp-references h2 {
  color: #082f32 !important;
}
body #root .snp-formula-card p,
body #root .snp-example p,
body #root .snp-limits li,
body #root .snp-references li,
body #root .snp-references span {
  color: #647f7b !important;
}
body #root .snp-formula-card code {
  background-color: #ffffff !important;
  color: #08756b !important;
  border: 1px solid #c6e1dc !important;
}
body #root .snp-references a {
  color: #08756b !important;
  text-decoration-color: #9fd1c8 !important;
}
body #root .snp-references li::marker {
  color: #0b8f82 !important;
}
body #root .snp-methodology-status {
  background-color: #e7f5f1 !important;
  color: #08756b !important;
  border-left-color: #0b8f82 !important;
}
body #root .snp-methodology-date {
  background-color: #f7fbfa !important;
  border-color: #d3e4df !important;
  color: #647f7b !important;
}
body #root .snp-methodology-kicker {
  color: #0b8f82 !important;
}
body #root .snp-methodology-intro {
  color: #647f7b !important;
}

/* =========================================================
   REMOVER FUNDO FIXES
   Overrides dark mode quality selection cards
   ========================================================= */
body.ff-route-remover-fundo .quality-option {
  background: #f7fbfa !important;
  border-color: #d3e4df !important;
}
body.ff-route-remover-fundo .quality-option:has(input:checked) {
  background: #e6f6f4 !important;
  border-color: #0b8f82 !important;
  box-shadow: inset 0 0 0 1px #0b8f82 !important;
}
body.ff-route-remover-fundo .quality-option b {
  color: #0b8f82 !important;
}
body.ff-route-remover-fundo .quality-option strong {
  color: #082f32 !important;
}
body.ff-route-remover-fundo .quality-option span {
  color: #647f7b !important;
}

/* =========================================================
   STATIC PREMIUM FOOTER (4-COLUMN)
   Applies to all static tools that were retrofitted
   ========================================================= */
footer.site-footer.site-footer-premium {
  background-color: #0d4947 !important;
  color: #eef8f6 !important;
  border-top: 1px solid #17625e !important;
  padding: 48px 0 24px 0 !important;
  font-family: inherit;
  text-align: left;
}

.sfp-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.sfp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .sfp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.sfp-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sfp-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff !important;
  text-transform: uppercase;
}

.sfp-brand-square {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 2px;
}

.sfp-brand-highlight {
  color: #10b981;
}

.sfp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff !important;
}

.sfp-icon {
  width: 16px;
  height: 16px;
  color: #34d399; /* emerald-400 */
}

.sfp-icon-amber {
  color: #f59e0b; /* amber-500 */
}

.sfp-desc {
  font-size: 11px;
  line-height: 1.6;
  color: #b9d6d1 !important;
  margin: 0;
}

.sfp-explore {
  font-size: 12px;
  font-weight: 600;
  color: #10b981 !important;
  text-decoration: none;
  margin-top: 8px;
  display: inline-flex;
}
.sfp-explore:hover {
  text-decoration: underline;
}

.sfp-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sfp-links li {
  margin: 0;
  padding: 0;
}

.sfp-links li a {
  font-size: 11px;
  color: #b9d6d1 !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.sfp-links li a:before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: currentColor;
  mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>');
  mask-size: cover;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>');
  -webkit-mask-size: cover;
  opacity: 0.6;
}

.sfp-links li a:hover {
  color: #fbbf24 !important; /* amber-400 */
}

.sfp-bottom {
  border-top: 1px solid #17625e;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #b9d6d1 !important;
}
.sfp-bottom p {
  margin: 0;
  color: #b9d6d1 !important;
}

.sfp-bottom-links {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #72bdb3 !important;
}
@media (min-width: 640px) {
  .sfp-bottom {
    flex-direction: row;
  }
}

/* =========================================================
   DEFINITIVE FOOTER FIX
   Forces the footer to be dark teal and prevents any internal
   div from having a white background.
   ========================================================= */
html body #root footer,
html body #root footer[class],
html body footer.site-footer,
html body footer.site-footer[class] {
  background-color: #0d4947 !important;
}
html body #root footer *,
html body footer.site-footer * {
  background-color: transparent !important;
}

/* =========================================================
   DEFINITIVE CONTRACT PREVIEW FIX
   Fixes the white-on-white text in the contract preview
   ========================================================= */
#rental-contract-preview,
#rental-contract-preview * {
  color: #18181b !important;
}
#rental-contract-preview {
  background-color: #ffffff !important;
}

/* Restore the small cyan dot and badges in the footer */
html body #root footer [class*="bg-[#10b981]"],
html body footer.site-footer [class*="bg-[#10b981]"] {
  background-color: #10b981 !important;
}

/* Force React footers to hide so that the injected HTML footer shows! */
html body #root footer {
  display: none !important;
}

/* Fix ALL document previews */
body #root .bg-white.text-zinc-900,
body #root .bg-white.text-zinc-900 * {
  color: #18181b !important;
}
body #root .bg-white.text-zinc-900 {
  background-color: #ffffff !important;
}

/* =========================================================
   ULTIMATE PREVIEW TEXT FIX 
   Overriding a bug where [class*="bg-[#10b981]"] * matches 
   selection:bg-[#10b981] and forces ALL text to be white!
   ========================================================= */
body.ff-v12-tool #root #rental-contract-preview,
body.ff-v12-tool #root #rental-contract-preview *,
body.ff-v12-tool #root #nda-document-preview,
body.ff-v12-tool #root #nda-document-preview *,
body.ff-v12-tool #root #equipment-term-preview,
body.ff-v12-tool #root #equipment-term-preview *,
body.ff-v12-tool #root .bg-white.text-zinc-900,
body.ff-v12-tool #root .bg-white.text-zinc-900 * {
  color: #18181b !important;
}

/* FIX FOR ICON HOVER BG BUG */
body #root .ff-v12-tool-card:hover > div:first-child > div:first-child > div:first-child,
body #root .ff-v12-tool-card:focus-visible > div:first-child > div:first-child > div:first-child {
   background: var(--ff13-teal) !important;
}
body #root .ff-v12-tool-card:hover > div:first-child > div:first-child > div:first-child svg,
body #root .ff-v12-tool-card:focus-visible > div:first-child > div:first-child > div:first-child svg {
   color: #ffffff !important;
}

/* Correção do "Hover Gap" do Menu Mega (evita que o menu feche ao descer o mouse) */
.ff12-mega::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  height: 25px;
  background: transparent;
  z-index: 0;
}



/* Star INLINE ao lado do titulo da ferramenta */
.ff17-tool-star-inline {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  color: #728b86; /* slate-400 */
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  margin-left: 8px;
  vertical-align: middle;
  padding: 0;
}
.ff17-tool-star-inline svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  fill: transparent !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  transition: fill 0.2s ease, stroke 0.2s ease;
}
.ff17-tool-star-inline:hover {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}
.ff17-tool-star-inline.is-favorite {
  color: #f59e0b !important; /* amber */
}
.ff17-tool-star-inline.is-favorite svg {
  fill: #f59e0b !important;
  stroke: #f59e0b !important;
}
