/* ═══════════════════════════════════════════════════════════════════════════
   FEES CALCULATOR — Payment processing fee calculator
   ═══════════════════════════════════════════════════════════════════════════ */

#fees-calculator {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  z-index: 10000;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.fc-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.fc-brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.fc-brand-btn:hover {
  background: var(--surface3);
  border-color: var(--accent);
}

.fc-brand-btn svg {
  flex-shrink: 0;
}

.fc-brand-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}

.fc-brand-accent {
  color: #ff005c;
}

.fc-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  flex: 1;
}

/* ── Profile Selector ───────────────────────────────────────────────────── */
.fc-profile-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fc-profile-selector label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
}

.fc-profile-selector select {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-width: 140px;
}

.fc-profile-selector select:hover {
  border-color: var(--accent);
}

.fc-profile-selector select:focus {
  outline: none;
  border-color: var(--accent);
}

.fc-profile-badge {
  display: inline-block;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255, 0, 92, 0.15) 0%, rgba(255, 0, 92, 0.08) 100%);
  border: 1px solid rgba(255, 0, 92, 0.3);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ── Main Layout ─────────────────────────────────────────────────────────── */
.fc-main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── Reference Sidebar ───────────────────────────────────────────────────── */
.fc-sidebar {
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px;
  overflow-y: auto;
  flex-shrink: 0;
}

.fc-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  margin-bottom: 16px;
}

.fc-ref-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.fc-ref-section:last-child {
  border-bottom: none;
}

.fc-ref-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.fc-ref-section-title-with-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Tier Styles ────────────────────────────────────────────────────────── */
.fc-tier-badge {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(63, 185, 80, 0.15);
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.fc-tier-item {
  padding: 4px 0;
}

.fc-tier-item .value {
  color: var(--success) !important;
  font-weight: 600;
}

.fc-ratchet-note {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid var(--warn);
  border-radius: 0 4px 4px 0;
  font-size: 10px;
  color: var(--warn);
}

.fc-ratchet-badge {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--warn);
}

.fc-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text3);
  transition: all 0.15s;
}

.fc-info-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.fc-ref-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
  color: var(--text2);
  padding: 3px 0;
}

.fc-ref-item .label {
  color: var(--text3);
}

.fc-ref-item .value {
  color: var(--text);
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 2px;
}

.fc-ref-highlight {
  color: var(--accent) !important;
}

/* Editable fee inputs */
.fc-ref-input {
  width: 55px;
  padding: 4px 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: monospace;
  font-size: 11px;
  text-align: right;
}

.fc-ref-input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Hide number input spinners */
.fc-ref-input::-webkit-outer-spin-button,
.fc-ref-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fc-ref-input[type="number"] {
  -moz-appearance: textfield;
}

.fc-ref-input-sm {
  width: 42px;
}

.fc-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.fc-sidebar-header .fc-sidebar-title {
  margin-bottom: 0;
}

.fc-sidebar-hint {
  font-size: 10px;
  color: var(--text3);
  font-weight: 400;
}

.fc-ref-clickable {
  cursor: pointer;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.fc-ref-clickable:hover {
  background: var(--surface2);
}

.fc-ref-clickable .value {
  color: var(--text);
}

.fc-done-btn {
  padding: 4px 12px;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.fc-done-btn:hover {
  background: var(--accent2);
}

.fc-reset-btn {
  width: 100%;
  margin-top: 16px;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.fc-reset-btn:hover {
  background: var(--surface3);
  color: var(--text);
  border-color: var(--border2);
}

/* ── Content Area ────────────────────────────────────────────────────────── */
.fc-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  max-width: 1100px;
}

/* ── View Toggle ─────────────────────────────────────────────────────────── */
.fc-view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.fc-view-btn {
  padding: 10px 24px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}

.fc-view-btn:hover {
  background: var(--surface3);
  color: var(--text);
}

.fc-view-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ── Input Mode ──────────────────────────────────────────────────────────── */
.fc-input-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.fc-input-mode-toggle {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.fc-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.fc-radio-label input {
  accent-color: var(--accent);
}

.fc-input-fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.fc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
}

.fc-field input,
.fc-field select {
  padding: 10px 14px;
  min-width: 180px;
}

.fc-field input[type="number"] {
  font-family: monospace;
  font-size: 15px;
}

/* ── Results Section ─────────────────────────────────────────────────────── */
.fc-results-section {
  margin-bottom: 24px;
}

.fc-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Fee Table ───────────────────────────────────────────────────────────── */
.fc-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.fc-table th,
.fc-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
}

.fc-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-table td {
  border-top: 1px solid var(--border);
  color: var(--text);
}

.fc-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.fc-table .method-cell {
  font-weight: 500;
}

.fc-table .numeric {
  text-align: right;
  font-family: monospace;
}

.fc-table .fee {
  color: var(--danger);
}

.fc-table .net {
  color: var(--success);
}

.fc-table .rate {
  color: var(--text2);
}

.fc-table .best {
  background: rgba(63, 185, 80, 0.1);
}

.fc-table .best .net {
  font-weight: 700;
}

/* ── App Store Comparison ────────────────────────────────────────────────── */
.fc-comparison-section {
  margin-bottom: 24px;
}

.fc-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.fc-comparison-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.fc-comparison-store {
  opacity: 0.7;
}

.fc-comparison-xsolla {
  border-color: var(--accent);
  background: rgba(255, 0, 92, 0.05);
}

.fc-comparison-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.fc-comparison-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
}

