/* ------------------------------------------------------------------
   SMS segment counter tool (sms-counter.html)
   Relies on service.css for the .svc-sms phone mock.
   ------------------------------------------------------------------ */

.smc-hero { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.smc-hero-inner { max-width: 780px; }
.smc-hero h1 { margin-bottom: 0.6rem; }
.smc-hero .lead { max-width: 62ch; }

.smc-tool { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.smc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 960px) { .smc-grid { grid-template-columns: 1fr; } }

.smc-pane {
  background: rgba(244, 239, 230, 0.04);
  border: 1px solid rgba(244, 239, 230, 0.1);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.smc-row { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: end; }
@media (max-width: 560px) { .smc-row { grid-template-columns: 1fr; } }

.smc-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.smc-editor-tools { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.smc-link-btn {
  background: none;
  border: none;
  color: var(--orange);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}
.smc-link-btn:hover { color: var(--orange-bright); text-decoration: underline; }
.smc-link-btn:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: none; }

.field textarea.smc-message { min-height: 160px; font-size: 1rem; line-height: 1.5; }

.smc-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  margin: 0.2rem 0 1.2rem;
}
.smc-check input { width: 18px; height: 18px; accent-color: var(--orange); cursor: pointer; }

.sms-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
  margin-top: 0.4rem;
}
@media (max-width: 560px) { .sms-stats { grid-template-columns: repeat(2, 1fr); } }
.sms-stats li {
  background: rgba(22, 17, 15, 0.55);
  border: 1px solid rgba(244, 239, 230, 0.09);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
}
.sms-stats span { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-head); font-weight: 600; }
.sms-stat-value {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--cream);
  line-height: 1.2;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}
.sms-stat-value.is-warn { color: var(--orange-bright); }

.sms-meter { margin-top: 0.9rem; }
.sms-meter-bar { height: 8px; border-radius: 999px; background: rgba(244, 239, 230, 0.1); overflow: hidden; }
.sms-meter-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--peri), var(--orange)); transition: width 0.2s ease; }
.sms-meter.is-multi .sms-meter-fill { background: linear-gradient(90deg, var(--orange), #e5484d); }
.sms-billed { margin-top: 0.5rem; font-size: 0.88rem; color: var(--muted); min-height: 1.3em; }

/* ---- Cost panel ---- */
.sms-cost {
  margin-top: 1.4rem;
  background: rgba(245, 115, 27, 0.06);
  border: 1px solid rgba(245, 115, 27, 0.22);
  border-radius: var(--radius-lg, 16px);
  padding: clamp(1.1rem, 2.5vw, 1.4rem);
}
.sms-cost-head h2 {
  font-size: 1rem;
  font-family: var(--font-head);
  margin: 0 0 0.25rem;
  color: var(--cream);
}
.sms-cost-head p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.sms-cost-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.sms-cost-inputs .field { margin: 0; }
.sms-cost-inputs .field-hint { margin-top: 0.3rem; }

.sms-rate-wrap { position: relative; }
.sms-rate-prefix {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}
.sms-rate-wrap input { padding-left: 2rem; }

.sms-cost-out {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.sms-cost-out li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
}
.sms-cost-out li span { color: var(--muted); }
.sms-cost-out li strong {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--cream);
  text-align: right;
}
.sms-cost-out li.is-total {
  margin-top: 0.3rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
}
.sms-cost-out li.is-total span { color: var(--cream); font-weight: 600; }
.sms-cost-out li.is-total strong {
  font-size: 1.5rem;
  color: var(--orange);
}

.sms-cost-note {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}
.sms-cost-note.is-good { color: #9fe8b3; }
.sms-cost-note.is-warn { color: #ffd27a; }

.sms-flags {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(245, 115, 27, 0.08);
  border: 1px solid rgba(245, 115, 27, 0.3);
}
.sms-flags h2 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.sms-flags ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.86rem; color: var(--muted); }
.sms-flags code {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color: var(--cream);
  background: rgba(244, 239, 230, 0.1);
  padding: 0.05em 0.45em;
  border-radius: 5px;
}

.smc-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 239, 230, 0.1);
  flex-wrap: wrap;
}
.smc-actions .btn { flex: 1; min-width: 180px; }
.smc-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.smc-status { min-height: 1.2em; margin-top: 0.5rem; font-size: 0.82rem; color: var(--muted); }

.smc-phone-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 100px;
}
@media (max-width: 960px) { .smc-phone-pane { position: static; } }
.smc-phone-pane .svc-sms-screen { min-height: 420px; }
.svc-sms-bubble.is-empty { color: var(--muted-dark); font-style: italic; }
.sms-seg-tag {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dark);
  font-family: var(--font-head);
  font-weight: 600;
}
.smc-note { color: var(--muted); font-size: 0.85rem; text-align: center; max-width: 320px; }

.smc-rules { margin-top: 1rem; }
.smc-rules summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--cream);
  padding: 0.6rem 0;
}
.smc-rules ul { padding-left: 1.2rem; color: var(--muted); font-size: 0.88rem; }
.smc-rules li { margin-bottom: 0.3rem; }

.smc-why { text-align: center; }
.smc-why .container { max-width: 720px; }
.smc-why p { color: #4a3f36; }
.smc-why p a { color: var(--orange); font-weight: 600; }
