/* Reset & Scoped Base Typography (Professional Polish Theme) */
.bpt-container {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #2B2B2B;
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.bpt-container * {
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Header Section */
.bpt-header {
  margin-bottom: 24px;
}
.bpt-title {
  color: #1D3A8F;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}
.bpt-intro {
  color: #2B2B2B;
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  max-width: 800px;
}

/* Form Card (Input Section Background: #B4BFEF) */
.bpt-form-card {
  background-color: #B4BFEF;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(29, 58, 143, 0.08);
}

/* Sections within Form (Professional White Card Style) */
.bpt-section {
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(124, 136, 196, 0.25);
  position: relative;
}
.bpt-section:last-child {
  margin-bottom: 0;
}
.bpt-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bpt-section-title {
  color: #1D3A8F;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

/* Circular Info Icon Button */
.bpt-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background-color: transparent;
  color: #1D3A8F;
  border: 1.5px solid #1D3A8F;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}
.bpt-info-btn:hover,
.bpt-info-btn:focus {
  background-color: #1D3A8F;
  color: #FFFFFF;
  outline: none;
  transform: scale(1.08);
}

/* Tooltip / Info Callout Box */
.bpt-tooltip {
  position: relative;
  z-index: 10;
  background-color: #EBF1FF;
  color: #1D3A8F;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid #1D3A8F;
  border-top: 1px solid rgba(29, 58, 143, 0.15);
  border-right: 1px solid rgba(29, 58, 143, 0.15);
  border-bottom: 1px solid rgba(29, 58, 143, 0.15);
  margin-top: 6px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(29, 58, 143, 0.08);
  width: 100%;
}
.bpt-tooltip strong {
  font-weight: 700;
  color: #1D3A8F;
}
.bpt-hidden {
  display: none !important;
}

/* 2-Column Grid for Dropdowns */
.bpt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Field Labels */
.bpt-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2B2B2B;
  margin-bottom: 6px;
}

/* Custom Dropdown Wrapper with Visible Chevron */
.bpt-dropdown-wrapper {
  position: relative;
  width: 100%;
}
.bpt-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #FFFFFF;
  border: 1px solid #7C88C4;
  border-radius: 4px;
  padding: 10px 36px 10px 12px;
  font-size: 14px;
  color: #2B2B2B;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bpt-select:focus {
  outline: none;
  border-color: #2F5FE3;
  box-shadow: 0 0 0 2px rgba(47, 95, 227, 0.2);
}
.bpt-chevron-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 14px;
  height: 14px;
  color: #1D3A8F;
}

/* Quantity Section Toggle (Radio Pill Buttons) */
.bpt-toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.bpt-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: #2B2B2B;
}
.bpt-pills-container {
  display: inline-flex;
  background-color: #FFFFFF;
  border: 1px solid #7C88C4;
  border-radius: 20px;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.bpt-radio-pill {
  position: relative;
  cursor: pointer;
  margin: 0;
}
.bpt-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bpt-pill-label {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1D3A8F;
  transition: background-color 0.2s ease, color 0.2s ease;
  user-select: none;
}
.bpt-radio-input:checked + .bpt-pill-label {
  background-color: #2F5FE3;
  color: #FFFFFF;
}
.bpt-radio-input:focus-visible + .bpt-pill-label {
  outline: 2px solid #1D3A8F;
  outline-offset: -2px;
}

/* Input Field with Inline Suffix */
.bpt-input-container {
  max-width: 440px;
}
.bpt-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  border: 1px solid #7C88C4;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bpt-input-wrapper:focus-within {
  border-color: #2F5FE3;
  box-shadow: 0 0 0 2px rgba(47, 95, 227, 0.2);
}
.bpt-input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #2B2B2B;
  outline: none;
  background: transparent;
  width: 100%;
}
.bpt-input::placeholder {
  color: #7C88C4;
  opacity: 0.8;
}
.bpt-unit-suffix {
  background-color: #F0F2FA;
  color: #1D3A8F;
  font-size: 13px;
  font-weight: 600;
  padding: 0 14px;
  height: 40px;
  display: flex;
  align-items: center;
  border-left: 1px solid #7C88C4;
  white-space: nowrap;
  user-select: none;
}

