/* Fixes issue with react-select dropdown. */
.path-admin-blocks-motrain #region-main,
.path-admin-blocks-motrain #region-main > .card {
    overflow-x: visible;
}

/** React selector. */
.block_motrain-selector {
    display: flex;
}
.block_motrain-react-select-container {
    max-width: 308px;
    width: 100%;
    margin-right: 5px;
}
.block_motrain-react-select__control {
    border-radius: 0 !important; /* stylelint-disable-line */
}
.block_motrain-react-select__menu {
    border-radius: 0 !important; /* stylelint-disable-line */
    margin-top: 0 !important; /* stylelint-disable-line */
}

/** Rules */
.block_motrain-rule-item {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.block_motrain-rule-item label {
    display: flex;
    align-items: center;
    font-weight: normal;
}
.block_motrain-rule-item-label {
    flex: 1;
    width: 16rem;
}
.block_motrain-rule-item-field {
    width: 8rem;
}
.block_motrain-section {
    margin-bottom: 1rem;
}
.block_motrain-section.expanded {
    border-bottom: 1px solid #efefef;
    padding-bottom: 4px;
}
.block_motrain-section-title {
    font-weight: bold;
    font-size: large;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.block_motrain-section-title a:hover {
    cursor: pointer;
}
.block_motrain-section-title .icon {
    margin-right: 4px;
}
.block_motrain-section-content {
    border-left: 3px solid #efefef;
    padding-left: 16px;
    margin-top: 4px;
}
.block_motrain-section-actions {
    display: flex;
    gap: 0.5rem;
}

/** Block wrapper */
.block_motrain-wrapper {
    --motrain-accent-color: #07c8f3;
    --motrain-bg-color: #e7fafe;
}

/** Block content */
.block_motrain-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}
.block_motrain-content > div {
    flex: 1 1 296px;
}

/** Block highlight container */
.block_motrain-container {
    background: var(--motrain-bg-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block_motrain-brava-given {
    flex-grow: 1;
}
.block_motrain-brava-given-amount {
    line-height: 1;
    font-weight: bold;
    font-size: 32px;
    text-align: center;
}
.block_motrain-brava-given-label {
    font-size: 12px;
    line-height: 1;
    text-align: center;
    color: #474747;
    margin-top: 2px;
}

/** Wallet on block */
.block_motrain-wallet .block_motrain-wallet-balances {
    flex-grow: 1;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 8px;
}

/** Wallet balance, re-usable */
.block_motrain-wallet-balance {
    gap: 4px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}
.block_motrain-wallet-balance .wallet-coins {
    font-size: 32px;
    line-height: 1;
}
.block_motrain-wallet-balance .wallet-pic {
    height: 22px;
}

.block_motrain-container .wallet-actions {
    display: flex;
    gap: 8px;
}

.block_motrain-container .wallet-action {
    flex: 1 1 auto;
}

.block_motrain-container .wallet-action a {
    position: relative;
    background: var(--motrain-accent-color);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
    padding: 4px;
    min-height: 40px;
    line-height: 1;
}
.block_motrain-container .wallet-action a:hover {
    text-decoration: none;
    color: #fff;
    opacity: 0.9;
}
.block_motrain-container .wallet-action .action-pic {
    height: 16px;
}

.block_motrain-container .wallet-action.icon-only {
    flex: 0 0 42px;
    width: 42px;
}
.block_motrain-container .wallet-action.icon-only a {
    background: #000;
    color: #fff;
}
.block_motrain-container .wallet-action.icon-only .action-pic {
    height: 24px;
}

.block_motrain-container .wallet-action-badge {
    height: 16px;
    width: 16px;
    background: red;
    color: white;
    border-radius: 100%;
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    position: absolute;
    right: -2px;
    top: -2px;
    text-align: center;
    overflow: hidden;
}

/** Level on block */
.block_motrain-level {
    background: var(--motrain-bg-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}
.block_motrain-level .level-pic {
    height: 54px;
    flex: 0 0 auto;
}
.block_motrain-level .level-pic img {
    height: 100%;
    width: auto;
}
.block_motrain-level .level-progress {
    flex: 1 0 auto;
}
.block_motrain-level .level-progress .progress-label {
    color: #474747;
    font-size: 14px;
    margin-bottom: 6px;
}

/** Progress on block */
.block_motrain-progress [aria-role='progressbar'] {
    position: relative;
    width: 100%;
    height: 8px;
}
.block_motrain-progress [aria-role='progressbar'] > div {
    background: var(--motrain-accent-color);
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.block_motrain-progress [aria-role='progressbar'] > div:first-child {
    opacity: 0.2;
}
.block_motrain-progress [aria-role='progressbar'] > div + div {
    min-width: 8px;
    right: auto;
}
.block_motrain-progress [aria-role='progressbar'][aria-valuenow='0'] > div + div {
    min-width: 0;
    width: 0px;
}
.block_motrain-progress .progress-text {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
    font-size: 10px;
    line-height: 1;
    gap: 8px;

    color: #474747;
    margin-top: 4px;
}
.block_motrain-progress .progress-text .text-label {
    flex: 1 0 auto;
    overflow: hidden;
}
.block_motrain-progress .progress-text .text-pic {
    height: 12px;
    flex: 0 0 auto;
}
.block_motrain-progress .progress-text .text-pic img,
.block_motrain-progress .progress-text .text-pic svg {
    height: 100%;
    width: auto;
}

/** Nav on block */
.block_motrain-nav {
    margin-top: 16px;
}
.block_motrain-nav .nav-container {
    gap: 16px;
    display: flex;
    flex-wrap: wrap;
}
.block_motrain-nav .nav-container + .nav-container {
    margin-top: 16px;
}
.block_motrain-nav .nav-item {
    flex: 1 1 40%;
    min-width: 0;
    border: 1px solid #474747;
    border-radius: 16px;
    height: 32px;
    display: flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1;
    color: #474747;
    text-decoration: none;
    background: transparent;
    gap: 4px;
}
.block_motrain-nav .nav-item:hover {
    color: var(--motrain-accent-color);
    border-color: var(--motrain-accent-color);
    text-decoration: none;
}
.block_motrain-nav .nav-item.nav-light {
    height: auto;
    padding: 4px 8px;
    border-width: 0;
}
.block_motrain-nav .nav-item.nav-tight {
    flex: 0 1 auto;
    margin: 0 auto;
}

.block_motrain-nav .nav-item .nav-icon {
    flex: 0 0 auto;
    height: 16px;
}
.block_motrain-nav .nav-item .nav-icon svg {
    height: 16px;
    width: auto;
}
.block_motrain-nav .nav-item .nav-label {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.block_motrain-heading {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}
.block_motrain-heading a {
    padding: 0.5rem;
    border-radius: 100%;
    margin-right: 0.5rem;
    display: inline-block;
    background: #f8f9fa;
    color: inherit;
    line-height: 1;
}
