@layer components {
  /* ============================================================
   * FX Currency Converter — Converter-specific styles
   *
   * Design tokens, card, accent, header, footer, disclaimer, and
   * dark / auto theme base are inherited from .crtoday-widget (shared
   * with exchange-rates). Only converter-unique elements here.
   *
   * Contract: docs/contracts/converter-contract.md
   * ============================================================ */

  .crtoday-converter {
  --crtoday-conv-field-border: rgba(148, 163, 184, 0.25);
  --crtoday-conv-field-bg: rgba(255, 255, 255, 0.96);
  --crtoday-conv-field-focus-border: rgb(var(--crtoday-accent-rgb) / 0.45);
  --crtoday-conv-field-focus-ring: 0 0 0 0.1875rem rgb(var(--crtoday-accent-rgb) / 0.08);

  --crtoday-conv-swap-bg: rgba(248, 250, 252, 0.9);
  --crtoday-conv-swap-border: rgba(148, 163, 184, 0.2);
  --crtoday-conv-swap-hover-bg: rgb(var(--crtoday-accent-rgb) / 0.08);

  --crtoday-conv-dropdown-bg: rgba(255, 255, 255, 0.97);
  --crtoday-conv-dropdown-border: rgba(148, 163, 184, 0.2);
  --crtoday-conv-search-bg: rgba(248, 250, 252, 0.8);
  --crtoday-conv-search-border: rgba(148, 163, 184, 0.2);
  --crtoday-conv-search-color: var(--crtoday-text-1);

  --crtoday-conv-option-hover-bg: rgb(var(--crtoday-accent-rgb) / 0.06);
  --crtoday-conv-option-selected-bg: rgb(var(--crtoday-accent-rgb) / 0.10);
}

/* ---------- Converter control hardening ---------- */
.crtoday-converter :where(.crtoday-conv-input, .crtoday-conv-currency, .crtoday-conv-swap, .crtoday-conv-cta, .crtoday-conv-search) {
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
  text-shadow: none;
  background-image: none;
}

.crtoday-converter .crtoday-conv-input,
.crtoday-converter .crtoday-conv-currency,
.crtoday-converter .crtoday-conv-swap,
.crtoday-converter .crtoday-conv-search,
.crtoday-converter .crtoday-conv-cta {
  margin: 0 !important;
}

.crtoday-converter .crtoday-conv-input {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--crtoday-text-1) !important;
  box-shadow: none !important;
}

.crtoday-converter .crtoday-conv-currency {
  border: 0 !important;
  background: transparent !important;
  color: var(--crtoday-text-1) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.crtoday-converter .crtoday-conv-search {
  border: var(--crtoday-space-1) solid var(--crtoday-conv-search-border) !important;
  border-radius: var(--crtoday-space-10) !important;
  background: var(--crtoday-conv-search-bg) !important;
  color: var(--crtoday-conv-search-color) !important;
  box-shadow: none !important;
}

.crtoday-converter .crtoday-conv-cta,
.crtoday-converter .crtoday-conv-cta:visited,
.crtoday-converter .crtoday-conv-cta:hover,
.crtoday-converter .crtoday-conv-cta:focus {
  border: var(--crtoday-space-1) solid var(--crtoday-accent-color) !important;
  border-radius: var(--crtoday-space-12) !important;
  background: var(--crtoday-accent-color) !important;
  color: var(--crtoday-accent-contrast) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
}

.crtoday-converter .crtoday-conv-currency,
.crtoday-converter .crtoday-conv-swap,
.crtoday-converter .crtoday-conv-cta {
  appearance: none !important;
  -webkit-appearance: none !important;
}

.crtoday-converter .crtoday-conv-currency::before,
.crtoday-converter .crtoday-conv-currency::after,
.crtoday-converter .crtoday-conv-swap::before,
.crtoday-converter .crtoday-conv-swap::after {
  content: none !important;
}

.crtoday-converter .crtoday-conv-currency,
.crtoday-converter .crtoday-conv-currency:is(:hover, :focus, :active, :focus-visible) {
  display: flex !important;
  align-items: center !important;
  gap: var(--crtoday-space-6) !important;
  padding: var(--crtoday-space-6) var(--crtoday-space-12) !important;
  min-height: var(--crtoday-space-42) !important;
  border: 0 !important;
  border-radius: 0 var(--crtoday-space-11) var(--crtoday-space-11) 0 !important;
  background: transparent !important;
  color: var(--crtoday-text-1) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
}

.crtoday-converter .crtoday-conv-swap,
.crtoday-converter .crtoday-conv-swap:is(:hover, :focus, :active, :focus-visible) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--crtoday-space-32) !important;
  height: var(--crtoday-space-32) !important;
  padding: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
}

