.ssc-fx-converter {
  --fx-panel: #ffffff;
  --fx-panel-soft: #edf3fb;
  --fx-text: #24324a;
  --fx-muted: #66738a;
  --fx-line: rgba(36, 50, 74, 0.13);
  --fx-accent: #3f6fca;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 36px;
  color: var(--fx-text);
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ssc-fx-converter,
.ssc-fx-converter * {
  box-sizing: border-box;
}

.ssc-fx-converter .ssc-card {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--fx-line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 0%, rgba(95, 143, 211, 0.12), transparent 22rem),
    var(--fx-panel);
  box-shadow: 0 18px 50px rgba(36, 50, 74, 0.09);
}

.ssc-fx-converter .ssc-title {
  margin: 0;
  color: #1f2c43;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
}

.ssc-fx-converter .ssc-sub {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--fx-muted);
  font-size: 14px;
  line-height: 1.6;
}

.ssc-fx-converter .ssc-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  margin-top: 22px;
}

.ssc-fx-converter .ssc-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--fx-line);
  border-radius: 15px;
  background: #f7f9fc;
}

.ssc-fx-converter label,
.ssc-fx-converter .ssc-kpi .label {
  color: var(--fx-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.ssc-fx-converter input[type="number"],
.ssc-fx-converter select {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--fx-line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--fx-text);
  font: inherit;
  font-size: 15px;
  color-scheme: light;
}

.ssc-fx-converter input[type="number"]:focus,
.ssc-fx-converter select:focus {
  border-color: rgba(42, 92, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(42, 92, 255, 0.2);
}

.ssc-fx-converter .ssc-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.ssc-fx-converter .ssc-inline .ssc-swap {
  width: auto !important;
  min-width: 72px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--fx-line) !important;
  border-radius: 12px;
  background: transparent !important;
  color: var(--fx-text) !important;
  font-size: 13px;
}

.ssc-fx-converter .ssc-inline .ssc-swap:hover,
.ssc-fx-converter .ssc-inline .ssc-swap:focus-visible {
  border-color: rgba(42, 92, 255, 0.72) !important;
  background: rgba(42, 92, 255, 0.18) !important;
}

.ssc-fx-converter .ssc-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.ssc-fx-converter .ssc-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-content: center;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--fx-line);
  border-radius: 15px;
  background: #f7f9fc;
}

.ssc-fx-converter .ssc-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--fx-accent);
}

.ssc-fx-converter .ssc-toggle .ssc-small {
  grid-column: 2;
}

.ssc-fx-converter .ssc-muted {
  color: var(--fx-muted);
}

.ssc-fx-converter .ssc-small {
  font-size: 12px;
  line-height: 1.5;
}

.ssc-fx-converter .ssc-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ssc-fx-converter .ssc-kpi {
  padding: 20px;
  border: 1px solid rgba(42, 92, 255, 0.35);
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f0ff, #f7f9fc);
}

.ssc-fx-converter .ssc-kpi .value {
  margin-top: 6px;
  color: #1f2c43;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.ssc-fx-converter .ssc-kpi .ssc-small {
  margin-top: 6px;
}

.ssc-fx-converter .ssc-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--fx-line);
}

.ssc-fx-converter .ssc-foot a {
  color: #315fae;
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .ssc-fx-converter .ssc-grid,
  .ssc-fx-converter .ssc-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ssc-fx-converter .ssc-inline {
    grid-template-columns: 1fr;
  }

  .ssc-fx-converter .ssc-inline .ssc-swap {
    width: 100% !important;
  }
}

html[data-ssc-theme="dark"] .ssc-fx-converter {
  --fx-panel: #232a39;
  --fx-panel-soft: #293244;
  --fx-text: #edf1f7;
  --fx-muted: #aeb8c9;
  --fx-line: rgba(255, 255, 255, 0.13);
  --fx-accent: #7aa2ed;
}

html[data-ssc-theme="dark"] .ssc-fx-converter .ssc-card {
  background:
    radial-gradient(circle at 92% 0%, rgba(122, 162, 237, 0.08), transparent 22rem),
    var(--fx-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

html[data-ssc-theme="dark"] .ssc-fx-converter :is(
  .ssc-field,
  .ssc-toggle
) {
  background: #1e2532;
}

html[data-ssc-theme="dark"] .ssc-fx-converter :is(
  input[type="number"],
  select
) {
  background: #1a202c;
  color-scheme: dark;
}

html[data-ssc-theme="dark"] .ssc-fx-converter .ssc-kpi {
  background: linear-gradient(135deg, #26334b, #202736);
}

html[data-ssc-theme="dark"] .ssc-fx-converter :is(
  .ssc-title,
  .ssc-kpi .value
) {
  color: #f5f7fa;
}

html[data-ssc-theme="dark"] .ssc-fx-converter .ssc-foot a {
  color: #b8cdf4;
}