.fc-comparison-xsolla .fc-comparison-icon {
  color: var(--accent);
}

.fc-comparison-fee {
  font-size: 24px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 12px;
}

.fc-comparison-xsolla .fc-comparison-fee {
  color: var(--success);
}

.fc-comparison-amount {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-comparison-amount .label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
}

.fc-comparison-amount .value {
  font-size: 18px;
  font-weight: 600;
  font-family: monospace;
  color: var(--text);
}

.fc-comparison-amount .value.highlight {
  color: var(--success);
}

.fc-savings-banner {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 16px;
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: var(--radius);
}

.fc-savings-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-savings-label {
  font-size: 12px;
  color: var(--text2);
}

.fc-savings-value {
  font-size: 18px;
  font-weight: 700;
  font-family: monospace;
  color: var(--success);
}

.fc-savings-percent {
  font-size: 12px;
  color: var(--success);
}

@media (max-width: 700px) {
  .fc-comparison-grid {
    grid-template-columns: 1fr;
  }

  .fc-savings-banner {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Chargeback Section ──────────────────────────────────────────────────── */
.fc-chargeback-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.fc-chargeback-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--warn);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-chargeback-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.fc-chargeback-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-chargeback-stat .label {
  font-size: 11px;
  color: var(--text3);
}

.fc-chargeback-stat .value {
  font-size: 15px;
  font-family: monospace;
  color: var(--text);
}

.fc-chargeback-stat .value.cost {
  color: var(--danger);
}

/* ── Example Cards ───────────────────────────────────────────────────────── */
.fc-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.fc-example-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.fc-example-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.fc-example-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.fc-example-row .method {
  color: var(--text2);
}

.fc-example-row .fee {
  font-family: monospace;
  color: var(--danger);
}

.fc-example-row .net {
  font-family: monospace;
  color: var(--success);
}

/* ── Xsolla View ─────────────────────────────────────────────────────────── */
.fc-xsolla-summary {
  background: linear-gradient(135deg, rgba(255, 0, 92, 0.1) 0%, rgba(255, 0, 92, 0.05) 100%);
  border: 1px solid rgba(255, 0, 92, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.fc-xsolla-summary h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}

.fc-xsolla-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.fc-xsolla-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-xsolla-stat .label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-xsolla-stat .value {
  font-size: 24px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
}

.fc-xsolla-stat .value.revenue {
  color: var(--success);
}

/* ── Tier Table (Xsolla View) ───────────────────────────────────────────── */
.fc-tier-table-container {
  margin: 16px 0;
  overflow-x: auto;
}

.fc-tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fc-tier-table th,
.fc-tier-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.fc-tier-table th {
  background: rgba(255, 0, 92, 0.08);
  font-weight: 600;
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-tier-table td {
  color: var(--text);
}

.fc-tier-table .numeric {
  text-align: right;
  font-family: monospace;
}

.fc-tier-table .revenue {
  color: var(--success);
  font-weight: 500;
}

.fc-tier-table tr.active-tier {
  background: rgba(63, 185, 80, 0.08);
}

.fc-tier-table tr.active-tier td {
  font-weight: 500;
}

.fc-tier-table tfoot tr {
  background: rgba(255, 0, 92, 0.05);
}

.fc-tier-table tfoot tr.grand-total {
  background: rgba(255, 0, 92, 0.12);
}

.fc-tier-table tfoot td {
  border-top: 2px solid var(--border);
}

.fc-tier-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: var(--surface2);
  border-radius: var(--radius);
  margin-top: 16px;
}

.fc-tier-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-tier-summary-item .label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
}

.fc-tier-summary-item .value {
  font-size: 20px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
}

.fc-tier-summary-item .value.revenue {
  color: var(--success);
}

.fc-tier-description {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text2);
}

