/*
 * sow.css — Fusion Calculator
 * Extracted from sow.html (batch-29b1-css-extraction-sow)
 * Source: 2 inline <style> blocks merged in document order
 *   Block 1 (unnamed):       original lines 16–511
 *   Block 2 (lf-disable-menus): original lines 513–515
 * Do not add shared/global rules here — page-specific styles only.
 */

    body {
      background: linear-gradient(to bottom right, #134160, #586C75, #134160, #586C75) no-repeat fixed;
      background-size: cover;
      padding: 20px;
    }

    h1, h2 {
      font-family: 'alfarn', serif;
      text-align: center;
      color: #FDA929;
      margin-top: 20px;
      margin-bottom: 20px;
      letter-spacing: 1.5px;
    }
    h1 { font-weight: 700; }
    h2 { font-weight: 500; }

/* Scrollbar casi invisible (solo WebKit: Chrome/Edge/Safari) */


/* ===== Ocultar COMPLETAMENTE el scrollbar (seguir desplazando) ===== */
/* WebKit (Chrome / Edge / Safari) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;          /* sin ancho */
  height: 0;         /* sin alto (para ejes horizontales) */
  background: transparent; /* por si el motor pinta pista */
}

/* Firefox */
html, body {
  scrollbar-width: none;                 /* oculta el scrollbar */
  scrollbar-color: transparent transparent; /* redundante: “por si acaso” */
}

