/* ── TTL Calculator ────────────────────────────────────────────────── */
.ttl-section-title { font-size: 17px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.ttl-section-desc { font-size: 14px; color: var(--muted); margin: 0 0 20px; }

/* Converter */
.ttl-converter-card,
.ttl-reference-card,
.ttl-domain-card { margin-bottom: 20px; }

.ttl-input-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ttl-input-wrap { flex: 1; min-width: 180px; max-width: 280px; }
.ttl-result {
  flex: 1;
  padding: 14px 20px;
  background: var(--surface2, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  min-height: 52px;
  display: flex;
  align-items: center;
}
.ttl-result-human {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

/* Presets */
.ttl-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 20px;
}
.ttl-presets-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.ttl-preset-btn {
  background: var(--surface2, rgba(255,255,255,0.05));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.ttl-preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.ttl-preset-btn--active {
  background: rgba(99,102,241,0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Breakdown grid */
.ttl-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.ttl-bd-item {
  text-align: center;
  padding: 16px 8px;
  background: var(--surface2, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 10px;
}
.ttl-bd-val { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.ttl-bd-label { font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Advice */
.ttl-advice-box {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.ttl-advice--ok { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #4ade80; }
.ttl-advice--warn { background: rgba(234,179,8,0.1); border: 1px solid rgba(234,179,8,0.25); color: #facc15; }
.ttl-advice--info { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2); color: var(--accent-light, #a5b4fc); }

/* Reference table */
.ttl-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ttl-ref-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  font-weight: 500;
  font-size: 13px;
}
.ttl-ref-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
}
.ttl-ref-table tr:last-child td { border-bottom: none; }
.ttl-ref-table td:first-child { font-family: monospace; color: var(--accent); font-weight: 600; }
.ttl-ref-table td:nth-child(2) { color: var(--muted); }

/* Domain form */
.ttl-domain-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ttl-domain-row .input-wrap { flex: 1; min-width: 200px; }

/* DNS TTL results */
.ttl-domain-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--surface2, rgba(255,255,255,0.04));
  border-radius: 8px;
}
.ttl-domain-name { font-weight: 600; color: var(--text); font-size: 15px; }
.ttl-min-ttl { font-size: 13px; color: var(--muted); }
.ttl-min-ttl strong { color: var(--accent); }

.ttl-dns-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ttl-dns-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.ttl-dns-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ttl-dns-table tr:last-child td { border-bottom: none; }
.ttl-dns-table tr:hover td { background: rgba(255,255,255,0.02); }
.ttl-dns-value { color: var(--muted); font-family: monospace; font-size: 13px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.ttl-low { color: #facc15; font-weight: 600; }
td.ttl-high { color: var(--muted); }

/* DNS type badges - reuse from dns.css if present, else define here */
.dns-type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(99,102,241,0.12);
  color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
  .ttl-breakdown-grid { grid-template-columns: repeat(2, 1fr); }
  .ttl-input-row { flex-direction: column; }
  .ttl-domain-row { flex-direction: column; }
  .ttl-dns-value { max-width: 120px; }
}
