/* Base typography and shared helpers */
.balance-page__text--dark {
    color: #323232;
}

.balance-page__sortable-header {
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.balance-page__sortable-header .js-sort-icon {
    margin-left: 5px;
    opacity: 0.4;
}

.balance-page__sortable-header:hover .js-sort-icon,
.balance-page__sortable-header .fa-sort-asc,
.balance-page__sortable-header .fa-sort-desc {
    opacity: 1;
}

.balance-page__header-row {
    text-align: center;
}

.balance-page__page-header-title {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.balance-page__text--size-16 {
    font-size: 16px;
}

.balance-page__text--size-18 {
    font-size: 18px;
}

.balance-page__text--header {
    font-size: 22px;
    font-weight: 700;
}

.balance-page__text--hint {
    font-size: 12px;
    color: #323232;
}

.balance-page__text--content {
    font-size: 16px;
    color: #323232;
}

.balance-page__info-icon {
    margin-bottom: 5px;
}

.balance-page__rates-table {
    color: #323232;
}

.balance-page__rate-cell {
    padding-top: 4px;
}

.balance-page__rate-value {
    color: #030479;
    font-size: 13px;
}

.balance-page__rate-separator {
    height: 6px;
    border-bottom: 1px dotted #cfcfcf;
}

.balance-page__link--underline {
    text-decoration: underline;
}

.balance-page__link--dark {
    color: #323232;
}

.balance-page__hidden {
    display: none;
}

.balance-page__calendar-cell {
    padding-top: 24px;
}

/* Filter layout */

/*
 * Bootstrap-select replaces native <select> with a custom button.
 * Hide the native select immediately so it never flashes as an unstyled
 * element during the brief window between a zone re-render and
 * bootstrap-select re-initialisation.
 */
select.selectpicker {
    opacity: 0;
    pointer-events: none;
}

.balance-page__filter-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.balance-page__filter-column--submit {
    justify-content: flex-end;
}

.balance-page__filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
}

.balance-page__filter-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.balance-page__filter-label {
    margin: 0;
}

.balance-page__filter-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-page__filter-date-range-row .form-control {
    cursor: pointer;
    background-color: #fff;
}

.balance-page__filter-date-range-trigger {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 1;
}

.balance-page__filter-date-range-trigger:focus {
    outline: none;
}

.balance-page__filter-range-hidden {
    display: none;
}

.balance-page__filter-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-page__filter-range-item {
    flex: 1;
}

.balance-page__filter-range-separator {
    color: #323232;
    font-weight: 700;
}

.balance-page__filter-input-row .form-control {
    flex: 1;
}

.balance-page__filter-input-row .balance-page__calendar-cell {
    padding-top: 0;
}

.balance-page__filter-hint-wrap {
    margin-top: 2px;
}

/* Transaction overview header */
.balance-page__transaction-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.balance-page__transaction-overview-header .balance-page__text {
    display: inline-flex;
    align-items: center;
    margin: 0;
    line-height: 1.2;
}

.balance-page__transaction-overview-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f1f3fa;
    color: #323232;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.balance-page__transaction-overview-toggle .fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
    transition: transform 0.18s ease;
}

/* Shared panel layout */
.balance-page__panel-promo-content,
.balance-page__exchange-panel-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 auto;
    gap: 20px;
}

.balance-page__panel-promo-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.balance-page .panel {
    margin-bottom: 0px;
}

.balance-page .row {
    margin-bottom: 0;
}

.balance-page .container>.row:last-child {
    margin-bottom: 24px;
}

/* Levels promo artwork and crown positions */
.balance-page__panel-promo-content--levels {
    align-items: flex-start;
    gap: 20px;
}

.balance-page__panel-promo-body--levels .balance-page__panel-promo-content {
    padding-right: 0;
}

.balance-page__levels-image-wrap {
    position: relative;
    flex: 0 0 320px;
    max-width: 45%;
    margin-left: auto;
    z-index: 1;
}

