/* Compact utility: shared MG tokens; the calendar may extend beyond the card. */
.fx-calculator { border: 1px solid var(--line); border-radius: 8px; background: var(--white); overflow: visible; }
.fx-form { display: grid; grid-template-columns: minmax(110px,.8fr) minmax(300px,2.5fr) minmax(190px,1.1fr); align-items: start; gap: 20px; padding: 24px; }
.fx-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.fx-form input, .fx-form select { width: 100%; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: #fff; padding: 0 11px; font: inherit; font-size: 14px; }
.fx-form input[aria-invalid=true] { border-color: #ac3030; }
.fx-form #fx-amount { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fx-pair { display: grid; grid-template-columns: minmax(0,1fr) 38px minmax(0,1fr); align-items: end; gap: 8px; }
.fx-form select { text-overflow: ellipsis; padding-right: 20px; }
.fx-swap { height: 46px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--navy-2); cursor: pointer; }
.fx-swap svg { width: 22px; height: 22px; }
.fx-date-heading { display: flex; align-items: center; justify-content: space-between; height: 24px; margin-bottom: 0; }
.fx-date-heading label { margin: 0 0 8px; }
.fx-today { align-self: start; padding: 0; color: var(--blue); background: none; border: 0; cursor: pointer; font-size: 12px; }
.fx-date-control { display: flex; position: relative; }
.fx-form .fx-date-control > input { border-radius: 5px 0 0 5px; }
.fx-calendar { flex: 0 0 40px; height: 46px; border: 1px solid var(--line); border-left: 0; border-radius: 0 5px 5px 0; display: grid; place-items: center; background: #fff; cursor: pointer; color: var(--blue); }
.fx-calendar svg { width: 20px; height: 20px; }
.fx-result-panel { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: baseline; padding: 22px 24px; border-top: 1px solid var(--line); background: var(--pale); border-radius: 0 0 8px 8px; min-width: 0; }
.fx-result-label { grid-column: 1/-1; color: var(--mg-muted); font-size: 12px; }
.fx-result { display: block; font-size: clamp(26px,3vw,36px); color: var(--navy); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fx-equation { grid-column: 1; margin: 4px 0 0; color: var(--mg-muted); font-size: 13px; overflow-wrap: anywhere; }
.fx-publication { grid-column: 2; grid-row: 2; display: flex; gap: 6px; font-size: 12px; color: var(--mg-muted); }
.fx-publication strong { color: var(--navy); font-weight: 700; }
.fx-notice { grid-column: 2; grid-row: 3; color: var(--mg-muted); text-align: right; }
.fx-notice, .fx-status { margin: 0; font-size: 12px; line-height: 1.5; }
.fx-notice:empty, .fx-status:empty { display: none; }
.fx-status { grid-column: 1/-1; color: var(--navy); }
.fx-retry { justify-self: start; grid-column: 1/-1; color: var(--blue); cursor: pointer; background: white; min-height: 40px; }
.fx-error { color: #a02323; margin: 6px 0 0; font-size: 12px; line-height: 1.5; }
.fx-source { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding: 16px 0; font-size: 12px; line-height: 1.6; color: var(--mg-muted); }
.fx-source a { color: var(--navy-2); text-decoration: underline; text-underline-offset: 3px; }
.fx-rates-details { border-top: 1px solid var(--line); margin-top: 8px; }
.fx-rates-details summary { display: list-item; padding: 18px 0; font-size: 14px; font-weight: 650; cursor: pointer; color: var(--navy-2); }
.fx-table-wrap { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; background: #fff; }
.fx-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.fx-table-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.fx-table th, .fx-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.fx-table th { background: var(--pale); font-size: 12px; font-weight: 700; }
.fx-table th:first-child, .fx-table td:first-child { text-align: left; }
.fx-table td:first-child strong { display: inline-block; min-width: 48px; }
.fx-table td:first-child span { color: var(--mg-muted); }
.fx-table tr:last-child td { border: 0; }
.fx-table tbody tr:hover { background: var(--bg); }
.fx-section [hidden] { display: none !important; }
.fx-calendar-popup { position: absolute; z-index: 25; top: calc(100% + 8px); right: 0; width: min(320px,calc(100vw - 48px)); max-height: calc(100dvh - 120px); overflow-y: auto; scroll-margin-block: 90px 16px; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.fx-calendar-controls { display: grid; grid-template-columns: 30px minmax(0,1fr) 78px 30px; gap: 5px; align-items: center; }
.fx-calendar-controls button, .fx-calendar-days button, .fx-calendar-close { border: 0; background: transparent; color: var(--navy); font: inherit; cursor: pointer; border-radius: 4px; min-height: 34px; }
.fx-calendar-controls button { font-size: 24px; }
.fx-form .fx-calendar-controls select { padding: 0 4px; font-size: 12px; height: 38px; }
.fx-weekdays, .fx-calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; text-align: center; }
.fx-weekdays { margin: 14px 0 8px; font-size: 11px; color: var(--mg-muted); }
.fx-calendar-days button { font-size: 13px; }
.fx-calendar-days button[aria-pressed=true] { background: var(--navy-2); color: white; }
.fx-calendar-days button[aria-current=date]:not([aria-pressed=true]) { box-shadow: inset 0 0 0 1px var(--blue); }
.fx-calendar-days button:hover:not(:disabled):not([aria-pressed=true]), .fx-calendar-controls button:hover:not(:disabled), .fx-swap:hover { background: var(--pale); }
.fx-calendar-controls button:disabled, .fx-calendar-days button:disabled { color: #879ba4; cursor: default; }
.fx-calendar-close { font-size: 12px; color: var(--blue); width: 100%; margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0; }
@media (max-width: 900px) {
 .fx-form { grid-template-columns: 1fr 1fr; gap: 18px; }
 .fx-pair { grid-column: 1/-1; grid-row: 2; }
}
@media (max-width: 550px) {
 .fx-form { grid-template-columns: minmax(0,1fr); padding: 18px; gap: 16px; }
 .fx-date-field { grid-row: 3; }
 .fx-result-panel { grid-template-columns: 1fr; padding: 18px; gap: 8px; }
 .fx-publication, .fx-notice { grid-column: 1; grid-row: auto; text-align: left; }
 .fx-result { font-size: 30px; }
 .fx-table th, .fx-table td { padding: 12px 8px; font-size: 12px; }
 .fx-table td:first-child span { display: block; margin-top: 4px; }
 .fx-table td:first-child { max-width: 140px; overflow-wrap: anywhere; }
}
