/* ==========================================================================
   BBC Sell Calculator — Design System
   ========================================================================== */

/* ── Reset & Scope ──────────────────────────────────────────────────────── */

.bbc-calc,
.bbc-calc *,
.bbc-calc *::before,
.bbc-calc *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.bbc-calc {
  --gold: #E2B967;
  --gold-light: #d19f3b;
  --gold-dim: rgba(212, 184, 106, 0.1);
  --bg-main: #000000;
  --bg-panel: #050505;
  --bg-input: #0a0a0a;
  --bg-dropzone: #0a0a0a;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 184, 106, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #8c8c8c;
  --text-muted: #595959;
  --green: #4caf50;
  --radius: 6px;
  --radius-sm: 4px;

  font-family: "DM Sans", "Inter", -apple-system, sans-serif;
  margin-inline: auto;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Calculator Body — Two-Column Grid
   ========================================================================== */

.bbc-calc__body {
  display: grid;
  grid-template-columns: 1.47fr 1fr;
  gap: 24px;
  background: var(--bg-main);
  border-radius: var(--radius);
}

@media (max-width: 820px) {
  .bbc-calc__body {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Left Panel — Form
   ========================================================================== */

.bbc-calc__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px;

  border-radius: 10px;
  border: 1px solid #2F2F2F;
  background: #000;
}

/* 2x2 Grid for Top Fields */
.bbc-calc__grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 560px) {
  .bbc-calc__grid-2x2 {
    grid-template-columns: 1fr;
  }
}

/* ── Field Group ────────────────────────────────────────────────────────── */

.bbc-calc__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bbc-calc__label {
  text-transform: uppercase;

  color: #BFBFBF;

  /* H6 */
  font-family: Mirella;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.1;
}

/* ── Custom Select & Inputs ─────────────────────────────────────────────── */

.bbc-calc__input-wrap,
.bbc-calc__select-wrap {
  position: relative;
}

.bbc-calc__input,
.bbc-calc__select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;

  color: #BFBFBF;

  /* Small Text */
  font-family: "Inter Display";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
}

.bbc-calc__select {
  appearance: none;
  cursor: pointer;
  padding-inline-end: 40px;
}

.bbc-calc__input:focus,
.bbc-calc__select:focus {
  outline: none;
  border-color: var(--gold);
}

.bbc-calc__input::placeholder {
  color: var(--text-muted);
}

.bbc-calc__select-arrow {
  position: absolute;
  inset-inline-end: 14px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

/* Weight Input Suffix (g) */
.bbc-calc__input-suffix {
  position: absolute;
  inset-inline-end: 16px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.bbc-calc__input-wrap input {
  padding-inline-end: 32px;
}

/* Number input spinners — hide */
.bbc-calc__input[type="number"]::-webkit-inner-spin-button,
.bbc-calc__input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.bbc-calc__input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ── Dropzone ───────────────────────────────────────────────────────────── */

.bbc-calc__dropzone {
  position: relative;
  padding: 32px;
  text-align: center;
  transition: all 0.2s ease;
  overflow: hidden;

  border-radius: 4px;
  border: 1.5px dashed #e2b9675c;
  background: #0C0C0C;
}

.bbc-calc__dropzone:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.bbc-calc__dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.bbc-calc__dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.bbc-calc__dropzone-icon {
  color: var(--gold);
  margin-block-end: 4px;
}

.bbc-calc__dropzone-text {
  color: #BFBFBF;
  text-align: center;

  /* Peragraph Text */
  font-family: "Inter Display";
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.bbc-calc__dropzone-browse {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bbc-calc__dropzone-hint {
  color: #7C7C7C;
  text-align: center;

  /* Small Text */
  font-family: "Inter Display";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
}

/* ── Textarea ───────────────────────────────────────────────────────────── */

.bbc-calc__textarea {
  resize: vertical;
  min-height: 80px;

  color: #BFBFBF !important;
  font-family: "Inter Display";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

/* ── CTA Button ─────────────────────────────────────────────────────────── */

.bbc-calc__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--gold);
  border: none;
  border-radius: 4px;
  box-shadow: 0 8px 30px 0 rgba(212, 175, 55, 0.30);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-block-start: 8px;

  color: #000;
  text-align: center;

  /* Button */
  font-family: "Inter Display";
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
}

.bbc-calc__cta:hover {
  background: var(--gold-light);
}

/* ==========================================================================
   Right Panel — Live Price Summary
   ========================================================================== */

.bbc-calc__summary {
  position: relative;
}

.bbc-calc__summary-inner {
  position: sticky;
  inset-block-start: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;

  border-radius: 10px;
  border: 1px solid #2F2F2F;
  background: #000;
}

.bbc-calc__live-indicator-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bbc-calc__live-indicator-wrap h6 {
  color: #BFBFBF;

  font-family: Mirella;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.1;
}


/* Live Indicator */
.bbc-calc__live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4ADE80;

  /* Small Text */
  font-family: "Inter Display";
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.bbc-calc__live-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: bbc-pulse 2s infinite;
}

@keyframes bbc-pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
}

/* Price Box */
.bbc-calc__price-box {
  padding: 44px 24px;
  text-align: center;
  margin-block-start: 4px;
  /* Space for live indicator */

  border-radius: 14px;
  border: 1px solid #2F2F2F;
  background: #070605;
}

.bbc-calc__price-box-label {
  color: #7C7C7C;
  text-align: center;
  font-family: "Inter Display";
  font-size: 14px;
  font-weight: 400;
  line-height: 1.28;
  text-transform: uppercase;
  margin-block-end: 12px;
}

.bbc-calc__summary-price {
  color: var(--gold);
  line-height: 1;
  text-align: center;

  /* H2 */
  font-family: Mirella;
  font-size: 52px;
  font-weight: 400;

  margin-block-end: 10px;
}

.bbc-calc__summary-subtitle {
  color: #4ADE80;
  text-align: center;

  /* Small Text */
  font-family: "Inter Display";
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

/* Breakdown List */
.bbc-calc__breakdown-list {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bbc-calc__breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bbc-calc__breakdown-label {
  color: #7C7C7C;

  /* Peragraph Text */
  font-family: "Inter Display";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

.bbc-calc__breakdown-value {
  color: #BFBFBF;

  /* Peragraph Text */
  font-family: "Inter Display";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

/* Trust Lines */
.bbc-calc__trust-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-block-start: auto;
  /* Push to bottom if tall */
  padding-block-start: 24px;
}

.bbc-calc__trust-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;

  border-radius: 4px;
  border: 1px solid #2F2F2F;
  background: #000;
}

.bbc-calc__trust-icon {
  color: var(--gold);
  display: flex;
  flex-shrink: 0;
}

.bbc-calc__trust-line span:last-child {
  color: #7C7C7C;

  /* Small Text */
  font-family: "Inter Display";
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
}

/* ==========================================================================
   Animation — Price Update Flash
   ========================================================================== */

@keyframes bbc-price-flash {
  0% {
    opacity: 0.5;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 1;
  }
}

.bbc-calc__summary-price.is-updating {
  animation: bbc-price-flash 0.3s ease;
}

/* ==========================================================================
   File Upload Previews
   ========================================================================== */

.bbc-calc__upload-previews {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-block-start: 12px;
}

.bbc-calc__preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.bbc-calc__preview-name {
  color: #BFBFBF;
  font-family: "Inter Display";
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.bbc-calc__preview-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.bbc-calc__preview-remove:hover {
  color: #e8443a;
}