/* Visual Validation / Error Style (Text: #D64545 on Background: #FDEDED) */
.bpt-error-banner {
  background-color: #FDEDED;
  color: #D64545;
  border-left: 4px solid #D64545;
  border-top: 1px solid rgba(214, 69, 69, 0.2);
  border-right: 1px solid rgba(214, 69, 69, 0.2);
  border-bottom: 1px solid rgba(214, 69, 69, 0.2);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Action Row */
.bpt-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(124, 136, 196, 0.3);
}
.bpt-btn {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bpt-btn-primary {
  flex: 1;
  background-color: #2F5FE3;
  color: #FFFFFF;
  border: 1px solid #2F5FE3;
  box-shadow: 0 2px 4px rgba(47, 95, 227, 0.15);
}
.bpt-btn-primary:hover,
.bpt-btn-primary:focus {
  background-color: #1E44B8;
  border-color: #1E44B8;
  color: #FFFFFF;
}
.bpt-btn-secondary {
  flex: 1;
  background-color: #FFFFFF;
  color: #2F5FE3;
  border: 1px solid #2F5FE3;
}
.bpt-btn-secondary:hover,
.bpt-btn-secondary:focus {
  background-color: #F0F4FF;
  color: #1E44B8;
  border-color: #1E44B8;
}

/* Calculation Results Section (Background: #CDE59A) */
.bpt-results-card {
  background-color: #CDE59A;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  border: 2px solid #A8C96C;
  box-shadow: 0 4px 12px rgba(29, 58, 143, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}
.bpt-highlight-pulse {
  animation: bptPulseHighlight 1.2s ease-out;
}
@keyframes bptPulseHighlight {
  0% {
    background-color: #CDE59A;
  }
  50% {
    background-color: #E6F3CC;
  }
  100% {
    background-color: #CDE59A;
  }
}
.bpt-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.bpt-results-title {
  color: #1D3A8F;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.bpt-results-badge {
  background-color: #1D3A8F;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 2x2 Grid for Metrics */
.bpt-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.bpt-metric-card {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(29, 58, 143, 0.12);
  position: relative;
}
.bpt-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.bpt-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: #2B2B2B;
  margin: 0;
  word-break: normal;
  overflow-wrap: normal;
}
.bpt-metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.bpt-metric-value {
  color: #1D3A8F;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}
.bpt-metric-unit {
  color: #1D3A8F;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.8;
}

/* Actual Pathway Comparison Results Section */
.bpt-comparison-section {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(29, 58, 143, 0.15);
  margin-top: 16px;
}
.bpt-comparison-title {
  color: #1D3A8F;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px 0;
}
.bpt-comparison-intro {
  color: #2B2B2B;
  font-size: 13px;
  margin: 0 0 16px 0;
  line-height: 1.4;
  opacity: 0.9;
}
.bpt-bar-comparison {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bpt-bar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bpt-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.bpt-bar-label {
  font-size: 13px;
  font-weight: 600;
  color: #2B2B2B;
}
.bpt-bar-val-text {
  font-size: 13px;
  font-weight: 700;
  color: #1D3A8F;
}
.bpt-bar-track {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  height: 24px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(124, 136, 196, 0.35);
  position: relative;
}
.bpt-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.bpt-bar-fill-actual {
  width: 0%;
  background-color: #7C88C4;
}
.bpt-bar-fill-biochar {
  width: 100%;
  background-color: #1D3A8F;
}

/* Document Export Section (Appears after Calculate) */
.bpt-doc-export-card {
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(29, 58, 143, 0.25);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(29, 58, 143, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: all 0.3s ease;
  animation: bptFadeInUp 0.35s ease-out;
}
@keyframes bptFadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bpt-doc-export-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}
.bpt-doc-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: #1D3A8F;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(29, 58, 143, 0.2);
}
.bpt-doc-info {
  flex: 1;
}
.bpt-doc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.bpt-doc-title {
  font-size: 15px;
  font-weight: 700;
  color: #1D3A8F;
  margin: 0;
}
.bpt-doc-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background-color: #E0E7FF;
  color: #1E44B8;
  letter-spacing: 0.02em;
}
.bpt-doc-status-badge.bpt-ready {
  background-color: #D1FAE5;
  color: #065F46;
}
.bpt-doc-desc {
  font-size: 12px;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}
.bpt-doc-btn-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bpt-btn-doc {
  min-width: 200px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.bpt-btn-doc-create {
  background-color: #1D3A8F;
  color: #FFFFFF;
  border: 1px solid #1D3A8F;
  box-shadow: 0 2px 6px rgba(29, 58, 143, 0.25);
}
.bpt-btn-doc-create:hover,
.bpt-btn-doc-create:focus {
  background-color: #152B6B;
  border-color: #152B6B;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.bpt-btn-doc-download {
  background-color: #059669;
  color: #FFFFFF;
  border: 1px solid #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  animation: bptPulseSuccess 0.4s ease-out;
}
@keyframes bptPulseSuccess {
  0% { transform: scale(0.96); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.bpt-btn-doc-download:hover,
.bpt-btn-doc-download:focus {
  background-color: #047857;
  border-color: #065F46;
  color: #FFFFFF;
  transform: translateY(-1px);
}
.bpt-doc-btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Single-column stacking below 900px */
@media (max-width: 900px) {
  .bpt-container {
    padding: 16px;
  }
  .bpt-form-card,
  .bpt-results-card {
    padding: 18px;
  }
  .bpt-grid-2,
  .bpt-metrics-grid {
    grid-template-columns: 1fr;
  }
  .bpt-actions {
    flex-direction: column;
  }
  .bpt-btn-primary,
  .bpt-btn-secondary {
    width: 100%;
    flex: none;
  }
  .bpt-title {
    font-size: 22px;
  }
  .bpt-results-title {
    font-size: 18px;
  }
  .bpt-metric-value {
    font-size: 22px;
  }
  .bpt-bar-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .bpt-doc-export-card {
    flex-direction: column;
    align-items: stretch;
  }
  .bpt-doc-btn-wrap {
    width: 100%;
  }
  .bpt-btn-doc {
    width: 100%;
  }
  
}