/* ---------- Converter Row ---------- */
.crtoday-converter .crtoday-conv-rates {
  padding: 0;
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-rates {
  padding: var(--crtoday-space-6) 0 var(--crtoday-space-4);
}

.crtoday-converter .crtoday-conv-row {
  padding: var(--crtoday-space-14) var(--crtoday-space-16);
  text-align: left;
}

.crtoday-converter .crtoday-conv-row:first-child,
.crtoday-converter .crtoday-conv-from {
  padding: var(--crtoday-space-14) var(--crtoday-space-16);
}

.crtoday-converter .crtoday-conv-label {
  display: block;
  font-size: var(--crtoday-space-11);
  font-weight: 600;
  color: var(--crtoday-text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--crtoday-space-4);
  text-align: left;
}

.crtoday-converter .crtoday-conv-field {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  border: var(--crtoday-space-1) solid var(--crtoday-conv-field-border);
  border-radius: var(--crtoday-space-14);
  background: var(--crtoday-conv-field-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.crtoday-converter .crtoday-conv-field:focus-within {
  border-color: var(--crtoday-conv-field-focus-border);
  box-shadow: var(--crtoday-conv-field-focus-ring);
}

/* ---------- Amount Input ---------- */
.crtoday-converter .crtoday-conv-input {
  flex: 1;
  width: 0;
  max-width: 100%;
  min-width: 0;
  font-size: var(--crtoday-space-20);
  font-weight: 600;
  color: var(--crtoday-text-1);
  background: transparent;
  border: none;
  outline: none;
  padding: var(--crtoday-space-8) var(--crtoday-space-4) var(--crtoday-space-8) var(--crtoday-space-14);
  font-family: inherit;
  font-feature-settings: 'tnum';
  appearance: textfield;
  -moz-appearance: textfield;
}

.crtoday-widget.crtoday-converter .crtoday-conv-input {
  font-size: var(--crtoday-space-20) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.crtoday-converter .crtoday-conv-input::-webkit-outer-spin-button,
.crtoday-converter .crtoday-conv-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.crtoday-converter .crtoday-conv-input::placeholder {
  color: var(--crtoday-text-3);
}

.crtoday-converter .crtoday-conv-input:focus {
  outline: none;
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-field {
  min-height: var(--crtoday-space-46);
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-input {
  padding: var(--crtoday-space-10) var(--crtoday-space-6) var(--crtoday-space-10) var(--crtoday-space-14);
}

/* ---------- Currency Button ---------- */
/* Divider between input and currency button */
.crtoday-converter .crtoday-conv-currency {
  display: flex;
  align-items: center;
  gap: var(--crtoday-space-6);
  padding: var(--crtoday-space-6) var(--crtoday-space-12);
  border: none;
  border-radius: 0 var(--crtoday-space-11) var(--crtoday-space-11) 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--crtoday-space-14);
  font-weight: 600;
  color: var(--crtoday-text-1);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  min-height: var(--crtoday-space-42);
}

.crtoday-converter .crtoday-conv-currency:hover {
  background: rgb(var(--crtoday-accent-rgb) / 0.06) !important;
}

.crtoday-widget.crtoday-converter .crtoday-conv-currency:is(:focus, :focus-visible) {
  outline: none !important;
  border-color: var(--crtoday-conv-field-focus-border) !important;
  box-shadow: var(--crtoday-conv-field-focus-ring) !important;
}

.crtoday-converter .crtoday-conv-currency .crtoday-flag-wrap {
  width: var(--crtoday-space-24);
  height: var(--crtoday-space-24);
}

.crtoday-converter .crtoday-conv-code {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.crtoday-converter .crtoday-conv-chevron {
  width: var(--crtoday-space-16);
  height: var(--crtoday-space-16);
  color: var(--crtoday-text-3);
  flex-shrink: 0;
}

/* Hide flags when disabled */
.crtoday-converter.crtoday-no-flags .crtoday-flag-wrap {
  display: none;
}

/* ---------- Swap Button ---------- */
.crtoday-converter .crtoday-conv-swap-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--crtoday-space-4) var(--crtoday-space-16);
}

.crtoday-converter .crtoday-conv-swap-wrap::before {
  content: '';
  position: absolute;
  left: var(--crtoday-space-16);
  right: var(--crtoday-space-16);
  top: 50%;
  transform: translateY(-50%);
  border-top: var(--crtoday-space-1) solid var(--crtoday-separator);
  pointer-events: none;
}

.crtoday-converter .crtoday-conv-swap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--crtoday-space-32);
  height: var(--crtoday-space-32);
  border-radius: 50%;
  border: var(--crtoday-space-1) solid var(--crtoday-conv-swap-border) !important;
  background: var(--crtoday-conv-swap-bg) !important;
  cursor: pointer;
  color: var(--crtoday-text-2) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s, color 0.15s, transform 0.3s ease;
}

.crtoday-converter .crtoday-conv-swap:hover {
  background: var(--crtoday-conv-swap-hover-bg);
  color: var(--crtoday-accent-1) !important;
  border-color: rgb(var(--crtoday-accent-rgb) / 0.3) !important;
}

.crtoday-widget.crtoday-converter .crtoday-conv-swap:is(:focus, :focus-visible) {
  outline: none !important;
  border-color: var(--crtoday-conv-field-focus-border) !important;
  box-shadow: var(--crtoday-conv-field-focus-ring) !important;
}

.crtoday-converter .crtoday-conv-swap svg {
  width: var(--crtoday-space-20);
  height: var(--crtoday-space-20);
  display: block;
  stroke: currentColor !important;
  fill: none !important;
}

.crtoday-converter .crtoday-conv-swap svg * {
  stroke: currentColor !important;
  fill: none !important;
}

.crtoday-converter .crtoday-conv-adjustment-wrap {
  padding: 0 var(--crtoday-space-16) var(--crtoday-space-10);
  text-align: left;
}

/* ---------- BiDi Support (LTR / RTL) ---------- */
.crtoday-converter:dir(rtl) .crtoday-conv-row,
.crtoday-converter:dir(rtl) .crtoday-conv-label,
.crtoday-converter:dir(rtl) .crtoday-conv-adjustment-wrap,
.crtoday-converter:dir(rtl) .crtoday-conv-search,
.crtoday-converter:dir(rtl) .crtoday-conv-group-label {
  text-align: right;
}

.crtoday-converter:dir(rtl) .crtoday-conv-input {
  text-align: right;
  padding: var(--crtoday-space-8) var(--crtoday-space-14) var(--crtoday-space-8) var(--crtoday-space-4);
}

.crtoday-converter:not(.crtoday-compact):dir(rtl) .crtoday-conv-input {
  padding: var(--crtoday-space-10) var(--crtoday-space-14) var(--crtoday-space-10) var(--crtoday-space-6);
}

.crtoday-converter:dir(rtl) .crtoday-conv-option {
  direction: rtl;
}

.crtoday-converter:dir(rtl) .crtoday-conv-opt-check {
  margin-left: 0;
  margin-right: auto;
}

/* ---------- CTA Button ---------- */
.crtoday-converter .crtoday-conv-cta-wrap {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  clear: both;
  padding: 0 var(--crtoday-space-16) var(--crtoday-space-14);
}

.crtoday-converter .crtoday-conv-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  position: static;
  float: none;
  left: auto;
  right: auto;
  transform: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: var(--crtoday-space-1) solid var(--crtoday-accent-color);
  border-radius: var(--crtoday-space-12);
  background: var(--crtoday-accent-color);
  color: var(--crtoday-accent-contrast);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  padding: var(--crtoday-space-10) var(--crtoday-space-14);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.crtoday-converter .crtoday-conv-cta:hover {
  background: var(--crtoday-accent-color);
  border-color: var(--crtoday-accent-color);
  color: var(--crtoday-accent-contrast);
  opacity: 0.92;
}

.crtoday-widget.crtoday-converter .crtoday-conv-cta:is(:focus, :focus-visible) {
  outline: none !important;
  border-color: var(--crtoday-conv-field-focus-border) !important;
  box-shadow: var(--crtoday-conv-field-focus-ring) !important;
}

.crtoday-converter .crtoday-conv-cta.crtoday-conv-cta-disabled,
.crtoday-converter .crtoday-conv-cta[aria-disabled='true'] {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .crtoday-converter .crtoday-conv-swap svg {
    transition: none !important;
  }
}

/* ---------- Currency Dropdown ---------- */
.crtoday-conv-dropdown {
  position: fixed;
  min-width: 16.25rem;
  max-height: 22rem;
  background: var(--crtoday-conv-dropdown-bg);
  backdrop-filter: blur(var(--crtoday-space-24)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--crtoday-space-24)) saturate(180%);
  border: var(--crtoday-space-1) solid var(--crtoday-conv-dropdown-border);
  border-radius: var(--crtoday-space-14);
  box-shadow:
    0 var(--crtoday-space-12) var(--crtoday-space-40) rgba(15, 23, 42, 0.14),
    0 var(--crtoday-space-4) var(--crtoday-space-12) rgba(15, 23, 42, 0.06);
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: var(--crtoday-space-6);
  animation: crtoday-conv-dropdown-in 0.15s ease-out;
}

.crtoday-conv-dropdown,
.crtoday-conv-dropdown * {
  box-sizing: border-box;
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
}

@keyframes crtoday-conv-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-var(--crtoday-space-4));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .crtoday-conv-dropdown {
    animation: none;
  }
}