/* Windows/IE legado (EdgeHTML) – no estorba en navegadores modernos */
html, body {
  -ms-overflow-style: none; /* esconder barras en motores MS antiguos */
}

    form {
      max-width: none;
      box-shadow: 0 5px 10px rgba(0,0,0,1);
      padding: 20px;
      border-radius: 15px;
    }

    label {
      margin-top: 10px;
      font-weight: bold;
      color: white;
      position: relative;
      display: inline-block;
    }

    input, select{
      align-items: center;
      width: 100%;
      margin-top: 2px;
      padding-left: 10px;
      padding-top: 10px;
      padding-bottom: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 25px;
      background-color: transparent;
      color: #ccc;
    }


    select:focus { color: #FDA929; }
    option:disabled { color: #ccc; }
    input::placeholder { color: #ccc; }


    .navbar {
      display: flex;
      justify-content: space-around;
      align-items: center;
      background-color: rgba(255,255,255,0.1);
      padding: 15px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .navbar a {
      color: #fff;
      text-decoration: none;
      padding: 15px 35px;
      border-radius: 5px;
      font-family: 'alfarn-2', sans-serif;
      transition: background-color 0.3s ease, color 0.3s ease;
    }

    .navbar a:hover { background-color: rgba(255,255,255,0.2); }
    .navbar a.active { background-color: #ff9900; color: #000; }

    .main-wrapper { display: flex; flex-direction: column; min-height: 95vh; }
    /* 1) Center content inside the page column */
    .main-content{
      display: flex;                 /* new */
      flex-direction: column;        /* new */
      align-items: center;           /* new: centers children horizontally */
}
    /* Inline results panel (always visible) */
    .results-panel {
      box-shadow: 0 0 10px 2px #FDA929;
      background-color: #2b4a5e;
      color: white;
      margin: 0 auto 30px auto;
      padding: 20px;
      border: 2px solid #FDA929;
      width: 100%;
      max-width: 100%;
      border-radius: 15px;
      text-align: center;
    }
    .results-panel p { margin: 10px 0; font-size: 22px; }
    .results-panel strong { color: #FDA929; font-size: 25px; }
    .hint { opacity: 0.85; font-size: 16px; margin-top: 8px; }

    .footer {
      background-color: rgba(255,255,255,0.1);
      color: white;
      text-align: center;
      padding: 5px;
      margin-top: 20px;
      border-top: 1px solid rgba(255,255,255,0.2);
      box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
    }

    .footer .disclaimer {
      width: 70%;
      font-size: 14px;
      line-height: 1.6;
      margin: 10px auto;
      letter-spacing: 0.5px;
    }

    .disclaimer-label {
      color: #FDA929;
      font-size: 20px;
      line-height: 1.6;
      margin: 5px;
      font-weight: bold;
    }

    .info-icon {
      display: inline-block;
      background-color: #FDA929;
      color: white;
      font-size: 14px;
      font-weight: bold;
      width: 14px;
      height: 14px;
      line-height: 14px;
      text-align: center;
      border-radius: 50%;
      cursor: pointer;
      position: relative;
      transition: transform 0.2s ease;
    }
    .info-icon:hover { transform: scale(1.1); }

    .info-box {
      display: none;
      position: absolute;
      background-color: #1c3341;
      color: white;
      padding: 15px;
      border-radius: 12px;
      box-shadow: 0 8px 15px rgba(0,0,0,0.2);
      min-width: 500px;
      font-size: 14px;
      line-height: 1.5;
      z-index: 1000;
      top: 0;
      left: calc(100% + 10px);
      white-space: normal;
      transition: opacity 0.3s ease, transform 0.3s ease;
      pointer-events: none;
    }
    .info-box strong { color: #FDA929; }
    .info-box p { margin: 5px 0; }
    .info-icon:hover + .info-box, .info-icon:focus + .info-box {
      display: block; pointer-events: auto;
    }

    @media (max-width: 768px) {
      .navbar { flex-direction: column; }
      .navbar a { padding: 10px; width: 100%; text-align: center; }
    }
  
  /* ===================== SCOPE OF WORK — NEW STYLES (START) ===================== */
  :root{
    --sow-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  }
  .calc-form{
    width: 100%;
    max-width: none;
    margin: 20px auto;
    box-shadow: 0 5px 10px rgba(0,0,0,1);
    padding: 20px;
    border-radius: 15px;
    background: transparent;
    color: #fff;
  }

 .sow-form{
    max-width: 1200px;
    margin: 20px auto;
    box-shadow: 0 5px 10px rgba(0,0,0,1);
    padding: 20px;
    border-radius: 15px;
    background: transparent;
    color: #fff;
    width: 100%;
  }

  .calc-form h2 { margin-top: 0; }

  .sow-quickbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 10px;
  }

  .sow-list {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 10px auto;
  }

  .sow-row {
    display: grid;
    grid-template-columns: 35% 5% 15% 15% 17% 8%; /* = 100% for 6 cols */
    gap: 1%;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    background: rgba(0,0,0,0.12);
  }

  .sow-row input, .sow-row select {
    width: 100%;
    height: 34px;
    padding: 2px 10px;
    border-radius: 14px;
    background-color: rgba(255,255,255,0.05);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.30);
    font-size: 12px;
    font-family: var(--sow-sans);
    box-sizing: border-box
  }
  .sow-row select { padding-right: 0px; }
  .sow-row .sow-title { font-weight: 700; color: #FDA929; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sow-row .sow-line-total { background: rgba(255,255,255,0.04); font-weight: 600; }

  .sow-remove {
    height: 34px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 12px;
    color: #fff;
    padding: 6px 10px;
    cursor: pointer;
    font-family: var(--sow-sans);
  }
  .sow-remove:hover { background: rgba(255,255,255,0.12); }

  .sow-card {
    border: 2px solid #FDA929;
    border-radius: 15px;
    background: #2b4a5e;
    color: #fff;
    box-shadow: 0 0 10px 2px #FDA929;
    margin: 15px auto 0 auto;
    max-width: 50%;
  }
  .sow-card__header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 18px;
    text-align: center;
    color: #FDA929;
  }
  .sow-card__body { padding: 12px 16px; }
  .sow-card__body .sow-line { display:flex; justify-content:space-between; padding:4px 0; }
  .sow-card__footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    display:flex; justify-content: space-between; align-items:center;
    font-size: 16px;
  }

  /* Tiered selector */
  .sow-tier{ max-width: 100%; margin: 0 auto 8px; }
  .sow-tier__row{ display:flex; gap:12px; align-items:flex-start; margin:6px 0; }
  .sow-tier__label{ width:120px; min-width:120px; text-align:right; color:#e9f2f7; opacity:.95; font-weight:600; font-size:16px; padding-top:6px; font-family: 'alfarn', serif; }
  .sow-tierbar{
    display:flex; flex-wrap:wrap; align-items:center; gap:8px;
    padding: 8px 5px; border-radius:12px;
    background: rgba(0,0,0,0.08); border:1px solid rgba(255,255,255,0.10);
    min-height: 40px; flex:1;
  }
  .sow-divider{ height:1px; background:rgba(255,255,255,.12); margin:10px auto 12px; max-width:900px; }
  .is-hidden{ display:none !important; }

  /* Chips base + variants (smaller + distinct tones) */
  .sow-chip{
    cursor: pointer;
    border-radius: 14px;
    transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
    border: 1px solid rgba(255,255,255,0.25);
    color:#fff;
    white-space: nowrap;
    font-family: var(--sow-sans);
    font-weight: 600;
    letter-spacing: .1px;
  }
  .sow-chip:hover{ transform: translateY(-1px); }
  .chip-active{ outline:2px solid #FDA929; box-shadow: 0 0 0 2px rgba(253,169,41,0.18) inset; }
  .chip--cat   { background: rgba(255,255,255,0.10); font-size:13.5px; padding: 6px 11px; }
  .chip--item  { background: rgba(255,255,255,0.08); font-size:12.5px; padding: 6px 10px; }
  .chip--sub   { background: rgba(255,255,255,0.06); font-size:12px;   padding: 5px 10px; }

  @media (max-width: 900px){
    .sow-tier__label{ width:92px; min-width:92px; font-size:12.5px; }
    .sow-tierbar{ gap:6px; min-height: 36px; padding: 6px; }
    .chip--cat{ font-size:13px; padding:6px 10px; }
    .chip--item{ font-size:12.25px; padding:5px 9px; }
    .chip--sub{ font-size:11.75px; padding:5px 9px; }

    /* 2C-D: sow-row reflow — 6-col percentage grid → semantic 2-col layout
       Column mapping:
         col 1 (title, 35%)  → spans full width (title needs space)
         col 2 (qty, 5%)     → pairs with unit select (col 3, 15%)
         col 4 (unit cost)   → pairs with line total (col 5)
         col 6 (remove btn)  → full width
       Achieved by: 2-col grid + targeted grid-column spans on each cell type */
    .sow-row {
      grid-template-columns: 1fr 1fr;
      grid-auto-rows: auto;
      row-gap: 6px;
    }

    /* Title spans full width — needs room for long item names */
    .sow-row .sow-title {
      grid-column: 1 / -1;
      white-space: normal;        /* allow wrapping on tablet */
    }

    /* Qty + Unit pair: each takes one column */
    .sow-row .sow-qty  { grid-column: 1; }
    .sow-row .sow-unit { grid-column: 2; }

    /* Unit Cost + Line Total pair */
    .sow-row .sow-unitcost   { grid-column: 1; }
    .sow-row .sow-line-total { grid-column: 2; }

    /* Remove button spans full width */
    .sow-row .sow-remove {
      grid-column: 1 / -1;
      width: 100%;
    }

    /* Notes wrap already spans full width via grid-column: 1 / -1 in base rule */
  }
  /* ===================== SCOPE OF WORK — NEW STYLES (END) ======================= */

/* Labels above for all rows (Categories, Items, Subitems) */
#scopeContainer .sow-tier .sow-tier__row{
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
#scopeContainer .sow-tier .sow-tier__row .sow-tier__label{
  width: auto; min-width: 0; text-align: left; padding: 0 4px 4px 4px;
}
#scopeContainer .sow-tier .sow-tier__row .sow-tierbar{ width: 100%; }

/* New-row highlight */
.sow-row--new {
  background: rgba(253, 169, 41, 0.18); /* transparent yellow */
  transition: background 1.2s ease;
}




/* ===================== SOW: PROJECT DESCRIPTION (START) ===================== */
/* Add a little vertical space between the main row and the notes box */
#scopeContainer .sow-row{
  row-gap: 8px; /* overrides the row part of `gap` for this grid */
}

/* Make the description sit on its own line spanning all columns */
#scopeContainer .sow-row .sow-notes-wrap{
  grid-column: 1 / -1;
}

/* Textarea that wraps and auto-grows vertically */
#scopeContainer .sow-notes{
  width: 100%;
  min-height: 42px;         /* initial height */
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font: 12px/1.4 var(--sow-sans, ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  box-sizing: border-box;

  /* wrapping / vertical growth */
  white-space: pre-wrap;    /* wrap long lines, keep user line breaks */
  word-break: break-word;
  overflow: hidden;         /* needed for smooth auto-resize */
  resize: vertical;         /* user can drag taller too (optional) */
}
#scopeContainer .sow-notes::placeholder{
  color: rgba(255,255,255,.70);
}

/* =====================================MORE STYLES FOR SOW ROWS ====================================*/
/* Keep layout stable */
.sow-row {
  position: relative;
  border: 2px solid transparent;
}

/* New rows: ONLY the yellow background (no outer glow here) */
.sow-row.sow-row--new {
  box-shadow: transparent; /* soft inner hint only */
}

/* When the new row is at the TOP: add the persistent yellow glow */
.sow-list > .sow-row:first-child.sow-row--new {
  border-color: #FDA929;
  box-shadow: 0 0 10px 1px #FDA929,                 /* outer glow */
              0 0 0 1px rgba(253,169,41,0.25) inset;/* keep inner hint */
}

/* After “settle”, fade the background only (glow stays on the top row via rule above) */
.sow-row.sow-row--new.sow-row--settled {
  background: rgba(0,0,0,0.12); /* your default row bg */
  /* no change to border/outer glow here */
}

/* Active row (the one the user is typing/clicking in) gets the glow */
.sow-row:focus-within {
  border-color: #FDA929;
  box-shadow: 0 0 10px 1px #FDA929;
}

/* When focus is anywhere inside the list BUT NOT inside the first row,
   remove the yellow border from the first (new) row and keep only the inner hint */
.sow-list:focus-within > .sow-row:first-child.sow-row--new:not(:focus-within) {
  border-color: transparent !important;
  box-shadow: none; /* inner hint only */
}
/* ===================== SOW: PROJECT DESCRIPTION (END) ======================= */

/* 2) Give the grid the same width clamp as SOW and let auto margins work */
.calc-two-col{
  width: 100%;
  max-width: 1200px;             /* same as .sow-form */
  margin: 10px;             /* keeps it centered within .main-content */
  display: grid;
  grid-template-columns: 60% 35%;
  column-gap: 5%;
  align-items: start;            /* nicer than center for form/content */
  margin-bottom: 3%;
}

/* Make the form fill its grid column (don’t constrain to 800px here) */
.calc-two-col #rehabForm{
  max-width: none;
  width: 100%;
  margin: 0;        /* remove auto-centering inside its grid cell */
}

/* Let the results card size naturally within the right column */
.calc-two-col .results-panel{
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: center;
  justify-self: stretch;
  align-self: center;  
  position: static;

}
/* === TWO-COLUMN LAYOUT: form + results (END) === */




/* =================== CTA button (matches Mortgage Calculator) ==================== */
.lf-btn{
  background-color:#FDA929;   /* same orange */
  color:#fff;
  border:none;
  border-radius:25px;          /* pill */
  font-family:'alfarn', serif; /* same font */
  font-size:14px;
  padding:10px 18px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.lf-btn:hover,
.lf-btn:focus{
  background-color:#e08924;   /* same hover */
  outline:none;
}
.lf-btn:disabled{ opacity:.6; cursor:not-allowed; }

/* optional: container for action buttons */
.sow-controls{
  display:flex; gap:12px; flex-wrap:wrap;
  justify-content:center; margin:14px 0 6px;
}


/* === lf-disable-menus === */
  nav, .navbar, .menu, .tabs, .tab-nav, .topnav, #tabs { display: none !important; }

/* ============================================================
   2C-D — Responsive: tablet & mobile
   All rules below are additive max-width overrides.
   Desktop rules above this block are untouched.
   ============================================================ */

/* --- 768px: calc-two-col collapses, sow-card full-width, info-box capped --- */
@media (max-width: 768px) {

  /* Two-column form+results layout → single column on phone */
  .calc-two-col {
    grid-template-columns: 1fr;
    column-gap: 0;
    margin: 10px 0;
  }

  /* SOW breakdown card: remove the 50% max-width that crushes on mobile */
  .sow-card {
    max-width: 100%;
  }

  /* Info tooltip: cap width to prevent viewport overflow */
  .info-box {
    min-width: 0;
    width: min(300px, 90vw);
    left: 0;           /* anchor left instead of calc(100%+10px) which pushes off-screen */
    top: calc(100% + 6px);
  }

  /* SOW form: tighter horizontal padding on phone */
  .sow-form {
    padding: 12px;
  }

  /* Results panel text size reduction on phone */
  .results-panel p      { font-size: 18px; }
  .results-panel strong { font-size: 20px; }
}

/* --- 480px: final polish --- */
@media (max-width: 480px) {

  /* sow-row: fully single-column on small phones */
  .sow-row {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }

  /* All sow-row cells span full width in single-col */
  .sow-row .sow-title,
  .sow-row .sow-qty,
  .sow-row .sow-unit,
  .sow-row .sow-unitcost,
  .sow-row .sow-line-total,
  .sow-row .sow-remove {
    grid-column: 1 / -1;
    width: 100%;
  }

  /* h1/h2 scale on very small screens */
  h1 { font-size: 1.5rem; margin: 16px 0; }
  h2 { font-size: 1.1rem; }

  /* Body padding reduction */
  body { padding: 12px; }
}
