.prcb-calculator {
  margin: 24px 0;
  width: 100%;
}

.prcb-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

.prcb-title {
  margin: 0 0 18px;
  font-size: 1.4rem;
  line-height: 1.2;
}

.prcb-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.prcb-field {
  min-width: 0;
}

.prcb-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 1.25;
}

.prcb-input-wrap {
  position: relative;
  min-width: 0;
}

.prcb-field input,
.prcb-field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.4;
  box-sizing: border-box;
  background: #fff;
}

.prcb-field input[type="number"] {
  padding-right: 74px;
}

.prcb-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  max-width: 58px;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 14px;
  line-height: 1.1;
  text-align: right;
  white-space: normal;
  pointer-events: none;
}

.prcb-button {
  margin-top: 18px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  background: #111827;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  min-height: 50px;
}

.prcb-button:hover,
.prcb-button:focus {
  background: #0f172a;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

.prcb-result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.prcb-result.is-updated {
  border-color: #86efac;
  box-shadow: 0 14px 32px rgba(22, 163, 74, 0.14);
  transform: translateY(-2px);
}

.prcb-result-label {
  font-size: 14px;
  color: #475569;
  margin-bottom: 4px;
}

.prcb-result-value {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}

.prcb-result-interpretation {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.prcb-result-interpretation-label {
  font-weight: 700;
  color: #0f172a;
}

.prcb-result-interpretation-message {
  margin-top: 4px;
  color: #475569;
}

.prcb-error {
  margin-top: 14px;
  color: #b91c1c;
  font-size: 14px;
}

@media (max-width: 767px) {
  .prcb-fields {
    grid-template-columns: 1fr;
  }
}

.prcb-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 50px;
  padding: 6px 0;
}

.prcb-radio-group.is-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.prcb-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 500;
  color: #1e293b;
}

.prcb-radio-option input {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.prcb-radio-option span {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .prcb-button,
  .prcb-result {
    transition: none;
  }

  .prcb-button:hover,
  .prcb-button:focus,
  .prcb-result.is-updated {
    transform: none;
  }
}