/* Dropdown search */
.crtoday-conv-search-wrap {
  padding: var(--crtoday-space-8) var(--crtoday-space-2);
  border-bottom: var(--crtoday-space-1) solid rgba(148, 163, 184, 0.1);
}

.crtoday-conv-search {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5625rem var(--crtoday-space-14);
  border: var(--crtoday-space-1) solid var(--crtoday-conv-search-border);
  border-radius: var(--crtoday-space-10);
  background: var(--crtoday-conv-search-bg);
  font-family: inherit;
  font-size: var(--crtoday-space-14);
  color: var(--crtoday-conv-search-color);
  outline: none;
  transition: border-color 0.15s;
}

.crtoday-conv-search:focus {
  border-color: var(--crtoday-accent-1);
}

.crtoday-conv-search::placeholder {
  color: var(--crtoday-text-3);
}

/* Dropdown list */
.crtoday-conv-dropdown-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  max-height: 17.5rem;
  padding: var(--crtoday-space-4) var(--crtoday-space-2);
}

/* Groups */
.crtoday-conv-group {
  padding: var(--crtoday-space-2) 0 var(--crtoday-space-6);
}

.crtoday-conv-group-label {
  padding: var(--crtoday-space-8) 1.125rem var(--crtoday-space-4);
  font-size: var(--crtoday-space-11);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--crtoday-text-3);
}

