/* ============================================================================
   calculator-tool.css - CALCULATOR TOOLS category (shared by calculator tools)
   ============================================================================
Loaded by:  calculator-tools/carbon-footprint-calculator.php
              calculator-tools/electricity-cost-calculator.php
              calculator-tools/battery-life-calculator.php
              calculator-tools/levenshtein-distance-calculator.php
   Purpose:    Scoped styling for the Carbon Footprint Calculator's modern
               result panel (.cf-*) plus the stat-card height tweak. The input
               settings reuse the shared .config-group styles in tool-input.css
               and the output stat cards use stock Bootstrap + templatemo
               classes (bg-light, border, rounded, text-highlight).
   Load order: Load AFTER tool-input.css - only scoped .cf-* rules that do not
               override the shared base selectors globally.
   ============================================================================ */

/* Stat cards under "Your CO2 Emissions Result": add a little more vertical
   height (~20% taller than the stock p-2 padding) so the values breathe. */
.cf-stat-card {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

/* Modern, visual Calculation breakdown panel (rendered by the tool JS). */
.cf-result-panel {
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
}

.cf-result-empty {
    padding: 34px 18px;
    text-align: center;
    color: #64748b;
    font-size: 1rem;
}

/* Hero banner with the annual footprint headline. */
.cf-hero {
    background: linear-gradient(135deg, #198754 0%, #2ea866 55%, #63b76f 100%);
    color: #fff;
    padding: 26px 22px;
    text-align: center;
}

.cf-hero-kicker {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 6px;
}

.cf-hero-value {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
}

.cf-hero-value span {
    font-size: 1.05rem;
    font-weight: 500;
    opacity: 0.9;
}

.cf-hero-sub {
    margin-top: 4px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Grid of metric cells. */
.cf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    padding: 14px;
}

.cf-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e9eef4;
    border-radius: 10px;
    padding: 12px 12px;
}

.cf-ic {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    flex: 0 0 38px;
}

.cf-cell-body {
    min-width: 0;
}

.cf-cell-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7b8794;
}

.cf-cell-value {
    font-size: 1rem;
    font-weight: 700;
    color: #26353f;
    word-break: break-word;
}

/* Icon accent tones. */
.cf-grn { color: #198754; background: #e7f5ec; }
.cf-org { color: #e67e22; background: #fdf0e0; }
.cf-pur { color: #7c3aed; background: #f1eafd; }
.cf-blu { color: #2563eb; background: #e5edfb; }
.cf-gld { color: #b8890b; background: #fbf3d9; }
.cf-ind { color: #6610f2; background: #eee6fc; }

/* Footer formula line. */
.cf-foot {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #475569;
    background: #eef2f7;
    border-top: 1px solid #e3e8ef;
    text-align: center;
}

/* -------------------------------------------------------------------------- */
/* Levenshtein Distance Calculator (calculator-tools/levenshtein-distance-calculator.php) */
/* Scoped styles for the .lev-* result UI rendered by the tool JS.            */
/* -------------------------------------------------------------------------- */

.lev-output {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Distance badge colour (fallback when not using bg-success). */
.lev-distance {
    color: #198754;
}

/* Replaces Bootstrap .text-muted for the result report. */
.lev-muted {
    color: #3d72c0;
}

/* Operation breakdown description. */
.lev-ops {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 8px;
}

/* Alignment trace. */
.lev-alignment-wrap {
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    padding: 12px;
}

.lev-align-row {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 2px;
}

.lev-label {
    display: inline-block;
    width: 64px;
    color: #475569;
    font-weight: 700;
}

.lev-cell {
    display: inline-block;
    width: 1.55em;
    text-align: center;
    line-height: 1.4;
}

/* Per-operation colouring of the matched characters. */
.lev-cell-match { color: #198754; }
.lev-cell-sub  { color: #b8860b; }
.lev-cell-ins  { color: #0d6efd; }
.lev-cell-del  { color: #c0392b; }
.lev-cell-swap { color: #6f42c1; }

.lev-match { color: #198754; }
.lev-sub   { color: #b8860b; }
.lev-ins   { color: #0d6efd; }
.lev-del   { color: #c0392b; }
.lev-swap  { color: #6f42c1; }

.lev-legend {
    font-size: 0.95rem;
    color: #565656;
    margin-top: 6px;
    border-top: 1px dashed #e3e8ef;
    padding-top: 6px;
}