/* ============================================
   TIME CONVERTER
   ============================================ */
.time-converter {
  max-width: 700px;
  margin: 0 auto;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.time-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
}

.time-result-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.time-result-card.active-unit {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--on-primary);
  border-color: transparent;
}

.time-result-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.time-result-card.active-unit .time-result-label {
  color: rgba(var(--on-primary-rgb), 0.8);
}

.time-result-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.time-result-card.active-unit .time-result-value {
  color: var(--on-primary);
}

/* ============================================
   TIME CONVERTER — additions
   Append to tools.css after existing .time-converter rules.
   Namespaced .tc-* to avoid collisions.
   ============================================ */

/* Input row: value + unit, side-by-side on desktop, stacked on mobile */
.tc-input-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tc-input-row .input-group { margin-bottom: 0; }

.tc-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Preset chips */
.tc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.tc-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  min-height: 44px;          /* touch-target */
  display: inline-flex;
  align-items: center;
}

.tc-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.tc-chip:active { transform: translateY(0); }

/* Human-readable summary line under the grid */
.tc-readable {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 1rem;
  color: var(--text);
  min-height: 24px;
}

.tc-readable:empty {
  display: none;
}

.tc-readable strong {
  color: var(--primary);
  margin-right: 0.4rem;
}

/* Action bar */
.tc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.tc-actions .btn {
  min-height: 44px;          /* touch-target */
  flex: 1 1 auto;
  min-width: 140px;
}

/* ----- Duration tab ----- */

.tc-duration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tc-duration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tc-duration-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 80px;
}

.tc-duration-empty {
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  padding: 1rem 0;
}

.tc-duration-error { color: var(--danger); }

.tc-duration-note {
  background: rgba(var(--warning-rgb), 0.12);
  border-left: 3px solid var(--warning);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.tc-duration-headline-label,
.tc-duration-totals-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tc-duration-parts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tc-duration-part {
  text-align: center;
  padding: 0.75rem 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.tc-duration-part-zero { opacity: 0.45; }

.tc-duration-part-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tc-duration-part-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.tc-duration-totals {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.tc-duration-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.tc-duration-total-row:last-child { border-bottom: none; }

.tc-duration-total-label { color: var(--text-muted); }

.tc-duration-total-value {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tc-duration-total-value small {
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.25rem;
}

/* ----- Mobile (< 600px) ----- */
@media (max-width: 600px) {
  .tc-input-row,
  .tc-duration-grid {
    grid-template-columns: 1fr;
  }
  .tc-duration-parts {
    grid-template-columns: repeat(3, 1fr);
  }
  .tc-duration-part-value {
    font-size: 1.25rem;
  }
  .tc-actions .btn {
    flex: 1 1 100%;
  }
}

.calc-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.calc-tabs::-webkit-scrollbar { display: none; }

.calc-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.calc-tab:hover { color: var(--primary); }

.calc-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.calc-section { display: none; }
.calc-section.active { display: block; animation: fadeUp 0.25s ease; }