/* Options */
.crtoday-conv-option {
  display: flex;
  align-items: center;
  gap: var(--crtoday-space-10);
  padding: var(--crtoday-space-8) var(--crtoday-space-12);
  cursor: pointer;
  transition: background 0.1s;
  min-height: var(--crtoday-space-40);
  border-radius: var(--crtoday-space-8);
  margin: 0;
}

.crtoday-conv-option:hover,
.crtoday-conv-option.crtoday-conv-option-focused {
  background: var(--crtoday-conv-option-hover-bg);
}

.crtoday-conv-option.crtoday-conv-option-selected {
  background: var(--crtoday-conv-option-selected-bg);
}

.crtoday-conv-option .crtoday-flag-wrap {
  width: var(--crtoday-space-20);
  height: var(--crtoday-space-20);
  flex-shrink: 0;
}

.crtoday-conv-opt-code {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--crtoday-text-1);
  min-width: var(--crtoday-space-32);
}

.crtoday-conv-opt-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  color: var(--crtoday-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crtoday-conv-opt-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: var(--crtoday-accent-1);
  width: var(--crtoday-space-14);
  height: var(--crtoday-space-14);
  flex-shrink: 0;
}

.crtoday-conv-opt-check-icon {
  width: 100%;
  height: 100%;
}

/* ---------- Compact Mode ---------- */
.crtoday-converter.crtoday-compact .crtoday-conv-row {
  padding: var(--crtoday-space-10) var(--crtoday-space-10);
}