.balance-page__levels-image {
    display: block;
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.balance-page__levels-image--mobile {
    display: none;
}

.balance-page__levels-crowns {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.balance-page__levels-crown-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 58px;
    --balance-crown-sparkle-color: #ff9900;
    --balance-crown-sparkle-rgb: 255, 153, 0;
    overflow: visible;
    pointer-events: auto;
}

.balance-page__levels-crown-image {
    display: block;
    width: 68px;
    transform-origin: center;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.balance-page__levels-crown-item::after {
    content: "✦";
    position: absolute;
    top: -6px;
    right: -4px;
    font-size: 10px;
    line-height: 1;
    color: var(--balance-crown-sparkle-color);
    opacity: 0;
    transform: scale(0.6) rotate(-10deg);
    pointer-events: none;
}

.balance-page__levels-crown-name {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #323232;
    line-height: 1.1;
    text-align: center;
}

.balance-page__levels-crown-bonus {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 500;
    color: #323232;
    line-height: 1;
}

.balance-page__levels-crown-item--bronze {
    position: absolute;
    right: 48%;
    bottom: 10%;
    --balance-crown-sparkle-color: #b07a57;
    --balance-crown-sparkle-rgb: 176, 122, 87;
}

.balance-page__levels-crown-item--silver {
    position: absolute;
    right: 21%;
    bottom: 25.25%;
    --balance-crown-sparkle-color: #9aa2b6;
    --balance-crown-sparkle-rgb: 154, 162, 182;
}

.balance-page__levels-crown-item--gold {
    position: absolute;
    right: -7%;
    bottom: 39.5%;
    --balance-crown-sparkle-color: #f4b400;
    --balance-crown-sparkle-rgb: 244, 180, 0;
}

.balance-page__levels-crown-item--platinum {
    position: absolute;
    right: -32%;
    bottom: 50%;
    --balance-crown-sparkle-color: #7dc2cb;
    --balance-crown-sparkle-rgb: 125, 194, 203;
}

.balance-page__levels-crown-item--emerald {
    position: absolute;
    right: -59.5%;
    bottom: 61.5%;
    --balance-crown-sparkle-color: #34b46d;
    --balance-crown-sparkle-rgb: 52, 180, 109;
}

.balance-page__levels-crown-item--ruby {
    position: absolute;
    right: -92%;
    bottom: 61.5%;
    --balance-crown-sparkle-color: #d9536f;
    --balance-crown-sparkle-rgb: 217, 83, 111;
}

.balance-page__levels-crown-item--diamond {
    position: absolute;
    right: -122.5%;
    bottom: 51.5%;
    --balance-crown-sparkle-color: #70c7ff;
    --balance-crown-sparkle-rgb: 112, 199, 255;
}

.balance-page__levels-crown-item.is-sparkling .balance-page__levels-crown-image {
    animation: balance-crown-sparkle 0.65s ease-in-out;
}

.balance-page__levels-crown-item.is-sparkling::after {
    animation: balance-crown-twinkle 0.65s ease-in-out;
}

@keyframes balance-crown-sparkle {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0px 0px 0px rgba(var(--balance-crown-sparkle-rgb), 0));
    }

    35% {
        transform: scale(1.08) rotate(-2deg);
        filter: drop-shadow(0px 0px 6px rgba(var(--balance-crown-sparkle-rgb), 0.45));
    }

    70% {
        transform: scale(1.03) rotate(1deg);
        filter: drop-shadow(0px 0px 4px rgba(var(--balance-crown-sparkle-rgb), 0.3));
    }

    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0px 0px 0px rgba(var(--balance-crown-sparkle-rgb), 0));
    }
}

@keyframes balance-crown-twinkle {
    0% {
        opacity: 0;
        transform: scale(0.6) rotate(-10deg);
    }

    40% {
        opacity: 1;
        transform: scale(1.15) rotate(8deg);
    }

    100% {
        opacity: 0;
        transform: scale(0.75) rotate(18deg);
    }
}

/* Promo panel copy and artwork sizing */
.balance-page__panel-promo-body--levels .balance-page__panel-promo-title {
    margin-bottom: 10px;
}

.balance-page__panel-promo-body--levels .balance-page__panel-promo-text {
    padding-right: 0;
}

.balance-page__panel-promo-copy,
.balance-page__exchange-panel-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.balance-page__levels-promo-slot {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
}

.balance-page__panel-promo-title,
.balance-page__exchange-panel-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    min-height: 20px;
    color: #323232;
}

.balance-page__panel-promo-text,
.balance-page__exchange-panel-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    padding-right: 35%;
    color: #323232;
}

.balance-page__panel-promo-image-wrap,
.balance-page__exchange-panel-image-wrap {
    flex: 0 0 220px;
    max-width: 35%;
}

.balance-page__panel-promo-image,
.balance-page__exchange-panel-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.balance-page__panel-promo-action,
.balance-page__exchange-panel-action {
    margin-top: 16px;
}

.balance-page__panel-promo-button,
.balance-page__exchange-panel-button {
    min-width: 240px;
    text-align: center;
}

/* Empty and pre-search transaction states */
.balance-page__transactions-placeholder {
    margin-top: 8px;
    padding: 20px 16px;
    text-align: center;
    background: #f7faff;
    border: 1px solid #b9c7db;
    border-radius: 10px;
}

.balance-page__transactions-placeholder--empty {
    background: #fff6ec;
    border-color: #f0ad4e;
}

.balance-page__transactions-placeholder--empty .balance-page__transactions-placeholder-icon {
    color: #e2932d;
}

.balance-page__transactions-placeholder--empty .balance-page__transactions-placeholder-text {
    color: #8a5a20;
}

