/* ============================================================
   Utilities Bunker — Text Case Converter (v2.1)
   File: /assets/css/modules/convert/text-case-converter.v2.1.css
   Purpose:
   - Tool-only layout and visual styling
   - Keeps shared UB Toolkit untouched
   - Mobile-first, accessible, fast, and clean
   ============================================================ */

:root{
  --tcc-radius: 16px;
  --tcc-gap: 14px;
  --tcc-soft: rgba(0,0,0,.06);
  --tcc-accent-soft: rgba(249,58,19,.10);
  --tcc-accent-ring: rgba(249,58,19,.18);
}

.tcc-hero{
  display:grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: var(--tcc-gap);
}

@media (max-width: 1024px){
  .tcc-hero{
    grid-template-columns: 1fr;
  }
}

.tcc-panel{
  background: var(--ub-surface-2);
  border: 1px solid var(--ub-border);
  border-radius: var(--tcc-radius);
  padding: 12px;
  min-width: 0;
}

.tcc-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}

.tcc-eyebrow{
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ub-muted);
}

.tcc-stats{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.tcc-stat{
  min-width: 88px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
}

.tcc-stat .k{
  display:block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ub-muted);
}

.tcc-stat .v{
  display:block;
  margin-top: 2px;
  font-family: var(--ub-mono);
  font-size: 14px;
  font-weight: 950;
  color: var(--ub-text);
}

.tcc-panel--input textarea,
.tcc-output{
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-surface-1);
  color: var(--ub-text);
  font: 500 14px/1.55 var(--ub-font);
  resize: vertical;
}

.tcc-panel--input textarea{
  min-height: 240px;
}

.tcc-panel--input textarea:focus,
.tcc-output:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--ub-focus);
}

.tcc-output{
  min-height: 110px;
  font-family: var(--ub-mono);
  overflow-wrap:anywhere;
  word-break:break-word;
}

.tcc-actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.tcc-actions .ub-btn,
.tcc-actions .ub-chip{
  min-height: 44px;
}

.tcc-actions--secondary{
  align-items:center;
}

.tcc-toolbar{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  align-items:center;
}

.tcc-mini-actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.tcc-primary-output{
  margin-top: 8px;
  min-height: 110px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ub-border);
  background: var(--ub-card-bg);
  color: var(--ub-text);
  white-space: pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  font-family: var(--ub-mono);
  font-size: 14px;
  line-height: 1.55;
}

.tcc-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 900px){
  .tcc-grid{
    grid-template-columns: 1fr;
  }
}

.tcc-card{
  border: 1px solid var(--ub-border);
  border-radius: 16px;
  background: var(--ub-card-bg);
  padding: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.tcc-card:hover{
  border-color: rgba(249,58,19,.35);
  background: var(--ub-surface-2);
}

.tcc-card.is-active{
  border-color: rgba(249,58,19,.55);
  box-shadow: 0 0 0 4px var(--tcc-accent-ring);
  background: linear-gradient(180deg, var(--ub-card-bg), var(--tcc-accent-soft));
}

.tcc-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}

.tcc-card-head h3{
  margin: 0;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .02em;
  color: var(--ub-text);
}

.tcc-card .ub-chip{
  min-height: 40px;
  padding: 8px 12px;
}

.ub-work{
  font-family: var(--ub-mono);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.ub-btn--block{
  width: 100%;
}

@media (max-width: 640px){
  .tcc-stat{
    min-width: 78px;
  }

  .tcc-mini-actions{
    width: 100%;
  }

  .tcc-mini-actions .ub-btn{
    flex: 1 1 100%;
  }

  .tcc-actions .ub-btn{
    width: 100%;
  }

  .tcc-actions .ub-chip{
    flex: 1 1 calc(50% - 10px);
  }

  .tcc-toolbar .ub-chip{
    width: 100%;
    justify-content:flex-start;
  }
}

@media (prefers-reduced-motion: reduce){
  .tcc-card{
    transition: none;
  }
}