/* Scoped to [exchange-rates-ar]. Original widgets and theme styles stay intact. */
.eraa-card,
.eraa-card * {
    box-sizing: border-box;
}

.eraa-card {
    direction: rtl;
    width: 100%;
    min-width: 0;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #dce8e6;
    border-radius: 14px;
    background: #fff;
    color: #173a38;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    text-align: right;
}

.eraa-card .eraa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 3px;
    padding: 0;
}

.eraa-card .eraa-title {
    margin: 0;
    padding: 0;
    color: #0b5c5a;
    font-family: inherit;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
    overflow-wrap: anywhere;
}

.eraa-card .eraa-unit {
    flex: 0 0 auto;
    padding: 2px 9px;
    border: 1px solid #dce8e6;
    border-radius: 6px;
    background: #f2f7f6;
    color: #0b5c5a;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.eraa-card .eraa-subtitle {
    margin: 0 0 12px;
    padding: 0;
    color: #596d6b;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.6;
}

.eraa-card .eraa-body,
.eraa-card .cr-exchange-rates {
    width: 100%;
    min-width: 0;
    margin: 0;
    font-family: inherit;
}

.eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: stretch;
    direction: rtl;
    min-width: 0;
    width: 100%;
    margin: 0 0 5px;
    padding: 0 !important;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
}

.eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders > span {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 7px 10px;
    border: 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
}

.eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders > span:first-child {
    justify-content: flex-start;
    gap: 6px;
    direction: rtl;
    font-weight: 500;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
}

.eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders > span + span {
    justify-content: flex-start;
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums lining-nums;
    text-align: left;
    white-space: nowrap;
}

.eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders img {
    display: block;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    object-fit: contain;
}

/* Keep the source's own date, attribution and links readable. */
.eraa-card .cr-exchange-rates .exchange-rates-caption {
    display: flex;
    align-items: center;
    justify-content: center !important;
    flex-wrap: wrap;
    direction: ltr;
    unicode-bidi: isolate;
    gap: 0;
    margin: 10px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid #e3eceb;
    color: #596d6b;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.eraa-card .exchange-rates-caption a {
    color: #0b5c5a;
    text-decoration: none;
}

.eraa-card .exchange-rates-caption a:hover {
    text-decoration: underline;
}

.eraa-card .exchange-rates-caption a:focus-visible {
    outline: 2px solid #0b5c5a;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Match the original badge's hidden extended attribution panel. */
.eraa-card .exchange-rates-info-caption {
    display: none;
}

.eraa-card .eraa-note {
    margin: 4px 0 0;
    padding: 0;
    color: #596d6b;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.eraa-card .eraa-message {
    margin: 0;
    padding: 0;
    font-family: inherit;
    overflow-wrap: anywhere;
}

@media (max-width: 360px) {
    .eraa-card {
        padding: 10px;
    }

    .eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders > span {
        padding: 6px 8px;
        font-size: 13px;
    }

    .eraa-card .cr-exchange-rates.shortcode-exchange-rates-badge .badge-leaders > span + span {
        font-size: 14px;
    }
}
