/* Free tools (maintenance-calculator.html, water-bill-calculator.html). Builds on site.css. */

.tool-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 2rem; align-items: start; max-width: 1120px; margin: 0 auto; }
.tool-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.tool-card + .tool-card { margin-top: 1.25rem; }
.tool-card h2 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .25rem; display: flex; align-items: center; gap: .6rem; }
.tool-card h2 .n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent)); flex: none; }
.tool-card .hint { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.tool-card label { font-weight: 600; font-size: .9rem; color: var(--ink); }

.trow { display: grid; grid-template-columns: minmax(0, 1fr) 150px 38px; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.trow.three { grid-template-columns: minmax(0, 1fr) 120px 120px 38px; }
.trow .form-control { min-width: 0; }
.trow .rupee { position: relative; }
.trow .rupee::before { content: "₹"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.trow .rupee .form-control { padding-left: 1.6rem; }
.trow .unit { position: relative; }
.trow .unit::after { content: attr(data-unit); position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.trow .unit .form-control { padding-right: 2.6rem; }
.trow-head { display: grid; grid-template-columns: minmax(0, 1fr) 150px 38px; gap: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.trow-head.three { grid-template-columns: minmax(0, 1fr) 120px 120px 38px; }
.row-del { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; }
.row-del:hover, .row-del:focus-visible { color: #c0392b; border-color: #f1c4bd; background: #fff6f5; }
.add-row { border: 1px dashed #c9d2e6; background: var(--soft); color: var(--brand); font-weight: 700; border-radius: 12px; padding: .55rem 1rem; }
.add-row:hover, .add-row:focus-visible { background: var(--brand-soft); }

.seg { display: inline-flex; flex-wrap: wrap; gap: .4rem; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: .3rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: .5rem .95rem; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; color: #56627a; }
.seg input:checked + label { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice { display: grid; gap: .55rem; }
.choice label { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 600; }
.choice label small { display: block; font-weight: 400; color: var(--muted); font-size: .86rem; margin-top: .1rem; }
.choice input { margin-top: .25rem; accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.tool-side { position: sticky; top: 92px; }
.tool-out { border-radius: var(--radius); padding: 1.6rem; color: #fff;
  background: radial-gradient(520px 240px at 90% -20%, rgba(79, 124, 255, .55), transparent 60%), linear-gradient(140deg, #0e1a44, #070b19); box-shadow: var(--shadow-lg); }
.tool-out .label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(214, 222, 240, .7); font-weight: 700; }
.tool-out .big { font-weight: 800; font-size: 2.7rem; line-height: 1.05; letter-spacing: -.03em; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.tool-out .big small { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: rgba(214, 222, 240, .8); }
.tool-out .lines { margin: 1.1rem 0 0; padding: 0; list-style: none; display: grid; gap: .35rem; font-variant-numeric: tabular-nums; }
.tool-out .lines li { display: flex; justify-content: space-between; gap: 1rem; font-size: .93rem; color: rgba(214, 222, 240, .85); }
.tool-out .lines li b { color: #fff; }
.tool-out .lines li.total { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: .45rem; margin-top: .2rem; font-weight: 700; color: #fff; }
.tool-out .per { margin-top: 1rem; display: grid; gap: .5rem; }
.tool-out .per div { display: flex; justify-content: space-between; gap: .8rem; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px; padding: .6rem .8rem; font-variant-numeric: tabular-nums; }
.tool-out .per b { color: var(--accent-bright); font-size: 1.1rem; }
.tool-out .note { font-size: .82rem; color: rgba(214, 222, 240, .7); margin-top: .8rem; }
.tool-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.tool-actions .btn { flex: 1 1 auto; }
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover, .btn-wa:focus-visible { background: #1ebe5a; border-color: #1ebe5a; color: #fff; }

.tool-upsell { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; }
.tool-upsell h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 .4rem; }
.tool-upsell p { color: #56627a; font-size: .95rem; margin-bottom: 1rem; }

.water-table { width: 100%; font-variant-numeric: tabular-nums; font-size: .93rem; }
.water-table th { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(214, 222, 240, .7); font-weight: 700; padding: .3rem 0; }
.water-table td { padding: .32rem 0; border-top: 1px solid rgba(255, 255, 255, .08); color: rgba(214, 222, 240, .9); }
.water-table td:last-child, .water-table th:last-child { text-align: right; }
.water-table td:last-child { color: #fff; font-weight: 700; }
.water-table td:nth-child(2), .water-table th:nth-child(2) { text-align: right; padding-right: 1rem; }
.water-scroll { max-height: 340px; overflow: auto; margin-top: .6rem; padding-right: .3rem; }

.paste-box textarea { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.privacy-line { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .88rem; margin-top: .8rem; }
.privacy-line i { color: var(--accent); }

.guide-copy { max-width: 820px; margin: 0 auto; }
.guide-copy h2 { font-weight: 800; letter-spacing: -.02em; margin-top: 2.2rem; }
.guide-copy h2:first-child { margin-top: 0; }
.guide-copy p, .guide-copy li { color: #3c4760; line-height: 1.75; }
.guide-copy ol, .guide-copy ul { padding-left: 1.2rem; }

@media (max-width: 991.98px) {
  .tool-wrap { grid-template-columns: minmax(0, 1fr); }
  .tool-side { position: static; }
}
@media (max-width: 575.98px) {
  .tool-card, .tool-out { padding: 1.2rem; }
  .trow, .trow-head { grid-template-columns: minmax(0, 1fr) 100px 34px; gap: .4rem; }
  .trow .form-control { padding-left: .6rem; padding-right: .5rem; font-size: .95rem; }
  .trow .rupee .form-control { padding-left: 1.35rem; }
  .trow .rupee::before { left: .55rem; }
  .row-del { width: 34px; height: 34px; }
  .trow.three, .trow-head.three { grid-template-columns: minmax(0, 1fr) 92px 92px 38px; }
  .tool-out .big { font-size: 2.3rem; }
}

/* phones: the answer floats at the bottom while the visitor types; tapping it jumps to the full result */
.tool-peek { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 1030; display: none; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .8rem 1.1rem; border-radius: 16px; color: #fff; text-decoration: none; font-weight: 600;
  background: linear-gradient(140deg, #13245c, #070b19); box-shadow: 0 14px 40px rgba(10, 16, 36, .35); transition: transform .3s var(--ease); }
.tool-peek b { color: var(--accent-bright); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tool-peek:hover, .tool-peek:focus-visible { color: #fff; }
.tool-peek.away { transform: translateY(160%); }
@media (max-width: 991.98px) { .tool-peek { display: flex; } }
