/* Shared form layout for static calculator / convert tools */
.field-row {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.tb-input,
.tb-select,
.tb-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-input:focus,
.tb-select:focus,
.tb-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tb-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.field-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .field-row-inline {
    grid-template-columns: 1fr;
  }
}

.tb-result {
  margin-top: 20px;
  margin-bottom: 4px;
  padding: 16px 18px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
}

.tb-result[hidden] {
  display: none !important;
}

.tb-result-title {
  font-size: 13px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 10px;
}

.tb-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(186, 230, 253, 0.6);
}

.tb-result-row[hidden] {
  display: none !important;
}

.tb-result-row:last-child {
  border-bottom: none;
}

.tb-result-label {
  color: #475569;
  flex-shrink: 0;
}

.tb-result-value {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  word-break: break-word;
}

.tb-result-pre {
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tb-tab {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.tb-tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Flat underline tabs (hub / portal — not pill buttons) */
.tb-tabs--underline {
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 16px;
}

.tb-tabs--underline .tb-tab {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 10px 18px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
}

.tb-tabs--underline .tb-tab:hover {
  color: #0f172a;
}

.tb-tabs--underline .tb-tab.active {
  background: transparent;
  border-color: transparent;
  border-bottom-color: #2563eb;
  color: #2563eb;
}

.tb-tab-panel[hidden] {
  display: none !important;
}

.tb-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.tb-radio-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

.tb-status {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 16px;
  min-height: 1.2em;
  line-height: 1.4;
}

.currency-card .tb-select {
  min-height: 44px;
}

.currency-card .tb-result-value {
  max-width: 62%;
  line-height: 1.45;
}

.tb-status.ok {
  color: #059669;
}

.tb-status.warn {
  color: #d97706;
}

.error-box.show {
  display: flex;
}