.balance-page__transactions-placeholder-icon {
    font-size: 24px;
    color: #6c7a90;
    margin-bottom: 8px;
}

.balance-page__transactions-placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: #323232;
    margin-bottom: 6px;
}

.balance-page__transactions-placeholder-text {
    font-size: 14px;
    color: #323232;
    margin-bottom: 4px;
}

.balance-page__transactions-placeholder-hint {
    font-size: 13px;
    color: #6c7a90;
}

/* Filter action row */
.balance-page__filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 0;
    margin-top: 0;
}

.balance-page__filter-submit {
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 4px 6px !important;
    margin-bottom: 0px !important;
    font-size: 14px !important;
    line-height: 1.2;
    white-space: nowrap;
}

.balance-page__level-progress {
    margin-bottom: 10px;
}

.balance-page__level-panel-body {
    padding-bottom: 14px;
}

/* Level progress ribbon */
.balance-page__level-ribbon {
    --balance-ribbon-bg: #57bcc0;
    --balance-ribbon-arrow-bg: #4aa7ac;
    --balance-ribbon-text: #ffffff;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    min-height: 40px;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: var(--balance-ribbon-bg);
    color: var(--balance-ribbon-text);
    text-decoration: none;
}

.balance-page__level-ribbon:hover,
.balance-page__level-ribbon:focus {
    color: var(--balance-ribbon-text);
    text-decoration: none;
}

.balance-page__level-ribbon[data-current-level="bronze"] {
    --balance-ribbon-bg: #f4e4db;
    --balance-ribbon-arrow-bg: #e8d4c7;
    --balance-ribbon-text: #8a4f2d;
}

.balance-page__level-ribbon[data-current-level="silver"] {
    --balance-ribbon-bg: #e9edf5;
    --balance-ribbon-arrow-bg: #dde3ee;
    --balance-ribbon-text: #5e6780;
}

.balance-page__level-ribbon[data-current-level="gold"] {
    --balance-ribbon-bg: #fff2cc;
    --balance-ribbon-arrow-bg: #f3e5b8;
    --balance-ribbon-text: #8b6500;
}

.balance-page__level-ribbon[data-current-level="platinum"] {
    --balance-ribbon-bg: #dff4f7;
    --balance-ribbon-arrow-bg: #cce9ee;
    --balance-ribbon-text: #2c6f76;
}

.balance-page__level-ribbon[data-current-level="emerald"] {
    --balance-ribbon-bg: #ddf4e6;
    --balance-ribbon-arrow-bg: #cae8d8;
    --balance-ribbon-text: #1f7a47;
}

.balance-page__level-ribbon[data-current-level="ruby"] {
    --balance-ribbon-bg: #f9dfe6;
    --balance-ribbon-arrow-bg: #f2ced9;
    --balance-ribbon-text: #9a2f47;
}

.balance-page__level-ribbon[data-current-level="diamond"] {
    --balance-ribbon-bg: #e3f3ff;
    --balance-ribbon-arrow-bg: #d3e9f7;
    --balance-ribbon-text: #1d6b9f;
}

.balance-page__level-ribbon-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    padding: 0 2px;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
}

.balance-page__level-ribbon-value {
    white-space: nowrap;
}

.balance-page__level-ribbon-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    background: var(--balance-ribbon-arrow-bg);
    color: var(--balance-ribbon-text);
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
}

/* Earnings overview */
.balance-page__earnings-panel {
    margin-bottom: 12px;
}

.balance-page__earnings-panel-body {
    padding: 18px 22px;
}

.balance-page__earnings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.balance-page__earnings-month {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: #323232;
}

.balance-page__earnings-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #323232;
}

.balance-page__earnings-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #080d82;
}

.balance-page__earnings-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    margin-top: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: #080d82;
}

.balance-page__earnings-sort-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.balance-page__earnings-month-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.balance-page__earnings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 180px));
    column-gap: 34px;
    row-gap: 20px;
    margin: 20px auto 0;
    margin-bottom: 16px;
    justify-content: center;
    justify-items: stretch;
}

.balance-page__earnings-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.balance-page__earnings-icon {
    width: 27px;
    height: 27px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #FFEBCE;
    color: #FF9900;
    text-align: center;
    flex: 0 0 27px;
}

.balance-page__earnings-icon-glyph {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    line-height: 1;
}

.balance-page__earnings-icon-image {
    width: 18px;
    height: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.balance-page__earnings-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
    color: #323232;
}

.balance-page__earnings-label {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.2;
    color: #323232;
}



/* Transactions table and expandable detail rows */
.balance-page__transactions-wrap {
    width: 100%;
    max-height: 600px;
    overflow-y: auto;
}

.balance-page__transactions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: -10px;
    table-layout: fixed;
}

.balance-page__transactions-table>thead>tr>th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.balance-page__transactions-table>thead>tr>th:nth-child(1) {
    width: 12%;
}