.fc-tier-note {
  margin: 12px 0 0 0;
  padding: 10px 12px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid var(--warn);
  border-radius: 0 4px 4px 0;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
}

/* ── Monthly Summary ─────────────────────────────────────────────────────── */
.fc-monthly-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.fc-monthly-summary h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.fc-monthly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.fc-monthly-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-monthly-item .label {
  font-size: 11px;
  color: var(--text3);
}

.fc-monthly-item .value {
  font-size: 18px;
  font-family: monospace;
  color: var(--text);
}

/* ── Chargeback Info Modal ───────────────────────────────────────────────── */
.fc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fc-fade-in 0.15s ease-out;
}

@keyframes fc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fc-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 700px;
  max-height: 80vh;
  width: 90%;
  display: flex;
  flex-direction: column;
  animation: fc-slide-up 0.2s ease-out;
}

@keyframes fc-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.fc-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.fc-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text3);
  transition: all 0.15s;
}

.fc-modal-close:hover {
  background: var(--surface2);
  color: var(--text);
}

.fc-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.fc-chargeback-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fc-chargeback-table th,
.fc-chargeback-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.fc-chargeback-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
}

.fc-chargeback-table td {
  color: var(--text);
}

.fc-chargeback-table .provider {
  font-weight: 500;
}

.fc-chargeback-table .note {
  color: var(--text3);
  font-size: 12px;
}

.fc-chargeback-table .numeric {
  text-align: right;
  font-family: monospace;
}

.fc-chargeback-table .fee {
  color: var(--warn);
  font-weight: 500;
}

.fc-chargeback-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.fc-modal-note {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

.fc-modal-subsection {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.fc-modal-subsection h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── More Info Button ───────────────────────────────────────────────────── */
.fc-more-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(255, 0, 92, 0.1) 0%, rgba(255, 0, 92, 0.05) 100%);
  border: 1px solid rgba(255, 0, 92, 0.3);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.fc-more-info-btn:hover {
  background: linear-gradient(135deg, rgba(255, 0, 92, 0.2) 0%, rgba(255, 0, 92, 0.1) 100%);
  border-color: var(--accent);
}

.fc-more-info-btn svg {
  flex-shrink: 0;
}

/* ── Entities Modal ─────────────────────────────────────────────────────── */
.fc-modal-wide {
  max-width: 800px;
}

.fc-modal-intro {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.fc-entities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.fc-entity-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.fc-entity-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.fc-entity-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fc-entity-region {
  display: inline-block;
  padding: 4px 8px;
  background: var(--surface);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text2);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
/* ── Fee Comparison Table (Xsolla vs Alternative Provider) ────────────────── */
.fc-comparison-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
}

.fc-comparison-container h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px 0;
}

.fc-comparison-table-container {
  overflow-x: auto;
  margin-bottom: 16px;
}

.fc-comparison-fees-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fc-comparison-fees-table th,
.fc-comparison-fees-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.fc-comparison-fees-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-comparison-fees-table td {
  color: var(--text);
}

.fc-comparison-fees-table .numeric {
  text-align: right;
  font-family: monospace;
}

.fc-comparison-fees-table .note {
  color: var(--text3);
  font-style: italic;
  font-size: 12px;
}

.fc-comparison-fees-table .rate {
  color: var(--text2);
  font-size: 12px;
}

.fc-comparison-fees-table .savings {
  color: var(--success);
  font-weight: 500;
}

.fc-comparison-fees-table .loss {
  color: var(--danger);
  font-weight: 500;
}

.fc-comparison-fees-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.fc-comparison-fees-table tfoot tr {
  background: var(--surface2);
}

.fc-comparison-fees-table tfoot .total-row td {
  border-top: 2px solid var(--border);
  font-weight: 600;
}

