/* ==========================================================================
   EdCatalyst — Tool Page Styles (Email Forensics Analyzer)
   Matches index.html's design language. Full navbar/footer kept.
   (Layers on top of ../../styles/main.css for shared variables.)
   ========================================================================== */

body {
  font-family: 'Poppins', sans-serif;
  background: var(--ec-bg);
}

/* ---------------- Hero (same as index.html hero) ---------------- */
.tool-hero {
  position: relative;
  overflow: hidden;
}

.tool-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 1rem 0 1rem;
}

.tool-hero-sub {
  font-size: 1.08rem;
  color: var(--ec-ink-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------------- About card (feature-card variant) ---------------- */
.tool-info-card {
  max-width: 760px;
  margin: 0 auto;
  cursor: default;
}

.tool-info-card:hover {
  transform: none;
}

.tool-info-card p,
.tool-info-card:hover p {
  color: var(--ec-ink-soft) !important;
  font-size: 0.97rem;
  line-height: 1.7;
}

.tool-info-card h5,
.tool-info-card:hover h5 {
  color: var(--ec-ink) !important;
  font-weight: 700;
}

.tool-info-card:hover::before {
  opacity: 0;
}

/* ---------------- Main tool card ---------------- */
.tool-card {
  background: var(--ec-card-bg);
  border-radius: 20px;
  padding: 2.2rem;
  box-shadow: var(--ec-shadow-soft);
  border: 1px solid rgba(168, 60, 12, 0.06);
  max-width: 980px;
  margin: 0 auto;
}

.tool-card-title {
  color: var(--ec-terracotta);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 1.6rem;
}

.tool-card-title i {
  margin-right: 8px;
}

/* ---------------- Form elements ---------------- */
.tool-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ec-ink-soft);
  margin-bottom: 0.4rem;
  display: block;
}

.tool-input {
  border: 2px solid #f0e2d3;
  border-radius: 10px;
  font-size: 0.92rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.tool-input:focus {
  border-color: var(--ec-terracotta);
  box-shadow: 0 0 0 4px rgba(168, 60, 12, 0.1);
  outline: none;
}

.tool-input.mono {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

/* ---------------- Buttons (reuse btn-glow, add a cyan variant) ---------------- */
.btn-glow-cyan {
  background: var(--ec-gradient-3);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.85rem 1.8rem;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 12px 28px rgba(31, 111, 168, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-glow-cyan:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(31, 111, 168, 0.4);
}

/* ---------------- Divider / result ---------------- */
.tool-divider {
  border-top: 1px solid rgba(168, 60, 12, 0.1);
  margin: 1.8rem 0;
}

.tool-result-title {
  color: var(--ec-terracotta);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}

.tool-result-title i {
  margin-right: 6px;
}

.result-box {
  background: #fffaf2;
  border: 2px solid #f0e2d3;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--ec-ink);
  font-size: 0.9rem;
  min-height: 60px;
}

/* ---------------- Warning alert ---------------- */
.tool-alert-warning {
  background: rgba(216, 144, 12, 0.1);
  border: 1px solid rgba(216, 144, 12, 0.3);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  color: var(--ec-ink);
  font-size: 0.9rem;
}

.tool-alert-warning .mono {
  font-family: 'Courier New', monospace;
  background: rgba(216, 144, 12, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ---------------- Small glow button ---------------- */
.btn-glow-sm {
  background: var(--ec-gradient-1);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 1.1rem;
  font-weight: 700;
  font-size: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-glow-sm:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--ec-shadow-soft);
}

/* ---------------- Dropzone ---------------- */
.ef-dropzone {
  border: 2.5px dashed #f0c896;
  border-radius: 14px;
  background: #fffaf2;
  padding: 1.8rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ef-dropzone.dragover {
  background: #ffe9d3;
  border-color: var(--ec-terracotta);
}

/* ---------------- Risk badge ---------------- */
.ef-risk-badge {
  background: #fffaf2;
  color: var(--ec-terracotta-dark);
  border: 1.5px solid #f0c896;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
}

.risk-ok { color: var(--ec-peacock-green); font-weight: 700; }
.risk-warn { color: var(--ec-gold); font-weight: 700; }
.risk-bad { color: #c22323; font-weight: 800; }

/* ---------------- Tabs ---------------- */
.ef-tabs {
  border-bottom: 2px solid #f0e2d3;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.ef-tabs .nav-link {
  border: none;
  border-radius: 10px 10px 0 0;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ec-ink-soft);
  padding: 0.6rem 1.1rem;
  transition: all 0.25s ease;
}

.ef-tabs .nav-link:hover {
  color: var(--ec-terracotta);
  background: rgba(168, 60, 12, 0.05);
}

.ef-tabs .nav-link.active {
  color: #fff;
  background: var(--ec-gradient-1);
}

.ef-tab-content {
  border: 1.5px solid #f0e2d3;
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: #fff;
  padding: 1.4rem;
}

/* ---------------- Key-value grid ---------------- */
.ef-kv {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
}

.ef-kv > div:nth-child(odd) {
  color: var(--ec-ink-soft);
  font-weight: 600;
}

.ef-kv > div:nth-child(even) {
  color: var(--ec-ink);
  word-break: break-word;
}

.ef-divider {
  border-top: 1px solid #f0e2d3;
  margin: 1.2rem 0;
}

.ef-sub-heading {
  color: var(--ec-terracotta);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------------- Tables ---------------- */
.ef-table {
  font-size: 0.85rem;
}

.ef-table .small-mono,
.ef-table td.small-mono {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.safe-link {
  color: var(--ec-peacock-blue);
  word-break: break-all;
}

/* ---------------- Raw email box ---------------- */
.ef-raw-box {
  white-space: pre-wrap;
  background: #1a1310;
  color: #d9c9b8;
  padding: 1rem;
  border-radius: 10px;
  max-height: 420px;
  overflow: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
  .tool-hero-title {
    font-size: 1.9rem;
  }
  .tool-card,
  .tool-info-card {
    padding: 1.5rem 1.3rem;
  }
}
