/**
 * SIP Calculator styles — sliders + donut.
 * Outer width handled by the plugin's global .dq-calc-wrap rule.
 */

.dq-sip__body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: center;
}

/* controls */
.dq-sip__row { margin-bottom: 1.5rem; }
.dq-sip__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 1rem;
}
.dq-sip__head label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var( --dq-ink, #12161b );
}
.dq-sip__val {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: var( --dq-surface-alt, #f6f8fa );
  border: 1px solid var( --dq-line, #e2e7ed );
  border-radius: var( --dq-radius, 6px );
  padding: 0.25rem 0.5rem;
}
.dq-sip__val input {
  width: 6.5rem;
  border: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  color: var( --dq-accent, #0066cc );
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dq-sip__val input:focus { outline: 0; }
.dq-sip__cur { font-weight: 700; color: var( --dq-accent, #0066cc ); }
.dq-sip__suffix { font-size: 0.8rem; color: var( --dq-muted, #616b78 ); font-weight: 600; }

/* range slider */
.dq-sip input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var( --dq-line, #e2e7ed );
  outline: none;
}
.dq-sip input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var( --dq-accent, #0066cc );
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.dq-sip input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var( --dq-accent, #0066cc );
  cursor: pointer;
  border: 3px solid #fff;
}
.dq-sip__curpick {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.dq-sip__curpick label { font-size: 0.82rem; font-weight: 600; color: var( --dq-muted, #616b78 ); }
.dq-sip__curpick select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var( --dq-line, #e2e7ed );
  border-radius: var( --dq-radius, 6px );
  background: #fff;
  font-size: 0.9rem;
}

/* donut */
.dq-sip__viz { text-align: center; }
.dq-sip__donut { width: 100%; max-width: 240px; }
.dq-sip__track {
  fill: none;
  stroke: var( --dq-line, #e2e7ed );
  stroke-width: 22;
}
.dq-sip__arc {
  fill: none;
  stroke: var( --dq-accent, #0066cc );
  stroke-width: 22;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}
.dq-sip__donut-lab {
  text-anchor: middle;
  font-size: 12px;
  fill: var( --dq-muted, #616b78 );
}
.dq-sip__donut-val {
  text-anchor: middle;
  font-size: 22px;
  font-weight: 800;
  fill: var( --dq-ink, #12161b );
}
.dq-sip__legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var( --dq-muted, #616b78 );
}
.dq-sip__legend span { display: flex; align-items: center; gap: 0.5rem; justify-content: center; }
.dq-sip__legend b { color: var( --dq-ink, #12161b ); font-variant-numeric: tabular-nums; }
.dq-sip__dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dq-sip__dot--inv { background: var( --dq-line, #e2e7ed ); }
.dq-sip__dot--ret { background: var( --dq-accent, #0066cc ); }

@media ( max-width: 620px ) {
  .dq-sip__body { grid-template-columns: 1fr; gap: 1.5rem; }
  .dq-sip__viz { order: -1; }
  .dq-sip__val input { width: 5.5rem; }
}
