/* ============================================================
   Utilities Bunker — 555 Timer Calculator (Monostable) v2.1
   File: /assets/css/modules/electronics/555-monostable.v2.1.css
   Purpose:
   - Tool-only layout polish + solve bar + work formatting
   - No changes to ub-toolkit.v2.1.css
   - Mobile-first, 44x44 touch targets, clamp() typography
   - Container queries where useful
   ============================================================ */

/* ==============================
   Local tokens (tool-scoped)
   ============================== */
:root{
  --m555-radius: 16px;
  --m555-gap: 14px;
  --m555-soft: rgba(0,0,0,.06);
}

/* ==============================
   Header row helper
   ============================== */
.ub-flex-head{
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}

/* ==============================
   Lists in tool content
   ============================== */
.ub-ol{
  margin:0;
  padding-left:18px;
}
.ub-ul{
  margin:0;
  padding-left:18px;
}

/* ==============================
   Solve bar
   ============================== */
.ub-solvebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--ub-border);
  border-radius: var(--m555-radius);
  background: linear-gradient(180deg, var(--ub-surface-2), var(--ub-card-bg));
}

.ub-solvebar-label{
  font-weight: 950;
  letter-spacing: .02em;
  font-size: clamp(12px, 1vw, 14px);
  white-space: nowrap;
}

.ub-solvebar-chips{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

/* Ensure chips are finger-friendly */
.ub-solvebar .ub-chip{
  min-height: var(--ub-hit);
  padding: 10px 14px;
}

/* ==============================
   Form helpers
   ============================== */
.ub-form{
  margin:0;
}

/* Actions row */
.ub-actions-row{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
}

/* Make ghost button look consistent if toolkit doesn't style it strongly */
.ub-btn--ghost{
  min-height: var(--ub-hit);
}

/* ==============================
   Work box
   ============================== */
.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
}

/* FAQ typography */
.ub-q{
  margin: 12px 0 6px;
  font-size: var(--ub-fs-2);
  font-weight: 950;
}
.ub-a{
  margin: 0 0 10px;
  color: var(--ub-text);
  font-size: var(--ub-fs-2);
}

/* ==============================
   Tool-specific: keep inputs stable
   (Ensure input + unit stack, consistent with UB pattern)
   ============================== */
.ub-field .ub-inputrow{
  display:block;
}
.ub-field .ub-inputrow > input,
.ub-field .ub-inputrow > select{
  display:block;
  width:100%;
}
.ub-field .ub-inputrow > select{
  margin-top: 6px;
}

/* ==============================
   Rail tool buttons full width
   ============================== */
.ub-btn--block{
  width:100%;
}

/* ==============================
   Container query polish (optional)
   ============================== */
.ub-card{
  container-type: inline-size;
}

@container (max-width: 520px){
  .ub-solvebar{
    padding: 10px;
  }
  .ub-solvebar-chips{
    gap: 8px;
  }
  .ub-solvebar .ub-chip{
    width: 100%;
  }
}

/* ==============================
   Breakpoints (UB standard)
   Mobile (Portrait): 320–480
   Mobile (Landscape) / Small Tablets: 481–768
   Tablets / Small Laptops: 769–1024
   Desktops / Laptops: 1025–1440
   Large Screens: 1441+
   ============================== */

/* Mobile portrait refinements */
@media (max-width: 480px){
  .ub-actions-row .ub-btn{
    width: 100%;
  }
}

/* Large screens: keep things tidy, avoid extreme stretching inside cards */
@media (min-width: 1441px){
  .ub-solvebar{
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}
