.stcdb-tc-wrapper {
  max-width: 700px;
  margin: 2rem auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.stcdb-tc-form {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
}

.stcdb-tc-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.stcdb-tc-row > .stcdb-tc-field {
  flex: 1;
  margin-bottom: 0;
}

.stcdb-tc-field {
  margin-bottom: 1.15rem;
}

.stcdb-tc-field > label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #023E73;
  font-size: 0.95rem;
}

.stcdb-tc-field select,
.stcdb-tc-field input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}

.stcdb-tc-field select:focus,
.stcdb-tc-field input:focus {
  outline: none;
  border-color: #0077B6;
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.stcdb-tc-section-label {
  font-weight: 700;
  color: #023E73;
  font-size: 1rem;
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #0077B6;
}

.stcdb-tc-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stcdb-tc-radio-option {
  position: relative;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}

.stcdb-tc-radio-option:has(input:checked) {
  border-color: #0077B6;
  background: #e6f3fa;
}

.stcdb-tc-radio-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.stcdb-tc-radio-option .stcdb-tc-option-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #023E73;
  display: block;
}

.stcdb-tc-radio-option .stcdb-tc-option-desc {
  font-size: 0.78rem;
  color: #6c757d;
  display: block;
  margin-top: 2px;
}

.stcdb-tc-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.stcdb-tc-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0077B6;
}

.stcdb-tc-toggle-row label {
  font-weight: 600;
  color: #023E73;
  font-size: 0.9rem;
  cursor: pointer;
}

.stcdb-tc-toggle-row .stcdb-tc-toggle-price {
  margin-left: auto;
  font-size: 0.82rem;
  color: #6c757d;
}

.stcdb-tc-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: #0077B6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}

.stcdb-tc-btn:hover {
  background: #023E73;
}

/* ── Results container ── */
.stcdb-tc-results {
  display: none;
  margin-top: 1.5rem;
  animation: stcdb-tc-fadeIn 0.4s ease;
}

@keyframes stcdb-tc-fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes stcdb-tc-slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Receipt header ── */
.stcdb-tc-receipt-header {
  background: linear-gradient(135deg, #023E73, #0077B6);
  color: #fff;
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-radius: 12px 12px 0 0;
}

.stcdb-tc-receipt-title {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.stcdb-tc-receipt-subtitle {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
  color: #d0e8f5;
}

/* ── Receipt body ── */
.stcdb-tc-receipt-body {
  background: #fff;
  border: 2px solid #023E73;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 1.25rem;
}

/* ── Receipt rows (line items) ── */
.stcdb-tc-receipt-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed #dee2e6;
  font-size: 0.92rem;
  animation: stcdb-tc-slideIn 0.35s ease both;
}

.stcdb-tc-receipt-row:last-of-type {
  border-bottom: none;
}

.stcdb-tc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stcdb-tc-row-left {
  flex: 1;
  min-width: 0;
}

.stcdb-tc-row-left strong {
  display: block;
  color: #023E73;
  font-size: 0.92rem;
}

.stcdb-tc-row-detail {
  display: block;
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: 1px;
}

.stcdb-tc-row-amount {
  font-weight: 600;
  color: #023E73;
  white-space: nowrap;
  font-size: 0.95rem;
}

/* ── Divider ── */
.stcdb-tc-divider {
  border: none;
  border-top: 2px solid #023E73;
  margin: 0.75rem 0;
}

/* ── Subtotal row (hidden costs) ── */
.stcdb-tc-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #495057;
}

.stcdb-tc-amount-highlight {
  font-weight: 700;
  color: #FF6B35;
}

.stcdb-tc-amount-negative {
  color: #e63946;
}

/* ── Grand total ── */
.stcdb-tc-grand-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0 0.25rem;
  margin-top: 0.25rem;
  border-top: 3px double #023E73;
  font-size: 1.15rem;
  font-weight: 800;
  color: #023E73;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stcdb-tc-grand-total-amount {
  font-size: 1.4rem;
  color: #023E73;
}

/* ── Stats grid ── */
.stcdb-tc-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.stcdb-tc-stat-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 1.1rem;
  text-align: center;
}

/* Sticker shock card - color-coded by severity */
.stcdb-tc-stat-shock .stcdb-tc-stat-value {
  font-size: 2rem;
}

/* Green: <20% */
.stcdb-tc-stat-shock .stcdb-tc-stat-value {
  color: #155724;
}

.stcdb-tc-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #FF6B35;
  line-height: 1.2;
}

.stcdb-tc-stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #023E73;
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stcdb-tc-stat-detail {
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* ── Pie chart section ── */
.stcdb-tc-chart-section {
  margin: 1.5rem 0;
}

.stcdb-tc-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #023E73;
  margin: 0 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #0077B6;
}

.stcdb-tc-chart-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stcdb-tc-pie {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stcdb-tc-legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.stcdb-tc-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stcdb-tc-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Resort comparison section ── */
.stcdb-tc-comparison {
  background: #f0f7fb;
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.stcdb-tc-comparison .stcdb-tc-section-title {
  border-bottom-color: #008080;
}

.stcdb-tc-comparison-body {
  margin-top: 0.75rem;
}

.stcdb-tc-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.stcdb-tc-bar-label {
  width: 130px;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #023E73;
  text-align: right;
}

.stcdb-tc-bar {
  flex: 1;
  height: 32px;
  background: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
}

.stcdb-tc-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  min-width: 60px;
  transition: width 0.6s ease;
}

.stcdb-tc-bar-cruise {
  background: linear-gradient(90deg, #023E73, #0077B6);
}

.stcdb-tc-bar-resort {
  background: linear-gradient(90deg, #008080, #48BF84);
}

.stcdb-tc-comparison-note {
  font-size: 0.85rem;
  color: #495057;
  margin: 0.75rem 0 0;
  text-align: center;
  line-height: 1.45;
}

/* ── Verdict ── */
.stcdb-tc-verdict {
  background: #FFF1E6;
  border-left: 4px solid #FF6B35;
  border-radius: 0 10px 10px 0;
  padding: 1.15rem 1.25rem;
  margin: 1.5rem 0;
  line-height: 1.55;
}

.stcdb-tc-verdict-emoji {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.stcdb-tc-verdict-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #023E73;
}

.stcdb-tc-verdict-text {
  margin: 0;
  font-style: italic;
  color: #495057;
  font-size: 0.93rem;
}

/* ── Share button ── */
.stcdb-tc-share-wrap {
  margin-top: 1.25rem;
  text-align: center;
}

.stcdb-tc-share-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #008080;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.stcdb-tc-share-btn:hover {
  background: #006666;
  transform: translateY(-1px);
}

.stcdb-tc-share-btn.stcdb-tc-share-copied {
  background: #48BF84;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .stcdb-tc-row {
    flex-direction: column;
    gap: 0;
  }

  .stcdb-tc-radio-group {
    grid-template-columns: 1fr;
  }

  .stcdb-tc-stats-grid {
    grid-template-columns: 1fr;
  }

  .stcdb-tc-chart-wrap {
    flex-direction: column;
  }

  .stcdb-tc-pie {
    width: 150px;
    height: 150px;
  }

  .stcdb-tc-legend {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1rem;
  }

  .stcdb-tc-bar-label {
    width: 90px;
    font-size: 0.78rem;
  }

  .stcdb-tc-bar-fill {
    font-size: 0.72rem;
    padding: 0 0.4rem;
  }

  .stcdb-tc-receipt-title {
    font-size: 1.05rem;
  }

  .stcdb-tc-grand-total-amount {
    font-size: 1.2rem;
  }
}