.crtoday-converter.crtoday-compact .crtoday-conv-rates {
  padding: 0;
}

.crtoday-converter.crtoday-compact .crtoday-conv-row:first-child,
.crtoday-converter.crtoday-compact .crtoday-conv-from {
  padding-top: var(--crtoday-space-12);
}

.crtoday-widget.crtoday-converter.crtoday-compact .crtoday-conv-label {
  font-size: var(--crtoday-space-10) !important;
  letter-spacing: 0.03em !important;
  margin-bottom: var(--crtoday-space-2) !important;
}

.crtoday-widget.crtoday-converter.crtoday-compact .crtoday-conv-input {
  font-size: var(--crtoday-space-14) !important;
  font-weight: 600 !important;
  padding: var(--crtoday-space-8) var(--crtoday-space-2) var(--crtoday-space-8) var(--crtoday-space-8) !important;
}

.crtoday-widget.crtoday-converter.crtoday-compact:dir(rtl) .crtoday-conv-input {
  padding: var(--crtoday-space-8) var(--crtoday-space-8) var(--crtoday-space-8) var(--crtoday-space-2) !important;
}

.crtoday-converter.crtoday-compact .crtoday-conv-field {
  border-radius: var(--crtoday-space-8);
}

.crtoday-converter.crtoday-compact .crtoday-conv-currency {
  font-size: var(--crtoday-space-12);
  min-height: var(--crtoday-space-32);
}

.crtoday-converter.crtoday-compact .crtoday-conv-currency,
.crtoday-converter.crtoday-compact .crtoday-conv-currency:is(:hover, :focus, :active, :focus-visible) {
  padding: var(--crtoday-space-6) var(--crtoday-space-8) !important;
  min-height: var(--crtoday-space-32) !important;
  border-radius: 0 var(--crtoday-space-8) var(--crtoday-space-8) 0 !important;
}

.crtoday-converter.crtoday-compact .crtoday-conv-currency .crtoday-flag-wrap {
  width: var(--crtoday-space-20);
  height: var(--crtoday-space-20);
}

.crtoday-converter.crtoday-compact .crtoday-conv-code {
  font-size: var(--crtoday-space-12);
}

.crtoday-converter.crtoday-compact .crtoday-conv-chevron {
  width: var(--crtoday-space-12);
  height: var(--crtoday-space-12);
}

.crtoday-converter.crtoday-compact .crtoday-conv-swap-wrap {
  padding: var(--crtoday-space-2) var(--crtoday-space-10);
}

.crtoday-converter.crtoday-compact .crtoday-conv-swap-wrap::before {
  left: var(--crtoday-space-10);
  right: var(--crtoday-space-10);
}

.crtoday-converter.crtoday-compact .crtoday-conv-swap {
  width: var(--crtoday-space-24) !important;
  height: var(--crtoday-space-24) !important;
}

