/* =====================================================
   TributoFácil — style.css
   Custom styles complementing Tailwind CDN
   ===================================================== */

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #030712;
  color: #f9fafb;
}

/* ── Gradient Text ── */
.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #fb923c 60%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Decorative Blobs ── */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite alternate;
}

.blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #0ea5e9, #7c3aed);
  top: -180px;
  left: -120px;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #f97316, #ec4899);
  top: -100px;
  right: -100px;
  animation-delay: 4s;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 20px) scale(1.08); }
}

/* ── Glass Card ── */
.card-glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #f9fafb;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 2.5rem;
}

.form-select option {
  background: #1e293b;
  color: #f9fafb;
}

.form-input:focus,
.form-select:focus {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-input::placeholder { color: #475569; }

.form-input.invalid,
.form-select.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* ── Result Cards ── */
.result-card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-card.success {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.15), rgba(4, 120, 87, 0.08));
  border-color: rgba(22, 163, 74, 0.5);
  box-shadow: 0 8px 40px rgba(22, 163, 74, 0.15);
}

.result-card.danger {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(153, 27, 27, 0.08));
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 8px 40px rgba(220, 38, 38, 0.15);
}

.result-card.neutral {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(7, 89, 133, 0.08));
  border-color: rgba(14, 165, 233, 0.4);
}

/* ── AdSense Slots ── */
.adsense-slot {
  display: block;
  width: 100%;
  min-height: 90px;
  overflow: hidden;
}

/* ── Lucide Base Class ── */
.lucide {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── FAQ ── */
.faq-item {
  transition: all 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(14, 165, 233, 0.3);
}

.faq-summary {
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.faq-summary::-webkit-details-marker { display: none; }

.faq-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-icon {
  color: #0ea5e9;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* ChevronDown roda 180° quando aberto (era 45° para o sinal "+") */
details[open] .faq-icon {
  transform: rotate(180deg);
}

/* ── Credibility check icon ── */
.credibility-check {
  color: #4ade80;
  flex-shrink: 0;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
}

/* ── Result trending icon (TrendingUp / TrendingDown via JS) ── */
.result-trend-icon {
  display: block;
}

/* ── Table ── */
table thead tr {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ── Histório item ── */
.historico-item {
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.historico-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(14, 165, 233, 0.3);
}

/* ── Animations ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(249, 115, 22, 0); }
}

.animate-slide-up {
  animation: slideUp 0.5s cubic-bezier(0.34, 1.25, 0.64, 1) forwards;
}

#btn-calcular {
  animation: pulse-glow 3s infinite;
}

/* ── Loading state ── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Scroll progress bar ── */
#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #f97316);
  z-index: 9999;
  transition: width 0.1s linear;
  width: 0%;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .blob-1 { width: 280px; height: 280px; }
  .blob-2 { width: 240px; height: 240px; }
}

/* ── Print styles for PDF preview ── */
@media print {
  .adsense-slot,
  #btn-whatsapp,
  #btn-pdf,
  #btn-nova,
  #btn-calcular,
  header .blob,
  #historico-section,
  footer { display: none !important; }
}

/* ── Hero Alert Box (melhoria #1) ── */
.hero-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 540px;
  margin: 0 auto 28px;
  padding: 14px 18px;
  background: rgba(251, 146, 60, 0.10);
  border: 1px solid rgba(251, 146, 60, 0.45);
  border-left: 4px solid #fb923c;
  border-radius: 14px;
  text-align: left;
  animation: fadeInDown 0.6s ease both;
}

.hero-alert__icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.hero-alert p {
  font-size: 0.875rem;
  color: #fcd34d;
  line-height: 1.55;
  margin: 0;
}

.hero-alert strong {
  color: #fb923c;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Credibility Block (melhoria #5) ── */
.credibility-block {
  padding: 16px 20px;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.20);
  border-radius: 16px;
}

.credibility-block__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0ea5e9;
  margin-bottom: 10px;
}

.credibility-block__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credibility-block__list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8125rem;
  color: #cbd5e1;
  line-height: 1.5;
}


/* ── Ripple Button Microinteraction (melhoria #2) ── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
  left: var(--ripple-x, 50%);
  top:  var(--ripple-y, 50%);
}

.btn-ripple.ripple-active::after {
  width: 300px;
  height: 300px;
  opacity: 0;
  transition: width 0.45s ease, height 0.45s ease, opacity 0.45s ease;
}

/* ── Table: column with sub-label ── */
table td br + span {
  display: block;
  line-height: 1.4;
}
