/* ==========================================================================
   OnlyTools – dodatki stron produktowych (liny, wiertnice, rury, segmenty)
   Bazuje na main.css + kategoria.css
   ========================================================================== */

/* wspólne: panel narzędzia interaktywnego */
.tool { display: grid; gap: var(--gutter); }
.tool > * { min-width: 0; }
.tool__in { display: grid; gap: var(--s-5); align-content: start; padding: var(--s-6); background: var(--c-panel); border: 1px solid var(--c-line); }
.tool__out { display: grid; gap: var(--s-4); align-content: start; padding: var(--s-6); background: var(--c-base); border: 1px solid var(--c-line); border-top: 2px solid var(--c-accent); }
.tool__out.is-flash { animation: fade-up .35s var(--ease) both; }
.tool__label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-2); }
.tool__label label, .tool__label span { font-family: var(--font-display); font-size: var(--fs-sm); color: var(--c-text-2); }
.tool__label output { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--c-text); font-variant-numeric: tabular-nums; }
.tool input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; --fill: 50%; }
.tool input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--c-accent) 0 var(--fill), var(--c-line-hi) var(--fill) 100%); }
.tool input[type="range"]::-moz-range-track { height: 4px; background: var(--c-line-hi); }
.tool input[type="range"]::-moz-range-progress { height: 4px; background: var(--c-accent); }
.tool input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; background: var(--c-text); border: 3px solid var(--c-accent); }
.tool input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: var(--c-text); border: 3px solid var(--c-accent); border-radius: 0; }
.tool input[type="range"]:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }
.tool__k { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-text-muted); }
.tool__big { font-family: var(--font-display); font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); line-height: 1; font-weight: 600; color: var(--c-text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tool__big small { font-size: .4em; font-weight: 500; color: var(--c-text-muted); letter-spacing: 0; }
.tool__dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--c-line); border: 1px solid var(--c-line); }
.tool__dl div { padding: .6rem .8rem; background: var(--c-panel); }
.tool__dl dt { font-family: var(--font-display); font-size: .625rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-muted); }
.tool__dl dd { margin: .2rem 0 0; font-size: var(--fs-sm); color: var(--c-text); font-variant-numeric: tabular-nums; }
.tool__note { padding-left: var(--s-3); border-left: 2px solid var(--c-accent); font-size: var(--fs-sm); color: var(--c-text-2); }
.tool__fine { font-size: var(--fs-xs); color: var(--c-text-muted); }
.tool__out .btn { white-space: normal; text-align: center; }
.tool__out .btn.is-added { background: var(--c-success); color: var(--c-base); }
@media (min-width: 1024px) {
  .tool { grid-template-columns: repeat(12, 1fr); }
  .tool__in { grid-column: 1 / span 5; }
  .tool__out { grid-column: 6 / span 7; }
}

/* ---------- Lina: rysunek przekroju i pętli ---------- */
.wc__svg { width: 100%; height: auto; display: block; background: var(--c-panel); border: 1px solid var(--c-line); }
.wc__block { fill: url(#wc-hatch); stroke: #64748B; transition: all .4s var(--ease); }
.wc__loop { fill: none; stroke: var(--c-accent); stroke-width: 3; stroke-dasharray: 10 7; animation: wire-run 1.1s linear infinite; }
@keyframes wire-run { to { stroke-dashoffset: -34; } }
.wc__wheel { fill: var(--c-base); stroke: var(--c-text-muted); stroke-width: 2; }
.wc__lbl { fill: var(--c-text); font-family: var(--font-display); font-size: 13px; font-weight: 600; text-anchor: middle; }

/* ---------- Wiertnica: wskaźnik mocy ---------- */
.rigc__pw { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.rigc__pw i { height: 10px; background: var(--c-line); transition: background-color .3s; }
.rigc__pw i.is-on { background: var(--c-accent); }
.rigc__name { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--c-text); }

/* ---------- Segment: konfigurator ---------- */
.segc__shapes { border: 0; padding: 0; margin: 0; min-inline-size: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.segc__shapes legend { width: 100%; padding: 0; margin-bottom: var(--s-2); font-family: var(--font-display); font-size: var(--fs-sm); color: var(--c-text-2); }
.segc__svg { width: 100%; height: auto; display: block; background-color: var(--c-panel); border: 1px solid var(--c-line);
  background-image: linear-gradient(var(--c-line) 1px, transparent 1px), linear-gradient(90deg, var(--c-line) 1px, transparent 1px); background-size: 20px 20px; }
.segc__body { fill: #8F96A3; stroke: #C9CED6; stroke-width: 1.5; transition: all .4s var(--ease); }
.segc__top { fill: #B4BAC4; stroke: #C9CED6; stroke-width: 1.5; }
.segc__side { fill: #6A7383; stroke: #C9CED6; stroke-width: 1.5; }
.segc__grooves path { stroke: #4B5565; stroke-width: 3; fill: none; }
.segc__dim { fill: var(--c-text); font-family: var(--font-display); font-size: 13px; font-weight: 600; text-anchor: middle; }
.segc__code { font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; color: var(--c-text); }
.segc__code.is-flash { animation: code-flash .6s var(--ease); }
@keyframes code-flash { 0% { color: var(--c-accent); } 100% { color: var(--c-text); } }
.segc__row { display: grid; grid-template-columns: 1fr 120px; gap: var(--s-2); }
.segc__row select, .segc__row input { min-height: 48px; padding: .6rem .8rem; background: var(--c-base); border: 1px solid var(--c-line-hi); color: var(--c-text); font-size: 1rem; min-width: 0; }

/* ---------- Oferta wiertnic: sprzedaż / wynajem / refurbished ---------- */
.offer3 { display: grid; gap: var(--gutter); }
.offer3 li { display: grid; gap: var(--s-2); align-content: start; padding: var(--s-6); background: var(--c-panel); border: 1px solid var(--c-line); border-top: 2px solid var(--c-line-hi); }
.offer3 li:hover { border-top-color: var(--c-accent); }
.offer3 b { font-family: var(--font-display); font-size: var(--fs-label); letter-spacing: .1em; color: var(--c-accent); }
.offer3 p { font-size: var(--fs-sm); color: var(--c-text-muted); }
.offer3 .link-arrow { margin-top: auto; }
@media (min-width: 768px) { .offer3 { grid-template-columns: repeat(3, 1fr); } }

@media (prefers-reduced-motion: reduce) { .wc__loop { animation: none; } }
.tool__dl div:last-child:nth-child(odd) { grid-column: 1 / -1; }