.fc-comparison-fees-table tfoot .percent-row td {
  font-size: 12px;
  color: var(--text2);
}

.fc-comparison-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.fc-comparison-summary.positive {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.fc-comparison-summary.negative {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.fc-comparison-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.fc-comparison-value {
  font-size: 24px;
  font-weight: 700;
  font-family: monospace;
}

.fc-comparison-summary.positive .fc-comparison-value {
  color: var(--success);
}

.fc-comparison-summary.negative .fc-comparison-value {
  color: var(--danger);
}

.fc-comparison-note {
  margin: 0;
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
}

.fc-comparison-assumptions {
  margin: 0 0 16px 0;
  font-size: 12px;
  color: var(--text2);
}

/* ── Sub-view Toggle (Xsolla View) ────────────────────────────────────────── */
.fc-subview-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface);
  border-radius: var(--radius);
  width: fit-content;
}

.fc-subview-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}

.fc-subview-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

.fc-subview-btn.active {
  background: var(--accent);
  color: white;
}

/* ── Projected Earnings View ──────────────────────────────────────────────── */
.fc-projected-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fc-projected-header h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.fc-projected-header p {
  margin: 0;
  font-size: 13px;
  color: var(--text2);
}

.fc-distribution-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.fc-distribution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.fc-distribution-total {
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 12px;
}

.fc-distribution-total.valid {
  background: rgba(63, 185, 80, 0.15);
  color: var(--success);
}

.fc-distribution-total.invalid {
  background: rgba(248, 81, 73, 0.15);
  color: var(--danger);
}

.fc-distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.fc-distribution-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-distribution-item label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
}

.fc-distribution-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fc-distribution-input {
  width: 60px;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: monospace;
  font-size: 14px;
  text-align: right;
}

.fc-distribution-input:focus {
  border-color: var(--accent);
  outline: none;
}

.fc-distribution-input::-webkit-outer-spin-button,
.fc-distribution-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fc-distribution-suffix {
  font-size: 14px;
  color: var(--text2);
}

.fc-distribution-rate {
  font-size: 10px;
  color: var(--text3);
  font-family: monospace;
}

.fc-projected-results {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.fc-projected-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fc-projected-table th,
.fc-projected-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.fc-projected-table th {
  background: var(--surface2);
  font-weight: 600;
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fc-projected-table td {
  color: var(--text);
}

.fc-projected-table .numeric {
  text-align: right;
  font-family: monospace;
}

.fc-projected-table .rate {
  color: var(--text2);
  font-size: 12px;
}

.fc-projected-table .fee {
  color: var(--danger);
}

.fc-projected-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.fc-projected-table tfoot td {
  border-top: 2px solid var(--border);
  font-weight: 600;
}

.fc-projected-summary,
.fc-projected-customer {
  background: linear-gradient(135deg, rgba(255, 0, 92, 0.1) 0%, rgba(255, 0, 92, 0.05) 100%);
  border: 1px solid rgba(255, 0, 92, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.fc-projected-summary h3,
.fc-projected-customer h3 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.fc-projected-summary-grid,
.fc-projected-customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.fc-projected-summary-item,
.fc-projected-customer-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-projected-summary-item .label,
.fc-projected-customer-item .label {
  font-size: 11px;
  color: var(--text3);
}

.fc-projected-summary-item .value,
.fc-projected-customer-item .value {
  font-size: 18px;
  font-weight: 600;
  font-family: monospace;
  color: var(--text);
}

.fc-projected-summary-item.highlight .value,
.fc-projected-customer-item.highlight .value {
  font-size: 24px;
  color: var(--success);
}

.fc-projected-customer-item .value.fee {
  color: var(--danger);
}

.fc-projected-customer-item .value.net {
  color: var(--success);
}

.fc-projected-customer {
  background: var(--surface);
  border-color: var(--border);
}

.fc-projected-customer h3 {
  color: var(--text);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .fc-main {
    flex-direction: column;
  }

  .fc-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 200px;
  }

  .fc-content {
    padding: 16px;
  }

  .fc-input-fields {
    flex-direction: column;
  }

  .fc-field input,
  .fc-field select {
    min-width: 100%;
  }

  .fc-modal {
    width: 95%;
    max-height: 90vh;
  }

  .fc-comparison-summary {
    flex-direction: column;
    gap: 8px;
  }
}