.balance-page__transactions-table>thead>tr>th:nth-child(2) {
    width: 22%;
}

.balance-page__transactions-table>thead>tr>th:nth-child(3) {
    width: 32%;
}

.balance-page__transactions-table>thead>tr>th:nth-child(4) {
    width: 14%;
}

.balance-page__transactions-table>thead>tr>th:nth-child(5) {
    width: 15%;
}

.balance-page__transactions-table>thead>tr>th:nth-child(6) {
    width: 5%;
}

@media (max-width: 991px) {
    .balance-page__transactions-table>thead>tr>th:nth-child(2) {
        width: 45%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(4) {
        width: 20%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(5) {
        width: 25%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(6) {
        width: 10%;
    }

    /* Shift first-child border rules to pseudo-first visible child (nth-child 2) when column 1 is hidden */
    .balance-page__transactions-table>tbody>tr.balance-page__transaction-row>td:nth-child(2) {
        border-left: 1px solid #e1e5eb;
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .balance-page__transaction-row:not([aria-expanded="true"]):hover>td:nth-child(2),
    .balance-page__transaction-row:not([aria-expanded="true"]):focus>td:nth-child(2) {
        border-left-color: #b9c7db;
    }

    .balance-page__transactions-table>tbody>tr.balance-page__transaction-row[aria-expanded="true"]>td:nth-child(2) {
        border-left: 0;
        border-radius: 8px 0 0 0;
        box-shadow: inset 0 1px 0 #b9c7db, inset 1px 0 0 #b9c7db;
    }
}

@media (max-width: 767px) {
    .balance-page__transactions-table>thead>tr>th {
        padding: 10px 8px;
        font-size: 11px;
    }

    .balance-page__transactions-table>tbody>tr.balance-page__transaction-row>td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .balance-page__transaction-provider-cell {
        word-break: break-word;
        white-space: normal;
    }

    .balance-page__transaction-amount {
        font-size: 14px;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(2) {
        width: 42%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(4) {
        width: 25%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(5) {
        width: 25%;
        text-align: center;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(6) {
        width: 8%;
        padding-left: 0;
        padding-right: 0;
    }

    .balance-page__transaction-caret-cell {
        padding-left: 0 !important;
        padding-right: 4px !important;
    }

    .balance-page__transaction-status-td {
        text-align: center;
    }

    .balance-page__transaction-status-icon {
        height: 26px !important;
    }
}

@media (max-width: 575px) {
    .balance-page__transactions-table>thead>tr>th {
        padding: 8px 6px;
        font-size: 10px;
    }

    .balance-page__transactions-table>tbody>tr.balance-page__transaction-row>td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .balance-page__transaction-amount {
        font-size: 13px;
    }

    .balance-page__transaction-status-cell {
        gap: 4px;
        justify-content: center;
    }

    .balance-page__transaction-status-icon {
        height: 24px !important;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(2) {
        width: 40%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(4) {
        width: 27%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(5) {
        width: 25%;
    }

    .balance-page__transactions-table>thead>tr>th:nth-child(6) {
        width: 8%;
        padding-left: 0;
        padding-right: 0;
    }
}

.balance-page__transactions-table>thead>tr>th {
    border-bottom: 2px solid #e1e5eb;
    color: #8c9fb1;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 12px 16px;
}

.balance-page__transaction-row {
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.balance-page__transactions-table>tbody>tr.balance-page__transaction-row>td {
    border-top: 1px solid #e1e5eb !important;
    border-bottom: 1px solid #e1e5eb !important;
    background: #ffffff;
    padding: 16px;
    vertical-align: middle;
}

.balance-page__transactions-table>tbody>tr.balance-page__transaction-row>td:first-child {
    border-left: 1px solid #e1e5eb;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.balance-page__transactions-table>tbody>tr.balance-page__transaction-row>td:last-child {
    border-right: 1px solid #e1e5eb;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.balance-page__transaction-row:not([aria-expanded="true"]):hover>td,
.balance-page__transaction-row:not([aria-expanded="true"]):focus>td {
    background: #fbfdff;
    border-top-color: #b9c7db !important;
    border-bottom-color: #b9c7db !important;
}

.balance-page__transaction-row:not([aria-expanded="true"]):hover>td:first-child,
.balance-page__transaction-row:not([aria-expanded="true"]):focus>td:first-child {
    border-left-color: #b9c7db;
}

.balance-page__transaction-row:not([aria-expanded="true"]):hover>td:last-child,
.balance-page__transaction-row:not([aria-expanded="true"]):focus>td:last-child {
    border-right-color: #b9c7db;
}

.balance-page__transactions-table>tbody:before {
    display: none;
}

.balance-page__transaction-description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
    color: #556270;
}

.balance-page__transaction-provider-cell {
    font-weight: 600;
    color: #2c3e50;
}

.balance-page__transaction-amount-cell {
    width: 1%;
    white-space: nowrap;
}

.balance-page__transaction-amount {
    white-space: nowrap;
    font-weight: 700;
    font-size: 15px;
    color: #030479;
}

.balance-page__transaction-caret-cell {
    text-align: center;
    white-space: nowrap;
}

.balance-page__transaction-caret {
    color: #6c7a90;
    transition: transform 180ms ease;
    transform: rotate(0deg);
    font-size: 18px;
    vertical-align: middle;
}

.balance-page__transaction-status-icon {
    height: 30px;
    width: auto;
    vertical-align: middle;
}

.balance-page__transaction-caret--mobile {
    font-size: 16px;
    line-height: 1;
}

.balance-page__transaction-row[aria-expanded="true"] .balance-page__transaction-caret {
    transform: rotate(-180deg);
}

.balance-page__transactions-table>tbody>tr.balance-page__transaction-row[aria-expanded="true"]>td {
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: #fafafa;
    box-shadow: inset 0 1px 0 #b9c7db;
}

.balance-page__transactions-table>tbody>tr.balance-page__transaction-row[aria-expanded="true"]>td:first-child {
    border-left: 0;
    border-radius: 8px 0 0 0;
    box-shadow: inset 0 1px 0 #b9c7db, inset 1px 0 0 #b9c7db;
}

.balance-page__transactions-table>tbody>tr.balance-page__transaction-row[aria-expanded="true"]>td:last-child {
    border-right: 0;
    border-radius: 0 8px 0 0;
    box-shadow: inset 0 1px 0 #b9c7db, inset -1px 0 0 #b9c7db;
}

.balance-page__transaction-detail-row {
    display: none;
}

.balance-page__transaction-detail-row.balance-page__transaction-detail-row--open {
    display: table-row;
}

.balance-page__transaction-detail-row.balance-page__transaction-detail-row--open td {
    padding: 0 !important;
    border-top: none !important;
}

.balance-page__transaction-detail {
    background-color: #ffffff;
    padding: 16px 20px;
    border-left: 1px solid #b9c7db;
    border-right: 1px solid #b9c7db;
    border-bottom: 1px solid #b9c7db;
    border-radius: 0 0 8px 8px;
    margin-top: -10px;
}

.balance-page__transaction-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.balance-page__transaction-detail-field {
    min-width: 0;
}

.balance-page__transaction-detail-field--full {
    grid-column: 1 / -1;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
}

.balance-page__transaction-detail-label {
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #8c9fb1;
    line-height: 1.2;
}

.balance-page__transaction-detail-icon {
    font-size: 12px;
    color: #b0bec5;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.balance-page__transaction-detail-value {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 0;
    color: #323232;
    word-break: break-word;
}

@media (max-width: 991px) {
    .balance-page__transaction-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .balance-page__transaction-detail-field--full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .balance-page__transaction-detail {
        padding: 12px 14px;
    }

    .balance-page__transaction-detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .balance-page__transaction-detail-label {
        font-size: 10px;
    }

    .balance-page__transaction-detail-value {
        font-size: 13px;
    }

    .balance-page__transaction-detail-value--description {
        font-size: 13px;
        margin-bottom: 0;
    }
}

.balance-page__transaction-detail-value--highlight {
    color: #ff7a00;
}

.balance-page__transaction-detail-value--description {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 0;
    color: #556270;
}

.balance-page__transaction-detail-row.balance-page__transaction-detail-row--open .balance-page__transaction-detail {
    animation: balance-transaction-detail-open 180ms ease-out;
}

.balance-page select:disabled+.select,
.balance-page .select .btn-select.disabled {
    cursor: not-allowed;
}

.balance-page select:disabled+.select .btn-select,
.balance-page .select .btn-select.disabled {
    background: #f3f3f3;
    color: #9a9a9a;
    border-color: #d8d8d8;
    opacity: 1;
    box-shadow: none;
}

.balance-page select:disabled+.select .filter-option,
.balance-page .select .btn-select.disabled .filter-option,
.balance-page select:disabled+.select .fa-angle-down,
.balance-page .select .btn-select.disabled .fa-angle-down {
    color: #9a9a9a;
}

.balance-page select:disabled+.select:hover .btn-select,
.balance-page .select .btn-select.disabled:hover {
    background: #f3f3f3;
    color: #9a9a9a;
    border-color: #d8d8d8;
}

@keyframes balance-transaction-detail-open {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop and tablet layout */
@media (min-width: 768px) {
    .balance-page__row-equal-height {
        display: flex;
        flex-wrap: wrap;
    }

    .balance-page__row-equal-height>[class*="col-"] {
        display: flex;
    }

    .balance-page__row-equal-height .panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    .balance-page__level-panel {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .balance-page__level-panel-body {
        display: flex;
        flex-direction: column;
        flex: 1;
        justify-content: center;
    }

    .balance-page__level-ribbon {
        margin-top: auto;
        flex: 0 0 auto;
    }

    .balance-page__earnings-grid {
        padding-left: 25px;
    }

    .balance-page__panel-promo-image-wrap,
    .balance-page__exchange-panel-image-wrap {
        position: absolute;
        right: 15px;
        top: 20%;
    }

    .balance-page__panel-promo-body--levels {
        position: relative;
    }

    .balance-page__levels-promo-slot {
        flex: 0 0 auto;
        width: 320px;
        max-width: 45%;
    }

    /* Override levels-promo.css breakpoint: use desktop variant from 768px */
    .balance-page__levels-promo-slot .ec-levels-promo__viewport--desktop {
        display: block;
    }

    .balance-page__levels-promo-slot .ec-levels-promo__viewport--mobile {
        display: none;
    }

    .balance-page__levels-image-wrap {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 40%;
        max-width: 280px;
        margin: 0;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crowns {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 40%;
        max-width: 280px;
        margin: 0;
    }
}

/* Large desktop layout */
@media (min-width: 992px) {
    .balance-page__panel-promo-content--levels {
        gap: 20px;
    }

    .balance-page__panel-promo-body--levels .balance-page__panel-promo-content {
        display: block;
        position: relative;
        min-height: 110px;
        padding-right: 470px;
    }

    .balance-page__levels-promo-slot {
        position: absolute;
        right: 294px;
        bottom: 19px;
        width: 360px;
        max-width: 360px;
        margin-left: 0;
    }

    .ec-levels-promo__scene--desktop {
        transform: translate(2px) scale(0.8) !important;
        top: -20px;
        left: -294px;
    }

    .balance-page__levels-image-wrap {
        width: 100%;
        max-width: 650px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crowns {
        width: 100%;
    }
}

/* Tablet levels promo: manual placement (768–991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .balance-page__panel-promo-body--levels .balance-page__panel-promo-content {
        display: block;
        position: relative;
        flex: 0 0 auto;
        min-height: 40px;
        padding-right: 355px;
    }

    .balance-page__levels-promo-slot {
        position: absolute;
        right: 164px;
        bottom: -34px;
        width: 300px;
        max-width: 300px;
        margin-left: 0;
    }

    .ec-levels-promo__scene--desktop {
        transform: translate(0px) scale(0.58) !important;
    }
}

/* Tablet and small desktop layout */
@media (max-width: 991px) {
    .balance-page .container>.row {
        margin-bottom: 12px;
    }

    .balance-page .container>.row:last-child {
        margin-bottom: 24px;
    }

    .balance-page .container>.row>[class*="col-md-"] {
        margin-bottom: 12px;
    }

    .balance-page .container>.row>[class*="col-md-"]:last-child {
        margin-bottom: 0;
    }

    .balance-page__filter-row {
        align-items: stretch;
    }

    .balance-page__earnings-grid {
        grid-template-columns: repeat(2, minmax(150px, 220px));
        column-gap: 24px;
    }

    .balance-page__filter-actions {
        justify-content: flex-start;
    }

    .balance-page__panel-promo-content,
    .balance-page__exchange-panel-content {
        align-items: center;
    }

    .balance-page__panel-promo-image-wrap,
    .balance-page__exchange-panel-image-wrap {
        flex-basis: 200px;
        max-width: 25%;
    }

    .balance-page__panel-promo-image,
    .balance-page__exchange-panel-image {
        margin: 0 auto;
    }

    .balance-page__panel-promo-body--levels .balance-page__panel-promo-content {
        gap: 16px;
        align-items: flex-start;
    }

    .balance-page__levels-image-wrap {
        flex-basis: 240px;
        width: 40%;
        max-width: 280px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap--mobile-layout {
        position: absolute;
        right: 10px;
        top: auto;
        bottom: 12px;
        height: 230px;
        display: flex;
        align-items: flex-end;
    }

    .balance-page__levels-image--desktop {
        display: none;
    }

    .balance-page__levels-image--mobile {
        display: block;
        width: auto;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transform: scale(1.05);
        transform-origin: center center;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item {
        min-width: 0;
        width: 56px;
        transform: translate(-50%, -76%);
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-image {
        width: 56px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-name,
    .balance-page__panel-promo-body--levels .balance-page__levels-crown-bonus {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        margin-top: 0;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-name {
        top: 35px;
        font-size: 13px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-bonus {
        top: 50px;
        font-size: 12px;
    }

    .balance-page__levels-crown-item--bronze {
        left: 64%;
        top: 75%;
        right: auto;
        bottom: auto;
    }

    .balance-page__levels-crown-item--silver {
        left: 26%;
        top: 47.5%;
        right: auto;
        bottom: auto;
    }

    .balance-page__levels-crown-item--gold {
        left: 34%;
        top: 12%;
        right: auto;
        bottom: auto;
    }

    .balance-page__levels-crown-item--platinum {
        left: 111%;
        top: -10%;
        right: auto;
        bottom: auto;
    }

    .balance-page__levels-crown-item--emerald {
        left: 188%;
        top: 12%;
        right: auto;
        bottom: auto;
    }

    .balance-page__levels-crown-item--ruby {
        left: 196%;
        top: 47.5%;
        right: auto;
        bottom: auto;
    }

    .balance-page__levels-crown-item--diamond {
        left: 156%;
        top: 75%;
        right: auto;
        bottom: auto;
    }

    .balance-page__level-panel-body {
        padding-bottom: 32px;
    }

}

/* Mid-size tablet adjustments */
@media (min-width: 829px) and (max-width: 991px) {
    .balance-page__panel-promo-body--levels {
        min-height: 0px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap--mobile-layout {
        top: 65px;
        bottom: auto;
        height: 230px;
    }
}

/* Narrow tablet adjustments */
@media (min-width: 768px) and (max-width: 828px) {
    .balance-page__panel-promo-body--levels {
        min-height: 0px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap--mobile-layout {
        top: 65px;
        bottom: auto;
        height: 230px;
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .balance-page__transaction-overview-toggle {
        display: inline-flex;
    }

    .balance-page__transaction-panel-body.is-collapsible-ready.is-collapsed {
        cursor: pointer;
    }

    .balance-page__transaction-overview-content {
        overflow: hidden;
        max-height: 9999px;
        opacity: 1;
        transition: max-height 0.24s ease, opacity 0.18s ease;
    }

    .balance-page__transaction-panel-body.is-collapsible-ready.is-collapsed .balance-page__transaction-overview-content {
        max-height: 0;
        opacity: 0;
        pointer-events: none;
    }

    .balance-page__transaction-panel-body.is-collapsible-ready.is-collapsed .balance-page__transaction-overview-header {
        margin-bottom: 0;
    }

    .balance-page__transaction-panel-body.is-collapsible-ready.is-collapsed .balance-page__transaction-overview-toggle .fa {
        transform: rotate(-90deg);
    }

    .balance-page .container>.row>[class*="col-"] {
        margin-bottom: 12px;
    }

    .balance-page .container>.row>[class*="col-"]:last-child {
        margin-bottom: 0;
    }

    .balance-page__filter-row .balance-page__filter-column {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .balance-page__panel-promo-body--levels .balance-page__panel-promo-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .balance-page__levels-promo-slot {
        flex-basis: auto;
        width: 100%;
        max-width: 320px;
        margin: 4px auto 0;
        text-align: center;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
        margin: 4px auto 0;
        text-align: center;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap--mobile-layout {
        position: relative;
        right: auto;
        bottom: auto;
        height: auto;
        display: inline-block;
        width: auto;
        margin-top: 32px;
        margin-bottom: 8px;
        text-align: center;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image--mobile {
        width: auto;
        height: auto;
        transform: none;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crowns {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: none;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item {
        transform: translate(-50%, -50%);
        position: absolute !important;
        right: auto !important;
        bottom: auto !important;
        width: clamp(51.744px, 7.4vw, 66px);
        min-width: 0;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-image {
        width: 100%;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-name {
        top: calc(100% + 2px);
        font-size: clamp(13.152px, 2.5vw, 15px);
        line-height: 1.05;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-bonus {
        top: calc(100% + 16px);
        font-size: clamp(12.192px, 2.3vw, 14px);
        line-height: 1.05;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--bronze {
        left: 30.2% !important;
        top: 73.1% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--silver {
        left: 13.7% !important;
        top: 45.9% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--gold {
        left: 16.9% !important;
        top: 12.8% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--platinum {
        left: 50% !important;
        top: -7.8% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--emerald {
        left: 83% !important;
        top: 12.7% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--ruby {
        left: 86.3% !important;
        top: 45.9% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item--diamond {
        left: 69.8% !important;
        top: 73.1% !important;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image--mobile {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Small mobile layout */
@media (max-width: 575px) {

    .balance-page__panel-promo-text,
    .balance-page__exchange-panel-text {
        font-size: 15px;
        padding-right: 0;
    }

    .balance-page__panel-promo-button,
    .balance-page__exchange-panel-button {
        width: auto;
        min-width: 220px;
    }

    .balance-page__panel-promo-action,
    .balance-page__exchange-panel-action {
        width: 100%;
        text-align: center;
    }

    .balance-page__panel-promo-content,
    .balance-page__exchange-panel-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .balance-page__levels-promo-slot {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .balance-page__panel-promo-image-wrap,
    .balance-page__exchange-panel-image-wrap {
        flex-basis: auto;
        max-width: 65%;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .balance-page__panel-promo-body--levels .balance-page__panel-promo-content {
        align-items: flex-start;
    }

    .balance-page__levels-image-wrap {
        flex-basis: auto;
        max-width: 100%;
        width: 100%;
        margin: 4px auto 0;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap--mobile-layout {
        position: relative;
        right: auto;
        bottom: auto;
        height: auto;
        display: inline-block;
        width: auto;
        margin-top: 32px;
        margin-bottom: 8px;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crowns {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: none;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-item {
        width: clamp(47.04px, 9vw, 60px);
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-name {
        top: calc(100% + 1px);
        font-size: clamp(12.192px, 3vw, 14px);
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-crown-bonus {
        top: calc(100% + 14px);
        font-size: clamp(11.328px, 2.7vw, 13px);
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image-wrap--mobile-layout {
        text-align: center;
    }

    .balance-page__panel-promo-body--levels .balance-page__levels-image--mobile {
        width: auto;
        height: auto;
        margin-left: auto;
        margin-right: auto;
    }

    .balance-page__filter-range {
        flex-wrap: wrap;
    }

    .balance-page__filter-range-separator {
        display: none;
    }

    .balance-page__filter-range-item {
        flex: 1 1 100%;
    }

    .balance-page__level-ribbon-text {
        flex-wrap: wrap;
        white-space: normal;
        gap: 0 3px;
        padding: 0 6px;
        font-size: 12px;
        line-height: 1;
    }

    .balance-page__earnings-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        justify-items: stretch;
    }

    .balance-page__earnings-item {
        justify-content: flex-start;
    }

    .balance-page__earnings-item>div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }

    .balance-page__earnings-label {
        order: 1;
        margin-top: 0;
    }

    .balance-page__earnings-value {
        order: 2;
        text-align: right;
        white-space: nowrap;
    }
}

/* Transaction skeleton loader */
@keyframes balance-skeleton-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.balance-page__transactions-skeleton {
    margin-top: 8px;
}

.balance-page__transactions-skeleton-table {
    width: 100%;
    border-spacing: 0;
}

.balance-page__transactions-skeleton-header,
.balance-page__transactions-skeleton-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.balance-page__transactions-skeleton-header {
    padding: 12px 16px;
    border-bottom: 2px solid #e1e5eb;
    gap: 0;
}

.balance-page__transactions-skeleton-row {
    background: #fff;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 10px;
    gap: 0;
}

.balance-page__transactions-skeleton-cell {
    flex-shrink: 0;
    padding: 0 8px;
}

.balance-page__transactions-skeleton-cell--date {
    width: 12%;
}

.balance-page__transactions-skeleton-cell--provider {
    width: 22%;
}

.balance-page__transactions-skeleton-cell--desc {
    width: 32%;
}

.balance-page__transactions-skeleton-cell--amount {
    width: 14%;
}

.balance-page__transactions-skeleton-cell--status {
    width: 15%;
}

.balance-page__transactions-skeleton-cell--caret {
    width: 5%;
}

.balance-page__transactions-skeleton-bar {
    height: 14px;
    border-radius: 4px;
    width: 75%;
    background: linear-gradient(to right, #e8edf3 8%, #d0d8e4 38%, #e8edf3 54%);
    background-size: 1200px 100%;
    animation: balance-skeleton-shimmer 1.4s linear infinite;
}

.balance-page__transactions-skeleton-bar--short {
    width: 50%;
}

.balance-page__transactions-skeleton-bar--long {
    width: 90%;
}

.balance-page__transactions-skeleton-bar--icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.balance-page__transactions-skeleton-header .balance-page__transactions-skeleton-bar {
    height: 10px;
    width: 60%;
    background: linear-gradient(to right, #e8edf3 8%, #d0d8e4 38%, #e8edf3 54%);
    background-size: 1200px 100%;
    animation: balance-skeleton-shimmer 1.4s linear infinite;
}

@media (max-width: 991px) {

    .balance-page__transactions-skeleton-cell--date,
    .balance-page__transactions-skeleton-cell--desc {
        display: none;
    }

    .balance-page__transactions-skeleton-cell--provider {
        width: 45%;
    }

    .balance-page__transactions-skeleton-cell--amount {
        width: 20%;
    }

    .balance-page__transactions-skeleton-cell--status {
        width: 25%;
    }

    .balance-page__transactions-skeleton-cell--caret {
        width: 10%;
    }
}

@media (max-width: 767px) {
    .balance-page__transactions-skeleton-cell--provider {
        width: 42%;
    }

    .balance-page__transactions-skeleton-cell--amount {
        width: 25%;
    }

    .balance-page__transactions-skeleton-cell--status {
        width: 25%;
    }

    .balance-page__transactions-skeleton-cell--caret {
        width: 8%;
    }
}