/* ─── Flipkart Fee Calculator — v2.0 ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

.ffc-wrap {
  --fk-blue:    #2874f0;
  --fk-yellow:  #ffe11b;
  --fk-orange:  #ff6161;
  --fk-green:   #26b571;
  --fk-red:     #e03131;
  --fk-gold:    #f59f00;
  --bg:         #f4f6fb;
  --card:       #ffffff;
  --border:     #e8ecf4;
  --text:       #1a1f36;
  --muted:      #6b7280;
  --input-bg:   #f8faff;
  --radius:     12px;
  --shadow:     0 2px 16px rgba(40,116,240,.08);

  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(40,116,240,.12);
  max-width: 1100px;
  margin: 32px auto;
}

/* ── Header ── */
.ffc-header {
  background: var(--fk-blue);
  padding: 20px 28px;
}
.ffc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ffc-logo { display: flex; align-items: center; gap: 14px; }
.ffc-logo-f {
  width: 44px; height: 44px;
  background: var(--fk-yellow);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--fk-blue);
  flex-shrink: 0;
}
.ffc-logo-text { display: flex; flex-direction: column; }
.ffc-logo-title { font-size: 18px; font-weight: 800; color: #fff; line-height: 1.2; }
.ffc-logo-sub   { font-size: 11px; color: rgba(255,255,255,.7); margin-top: 2px; }

.ffc-tier-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ffc-tier-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,.3);
  background: transparent;
  color: rgba(255,255,255,.7);
  font-family: inherit;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.ffc-tier-pill:hover,
.ffc-tier-pill.active {
  background: var(--fk-yellow);
  border-color: var(--fk-yellow);
  color: var(--fk-blue);
}

/* ── Body Layout ── */
.ffc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 768px) {
  .ffc-body { grid-template-columns: 1fr; }
}

/* ── Inputs Panel ── */
.ffc-inputs {
  padding: 28px;
  background: var(--card);
  border-right: 1px solid var(--border);
}
.ffc-section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fk-blue);
  margin-bottom: 14px;
}
.ffc-field { margin-bottom: 16px; }
.ffc-field label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.ffc-input-wrap {
  display: flex; align-items: center;
  background: var(--input-bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s;
}
.ffc-input-wrap:focus-within { border-color: var(--fk-blue); }
.ffc-prefix {
  padding: 0 12px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  background: var(--border);
  align-self: stretch;
  display: flex; align-items: center;
}
.ffc-input-wrap input {
  flex: 1;
  border: none; background: transparent;
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px; font-weight: 600;
  color: var(--text);
  outline: none;
  width: 100%;
}

.ffc-select-wrap {
  position: relative;
  display: flex; align-items: center;
  gap: 8px;
}
.ffc-select-wrap select {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}
.ffc-select-wrap select:focus { border-color: var(--fk-blue); }
.ffc-commission-badge {
  background: var(--fk-blue);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.ffc-hint { font-size: 11px; color: var(--muted); margin: 4px 0 0; }

.ffc-vol-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.ffc-vol-row .ffc-field { margin-bottom: 0; }
.ffc-vol-row input {
  width: 100%; padding: 8px 10px;
  border: 2px solid var(--border); border-radius: 8px;
  background: var(--input-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 600;
  outline: none;
  transition: border-color .2s;
}
.ffc-vol-row input:focus { border-color: var(--fk-blue); }
.ffc-vol-result {
  padding: 8px 10px;
  background: #eff6ff;
  border: 2px solid #bfdbfe;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700;
  color: var(--fk-blue);
  text-align: center;
}

.ffc-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ffc-radio {
  display: flex; flex-direction: column;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
  transition: all .2s;
  min-width: 80px;
}
.ffc-radio:has(input:checked) {
  border-color: var(--fk-blue);
  background: #eff6ff;
}
.ffc-radio input { display: none; }
.ffc-radio span { font-size: 13px; font-weight: 700; color: var(--text); }
.ffc-radio small { font-size: 10px; color: var(--muted); margin-top: 2px; }

.ffc-toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.ffc-toggle {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  font-family: inherit;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.ffc-toggle.active {
  border-color: var(--fk-blue);
  background: var(--fk-blue);
  color: #fff;
}

.ffc-checkboxes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.ffc-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.ffc-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--fk-blue); cursor: pointer; }
.ffc-inline-input {
  margin-left: auto;
  width: 80px;
  padding: 4px 8px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  background: var(--input-bg);
  transition: border-color .2s;
}
.ffc-inline-input:focus { border-color: var(--fk-blue); }

.ffc-calc-btn {
  width: 100%;
  padding: 14px;
  background: var(--fk-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .01em;
}
.ffc-calc-btn:hover {
  background: #1a5fd8;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(40,116,240,.3);
}
.ffc-calc-btn:active { transform: translateY(0); }

/* ── Results Panel ── */
.ffc-results {
  padding: 28px;
  background: var(--bg);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}
.ffc-results-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  gap: 12px;
}
.ffc-placeholder-icon {
  width: 64px; height: 64px;
  background: var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800;
  color: var(--muted);
}
.ffc-results-placeholder p { font-size: 14px; line-height: 1.6; }

/* Summary Card */
.ffc-summary-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.ffc-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
}
.ffc-summary-main {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
.ffc-profit-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 800;
  color: var(--fk-green);
}
.ffc-profit-val.loss { color: var(--fk-red); }
.ffc-badge-margin {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px; font-weight: 700;
  background: #dcfce7; color: #166534;
}
.ffc-badge-margin.loss { background: #fee2e2; color: #991b1b; }
.ffc-margin-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  margin-top: 10px;
  overflow: hidden;
}
.ffc-margin-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--fk-green);
  width: 0%;
  transition: width .8s cubic-bezier(.25,.46,.45,.94);
}