.crtoday-converter.crtoday-compact .crtoday-conv-swap svg {
  width: var(--crtoday-space-14);
  height: var(--crtoday-space-14);
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-swap {
  width: 2.375rem !important;
  height: 2.375rem !important;
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-swap svg {
  width: var(--crtoday-space-22);
  height: var(--crtoday-space-22);
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-currency,
.crtoday-converter:not(.crtoday-compact) .crtoday-conv-currency:is(:hover, :focus, :active, :focus-visible) {
  padding: var(--crtoday-space-8) var(--crtoday-space-12) !important;
  min-height: var(--crtoday-space-46) !important;
}

/* Full-size: scale currency code and flag proportionally to input (×1.5 vs compact) */
.crtoday-converter:not(.crtoday-compact) .crtoday-conv-currency .crtoday-flag-wrap {
  width: var(--crtoday-space-32);
  height: var(--crtoday-space-32);
}

.crtoday-converter:not(.crtoday-compact) .crtoday-conv-code {
  font-size: var(--crtoday-space-16);
}

.crtoday-converter.crtoday-compact .crtoday-conv-cta-wrap {
  padding: 0 var(--crtoday-space-10) var(--crtoday-space-6);
}

.crtoday-widget.crtoday-converter.crtoday-compact .crtoday-conv-cta {
  min-height: var(--crtoday-space-32) !important;
  font-size: var(--crtoday-space-12) !important;
  font-weight: 600 !important;
  padding: var(--crtoday-space-4) var(--crtoday-space-10) !important;
  border-radius: var(--crtoday-space-6) !important;
}

.crtoday-converter.crtoday-compact .crtoday-conv-adjustment-wrap {
  padding: 0 var(--crtoday-space-10) var(--crtoday-space-6);
}

/* ---------- Dark Theme (converter-specific elements) ---------- */
.crtoday-converter.crtoday-theme-dark {
  --crtoday-conv-field-border: rgba(148, 163, 184, 0.4);
  --crtoday-conv-field-bg: rgba(15, 23, 42, 0.78);
  --crtoday-conv-field-focus-border: rgb(var(--crtoday-accent-rgb) / 0.5);
  --crtoday-conv-field-focus-ring: 0 0 0 0.1875rem rgb(var(--crtoday-accent-rgb) / 0.12);

  --crtoday-conv-swap-bg: rgba(30, 41, 59, 0.8);
  --crtoday-conv-swap-border: rgba(148, 163, 184, 0.36);
  --crtoday-conv-swap-hover-bg: rgb(var(--crtoday-accent-rgb) / 0.15);

  --crtoday-conv-dropdown-bg: rgba(15, 23, 42, 0.95);
  --crtoday-conv-dropdown-border: rgba(148, 163, 184, 0.32);
  --crtoday-conv-search-bg: rgba(30, 41, 59, 0.8);
  --crtoday-conv-search-border: rgba(148, 163, 184, 0.36);
  --crtoday-conv-search-color: var(--crtoday-text-1);

  --crtoday-conv-option-hover-bg: rgb(var(--crtoday-accent-rgb) / 0.12);
  --crtoday-conv-option-selected-bg: rgb(var(--crtoday-accent-rgb) / 0.15);
}

.crtoday-converter.crtoday-theme-dark .crtoday-conv-label {
  color: var(--crtoday-text-2) !important;
}

/* ---------- Auto Theme (converter-specific elements) ---------- */
@media (prefers-color-scheme: dark) {
  .crtoday-converter.crtoday-theme-auto {
    --crtoday-conv-field-border: rgba(148, 163, 184, 0.4);
    --crtoday-conv-field-bg: rgba(15, 23, 42, 0.78);
    --crtoday-conv-field-focus-border: rgb(var(--crtoday-accent-rgb) / 0.5);
    --crtoday-conv-field-focus-ring: 0 0 0 0.1875rem rgb(var(--crtoday-accent-rgb) / 0.12);

    --crtoday-conv-swap-bg: rgba(30, 41, 59, 0.8);
    --crtoday-conv-swap-border: rgba(148, 163, 184, 0.36);
    --crtoday-conv-swap-hover-bg: rgb(var(--crtoday-accent-rgb) / 0.15);

    --crtoday-conv-dropdown-bg: rgba(15, 23, 42, 0.95);
    --crtoday-conv-dropdown-border: rgba(148, 163, 184, 0.32);
    --crtoday-conv-search-bg: rgba(30, 41, 59, 0.8);
    --crtoday-conv-search-border: rgba(148, 163, 184, 0.36);
    --crtoday-conv-search-color: #f1f5f9;

    --crtoday-conv-option-hover-bg: rgb(var(--crtoday-accent-rgb) / 0.12);
    --crtoday-conv-option-selected-bg: rgb(var(--crtoday-accent-rgb) / 0.15);
  }

  .crtoday-converter.crtoday-theme-auto .crtoday-conv-label {
    color: var(--crtoday-text-2) !important;
  }
}

/* ---------- Responsive ---------- */
  @media (max-width: 30rem) {
    .crtoday-converter .crtoday-conv-row {
      padding: var(--crtoday-space-12) var(--crtoday-space-16) var(--crtoday-space-6);
    }

    .crtoday-converter .crtoday-conv-input {
      font-size: var(--crtoday-space-16);
    }

    .crtoday-widget.crtoday-converter .crtoday-conv-input {
      font-size: var(--crtoday-space-16) !important;
      font-weight: 600 !important;
    }

    .crtoday-widget.crtoday-converter.crtoday-compact .crtoday-conv-input {
      font-size: var(--crtoday-space-14) !important;
      font-weight: 600 !important;
    }
  }
}
