/*
 * CalcPrism Print Stylesheet
 * ==========================
 * Clean, readable printouts for calculator pages.
 * Loaded via <link media="print"> so rules apply only when printing.
 */

/* ═══════════════════════════════════════════
   Hide Non-Essential Elements
   ═══════════════════════════════════════════ */

.site-nav,
.site-footer,
.search-overlay,
.mobile-menu,
.mobile-menu-backdrop,
.skip-to-content,
.toast-container,
.breadcrumb-actions,
.nav-search-pill,
#dark-mode-toggle,
#mobile-dark-toggle,
#nav-hamburger,
.hero-search,
.calc-related,
.calc-utils {
  display: none !important;
}

/* ═══════════════════════════════════════════
   Base Reset — White Background, Black Text
   ═══════════════════════════════════════════ */

*, *::before, *::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

html, body {
  background: #fff !important;
  color: #000 !important;
  font-size: 12pt;
  line-height: 1.5;
}

body {
  margin: 0;
  padding: 0;
}

/* Override dark mode for print */
[data-theme='dark'] {
  --bg: #fff;
  --ink: #111;
  --ink-2: #333;
  --ink-3: #666;
  --surface: #fff;
  --surface-2: #f9fafb;
  --line: #ddd;
  --line-strong: #ccc;
}

/* ═══════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════ */

main {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

.calculator-page {
  max-width: 100% !important;
  padding: 0 !important;
}

.container {
  max-width: 100% !important;
  padding: 0 !important;
}

/* ═══════════════════════════════════════════
   Calculator Form — Visible, Simplified
   ═══════════════════════════════════════════ */

.calc-form,
.calc-form-card {
  background: #fff !important;
  border: 1px solid #ddd !important;
  padding: 16pt 20pt !important;
}

.form-group input,
.form-group select,
.form-group textarea,
.calc-form .input,
.calc-form .select {
  border: 1px solid #ccc !important;
  background: #fff !important;
  color: #000 !important;
  padding: 6pt 8pt !important;
  border-radius: 4pt !important;
}

.calc-btn {
  display: none !important;
}

/* ═══════════════════════════════════════════
   Results — Fully Visible
   ═══════════════════════════════════════════ */

.calc-results,
.calc-live {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.result-card,
.result-box,
.result-stat {
  background: #fff !important;
  border: 1px solid #ddd !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

.result-primary .result-value {
  -webkit-text-fill-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
}

.result-value {
  color: #1d4ed8 !important;
}

/* ═══════════════════════════════════════════
   Formula Section — Preserved
   ═══════════════════════════════════════════ */

.formula-box,
.formula-display {
  background: #f3f4f6 !important;
  border: 1px solid #ddd !important;
  border-left: 4px solid #1d4ed8 !important;
  font-family: 'JetBrains Mono', monospace !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

code, pre, .formula-code {
  font-family: 'JetBrains Mono', monospace !important;
  background: #f3f4f6 !important;
}

/* ═══════════════════════════════════════════
   FAQ — Expand All Accordion Answers
   ═══════════════════════════════════════════ */

.accordion-content {
  max-height: none !important;
  overflow: visible !important;
  height: auto !important;
}

.accordion-item {
  background: #fff !important;
  border: 1px solid #ddd !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

.accordion-trigger .chevron {
  display: none !important;
}

/* ═══════════════════════════════════════════
   Page Break Control
   ═══════════════════════════════════════════ */

table, thead, tbody {
  break-inside: avoid;
  page-break-inside: avoid;
}

.breakdown-table,
.reference-table {
  break-inside: avoid;
  page-break-inside: avoid;
}

.card,
.calc-form-card,
.card-category,
.card-calculator,
.card-value-prop,
.vp-card,
.how-step {
  break-inside: avoid;
  page-break-inside: avoid;
}

.calc-section {
  break-inside: avoid;
  page-break-inside: avoid;
}

h1, h2, h3, h4, h5, h6 {
  break-after: avoid;
  page-break-after: avoid;
}

/* ═══════════════════════════════════════════
   External Links Show URLs
   ═══════════════════════════════════════════ */

a[href^="http"]:not([href*="calcprism"])::after {
  content: " (" attr(href) ")";
  font-size: 9pt;
  color: #666;
  font-weight: normal;
  word-break: break-all;
}

/* Don't show URLs on nav-like or icon links */
.breadcrumb a::after,
.card-related a::after,
.nav-brand::after,
.calc-link::after {
  content: none !important;
}

/* ═══════════════════════════════════════════
   Tables — Clean Borders
   ═══════════════════════════════════════════ */

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border: 1px solid #ccc !important;
  padding: 6pt 8pt !important;
  color: #000 !important;
}

th {
  background: #f3f4f6 !important;
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   Misc Clean-up
   ═══════════════════════════════════════════ */

/* Disable all animations and transitions */
*, *::before, *::after {
  animation: none !important;
  transition: none !important;
}

/* Disable hover transforms still in the cascade */
.card:hover,
.card-category:hover,
.card-calculator:hover,
.card-related:hover,
.card-value-prop:hover,
.btn-primary:hover,
.btn-danger:hover {
  transform: none !important;
}

/* Cards — clean for print */
.card,
.glass-card,
.card-stat,
.card-value-prop {
  background: #fff !important;
  border: 1px solid #ddd !important;
}

/* Gradient text → solid color for print */
.gradient-text {
  -webkit-text-fill-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
  background: none !important;
}

/* Badges — simple styling */
.badge {
  background: #e5e7eb !important;
  color: #333 !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Scroll animation elements — ensure visible */
.js .card-category,
.js .card-calculator,
.js .calc-card,
.js .card-related,
.js .vp-card,
.js .how-step,
.js .card-stat {
  opacity: 1 !important;
  transform: none !important;
}

/* Image resizer — show preview, hide drop zone controls */
.ir-drop-zone {
  border: 1px solid #ddd !important;
}

/* Color converter — print swatches with background */
.cc-swatch {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  border: 1px solid #ccc !important;
}

/* Breadcrumb — visible but simplified */
.breadcrumb {
  margin-bottom: 12pt;
}

.breadcrumb a {
  color: #333 !important;
  text-decoration: none;
}