/* Breakdown */
.ffc-breakdown {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.ffc-breakdown-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--fk-blue);
  margin-bottom: 12px;
}
.ffc-breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.ffc-breakdown-row:last-child { border-bottom: none; }
.ffc-breakdown-row span:last-child {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.ffc-positive span:last-child { color: var(--fk-green); }
.ffc-negative span:last-child { color: var(--fk-red); }
.ffc-breakdown-divider {
  height: 1px; background: var(--border);
  margin: 8px 0;
}
.ffc-breakdown-sublabel {
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.ffc-total-fees {
  font-weight: 700 !important;
  font-size: 14px !important;
}
.ffc-total-fees span:last-child { color: var(--fk-red) !important; font-weight: 800 !important; }
.ffc-net-profit-row {
  font-weight: 700 !important;
  font-size: 14px !important;
  background: #f0fdf4;
  border-radius: 6px;
  padding: 8px 6px !important;
  margin-top: 4px;
}
.ffc-net-profit-row span:last-child { color: var(--fk-green) !important; font-size: 16px !important; }
.ffc-net-profit-row.loss span:last-child { color: var(--fk-red) !important; }

.ffc-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 8px;
}
.ffc-dot-green  { background: var(--fk-green); }
.ffc-dot-red    { background: var(--fk-red); }
.ffc-dot-orange { background: var(--fk-orange); }
.ffc-dot-yellow { background: var(--fk-gold); }
.ffc-pct { font-size: 11px; color: var(--muted); margin-left: 4px; }

.ffc-info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #1e40af;
  margin-bottom: 14px;
  line-height: 1.6;
  display: none;
}
.ffc-info-box.visible { display: block; }

.ffc-tips {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.8;
  display: none;
}
.ffc-tips.visible { display: block; }

/* ── Accordions ── */
.ffc-accordion {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.ffc-acc-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: none; border: none;
  font-family: inherit;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background .2s;
}
.ffc-acc-btn:hover { background: #f8faff; }
.ffc-acc-arrow {
  font-size: 12px; color: var(--muted);
  transition: transform .3s;
}
.ffc-acc-btn.open .ffc-acc-arrow { transform: rotate(180deg); }
.ffc-acc-body { padding: 0 28px 20px; }
.ffc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ffc-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f8faff;
  color: var(--fk-blue);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
}
.ffc-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ffc-table tr:last-child td { border-bottom: none; }
.ffc-table tr:hover td { background: #f8faff; }
.ffc-free { color: var(--fk-green); font-weight: 700; }
.ffc-table-note {
  font-size: 11px; color: var(--muted);
  margin-top: 10px; padding: 0;
  font-style: italic;
}
.ffc-rate-badge {
  padding: 3px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 700;
}
.ffc-rate-badge.high { background: #fee2e2; color: #991b1b; }
.ffc-rate-badge.med  { background: #fef3c7; color: #92400e; }
.ffc-rate-badge.low  { background: #dcfce7; color: #166534; }

/* ── Footer ── */
.ffc-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 14px 28px;
}
.ffc-footer p {
  font-size: 11px; color: var(--muted);
  margin: 0; line-height: 1.5;
}
