/* Currency-specific layout only. Visual controls belong to the global
   button, input, modal, badge, card, tab, link and scrollbar primitives. */
.od-currency-trigger { white-space: nowrap; }
.od-currency-value:not(td) { display: inline-flex; align-items: center; gap: 6px; }
td.od-currency-value { white-space: nowrap; }
td.od-currency-value > .od-currency-trigger { margin-inline-end: 6px; vertical-align: middle; }
.od-currency-value > .od-currency-trigger { box-sizing: border-box; width: 36px; min-width: 36px; max-width: 36px; padding-inline: 4px; overflow: hidden; }
.od-currency-personal-link { margin-top: 10px; }

/* A comparator can have a narrow calculator even on a wide monitor. */
.od-currency-favor { container: currencyFavor / inline-size; }
@container currencyFavor (max-width: 520px) {
    html body .od-currency-favor table.favor-stake-table,
    html body .od-currency-favor table.favor-stake-table :is(tbody, tfoot) { display: block !important; width: 100% !important; min-width: 0 !important; }
    html body .od-currency-favor table.favor-stake-table thead { display: none !important; }
    html body .od-currency-favor table.favor-stake-table tr { display: grid !important; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); width: 100% !important; }
    html body .od-currency-favor table.favor-stake-table :is(th, td) { display: block !important; position: static !important; width: auto !important; min-width: 0 !important; padding: 8px !important; }
    html body .od-currency-favor table.favor-stake-table tbody th { grid-column: 1 / -1; }
    html body .od-currency-favor table.favor-stake-table tbody td:last-child { grid-column: 1 / -1; }
    html body .od-currency-favor table.favor-stake-table tfoot td:nth-child(n+3) { display: none !important; }
    html body .od-currency-favor table.favor-stake-table .od-table-row-card-global-1__label { display: block !important; margin-bottom: 4px; }
    html body .od-currency-favor .od-input-shell-global-1:has(> .od-currency-trigger) { display: flex !important; width: 100% !important; min-width: 0 !important; }
    html body .od-currency-favor .od-input-shell-global-1:has(> .od-currency-trigger) > input { flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important; }
}
/* Override legacy Score geometry, never the global colors or typography. */
html body.od-score-page .score-page.score-page .score-detail-wrap .od-input-shell-global-1:has(> .od-button-global-1--prefix) { display: flex !important; align-items: stretch !important; gap: 0 !important; padding: 0 !important; }

.od-currency-modal .od-modal-global-1__dialog { display: flex; flex-direction: column; max-height: 85vh; overflow: hidden; }
.od-currency-modal .od-modal-global-1__title,
.od-currency-modal .od-modal-global-1__copy { flex: 0 0 auto; }
.od-currency-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; align-items: start; gap: 8px; min-height: 0; max-height: min(50vh, 360px); padding: 2px; overflow-y: auto; overscroll-behavior: contain; }
.od-currency-option { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; padding: 8px; overflow-wrap: anywhere; }
.od-currency-select { width: 100%; min-width: 0; justify-content: flex-start; text-align: left; }
.od-currency-select > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-currency-symbol { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 24px; height: 24px; white-space: nowrap; }
.od-currency-check { margin-inline-start: auto; }
.od-currency-check > svg { display: block; width: 16px; height: 16px; }
.od-currency-rate > label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.od-currency-rate-field { min-width: 0; }
@media (max-width: 359px) { .od-currency-options { grid-template-columns: minmax(0, 1fr); } }

.od-currency-admin .od-currency-admin-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.od-currency-admin-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.od-currency-admin-enabled { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-self: start; margin: 0; }
.od-currency-admin .od-currency-admin-save { justify-self: center; width: auto; max-width: 100%; padding-inline: 20px; }
.od-currency-admin-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.od-currency-admin-status .od-switch-global-1 { flex: 0 0 auto; margin: 0; }
@media (max-width: 1099px) { .od-currency-admin .od-currency-admin-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .od-currency-admin .od-currency-admin-fields { grid-template-columns: minmax(0, 1fr); }.od-currency-admin-actions { grid-template-columns: minmax(0, 1fr); } }
.od-currency-settings-page .control-global-section { gap: 18px; }
.od-currency-settings-page .control-global-tabs > .od-tab-global-1 { flex: 1 1 0; }
.od-currency-settings-page .od-currency-save { justify-self: center; width: auto; max-width: 100%; padding-inline: 20px; }
.od-currency-global-suggestion { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; }
.od-currency-settings-page .od-currency-rates-table :is(th, td):nth-child(n+2) { text-align: center; }
.od-currency-settings-page .od-currency-rates-table td > input { display: inline-block; width: 160px; max-width: 100%; margin-inline: auto; text-align: center; }
.od-currency-settings-page .od-currency-apply { flex: 0 0 auto; }
.od-currency-personal-form { padding: 16px; }
.od-currency-personal-form h2 { margin: 0; }
.od-currency-personal-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.od-currency-personal-fields label { display: grid; gap: 6px; min-width: 0; }
.od-currency-personal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.od-currency-symbol-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.od-currency-symbol-presets > button { min-width: 34px; }
.od-currency-personal-label { display: block; }
@media (max-width: 900px) { .od-currency-personal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .od-currency-personal-fields { grid-template-columns: minmax(0, 1fr); } }
.od-currency-house-grid { display: grid; grid-auto-flow: column; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(var(--currency-rows-4), auto); gap: 8px 16px; }
.od-currency-house-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 1.25fr); align-items: center; min-width: 0; gap: 10px; padding: 9px 10px; }
.od-currency-house-row > span { min-width: 0; overflow-wrap: anywhere; }
.od-currency-house-row > select { min-width: 0; }
@media (max-width: 1439px) { .od-currency-house-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(var(--currency-rows-3), auto); } }
@media (max-width: 1199px) { .od-currency-house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--currency-rows-2), auto); } }
@media (max-width: 767px) { .od-currency-house-grid { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }.od-currency-house-row { grid-template-columns: minmax(0, 1fr) minmax(155px, 1.25fr); } }
