html,
body {
    touch-action: manipulation;
}

.preloader {
    display: none;
}

img[src=""],
img:not([src]) {
    visibility: hidden;
}

/* Keep the task board stable while product data and translated names change. */
.task-order-panel {
    padding: 8px;
    overflow: hidden;
}

.task-order-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 178px 286px 178px;
    gap: 12px;
    width: 100%;
    margin: 0;
}

.task-order-slot {
    display: flex;
    min-width: 0;
    min-height: 0;
    align-items: stretch;
    justify-content: center;
}

.task-order-center-slot {
    min-height: 0;
}

.task-product-slot,
.task-start-slot {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
}

.task-product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #f6f6f6;
}

.task-product-image-frame {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #d3d3d3;
    border-radius: 12px;
    background: #fff;
}

.task-product-image {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
}

.task-product-name {
    display: -webkit-box;
    flex: 0 0 28px;
    min-width: 0;
    max-height: 28px;
    margin-top: 6px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 400;
    line-height: 14px;
    text-align: center;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.task-start-image {
    display: block;
    width: min(100%, 210px);
    height: auto;
    max-height: 210px;
    object-fit: contain;
}

@media (max-width: 480px) {
    .task-order-grid {
        grid-template-rows: 152px 238px 152px;
        gap: 8px;
    }

    .task-order-panel {
        padding: 6px;
    }

    .task-product-card {
        padding: 6px;
    }

    .task-product-name {
        flex-basis: 26px;
        max-height: 26px;
        margin-top: 4px;
        font-size: 9px;
        line-height: 13px;
    }

    .task-start-image {
        width: min(100%, 170px);
        max-height: 170px;
    }
}

.body-cn .main-nav-box strong,
.body-cn .main-nav-box-border strong,
.body-cn .main-nav-box span,
.body-cn .main-nav-box-border span {
    letter-spacing: 0;
}

.main .col-4 > div[style*="padding: 14px 0px"] {
    min-height: 74px;
}

.main .col-4 > div[style*="padding: 14px 0px"] strong {
    display: block;
    min-height: 18px;
    line-height: 18px;
    white-space: nowrap;
}

.activity-card {
    padding: 14px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid #ebebeb;
    border-radius: 8px;
}

.activity-card img {
    display: block;
    max-height: 210px;
    object-fit: cover;
    border-radius: 6px;
}

#view-tasks-modal .modal-content {
    background: linear-gradient(180deg, #ffcc2c 0%, #fff 60%) !important;
}

select[name="withdrawalMethod"].form-control {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .85);
}

select[name="withdrawalMethod"].form-control:focus {
    color: #fff !important;
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

select[name="withdrawalMethod"].form-control option {
    color: #1f2933;
    background: #fff;
}

select[name="withdrawalMethod"].form-control option:checked {
    color: #111827;
    background: #e5e7eb;
}

.runtime-withdraw-pending-disabled,
.runtime-withdraw-pending-disabled:disabled {
    opacity: .58;
    cursor: not-allowed;
    box-shadow: none;
}

.runtime-transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 66px;
    gap: 12px;
}

.runtime-transaction-main {
    flex: 1 1 auto;
    min-width: 0;
}

.runtime-transaction-title {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.runtime-transaction-line-through {
    text-decoration: line-through;
    opacity: .82;
}

.runtime-transaction-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 7px;
}

.runtime-transaction-date {
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    line-height: 1.2;
}

.runtime-transaction-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.runtime-transaction-approved .runtime-transaction-status {
    background: #ecfdf3;
    color: #027a48;
}

.runtime-transaction-rejected .runtime-transaction-status {
    background: #f2f4f7;
    color: #475467;
}

.runtime-transaction-amount {
    flex: 0 0 auto;
    max-width: 46%;
    min-width: 112px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 20px rgba(45, 12, 19, .12);
    color: #1f2937;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.runtime-amount-positive {
    color: #027a48;
}

.runtime-amount-negative {
    background: #fff7f7;
    color: #b42318;
}

.runtime-transaction-pending .runtime-amount-negative {
    background: #fff7ed;
    color: #9a3412;
}

.runtime-amount-void {
    background: #f2f4f7;
    color: #667085;
    text-decoration: line-through;
}

@media (max-width: 360px) {
    .runtime-transaction-item {
        gap: 8px;
    }

    .runtime-transaction-title {
        font-size: 13px;
    }

    .runtime-transaction-amount {
        min-width: 96px;
        max-width: 48%;
        padding: 7px 8px;
        font-size: 13px;
    }
}

#dateRangePicker {
    height: 46px;
    border: 1px solid #dce3ea;
    border-radius: 24px;
    box-shadow: none;
    color: #1f2933;
    font-size: 15px;
    padding: 0 18px;
}

#dateRangePicker:focus {
    border-color: #d0003b;
    box-shadow: 0 0 0 4px rgba(208, 0, 59, .12);
}

.daterangepicker {
    display: none;
    position: fixed !important;
    z-index: 2600;
    width: min(680px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    margin-top: 0;
    padding: 14px;
    color: #252b33;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 10px;
    box-shadow: 0 20px 55px rgba(20, 32, 48, .2);
    font-family: Roboto, Arial, sans-serif;
    font-size: 13px;
}

.daterangepicker::before,
.daterangepicker::after {
    display: none;
}

.daterangepicker .ranges {
    float: none;
    margin: 0 0 12px;
}

.daterangepicker .ranges ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.daterangepicker .ranges li {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    color: #3c4652;
    background: #f5f7fa;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
}

.daterangepicker .ranges li:hover,
.daterangepicker .ranges li.active {
    color: #fff;
    background: #d0003b;
}

.daterangepicker .drp-calendar {
    display: inline-block;
    width: calc(50% - 6px);
    max-width: none;
    vertical-align: top;
}

.daterangepicker:not(.show-calendar) .drp-calendar {
    display: none;
}

.daterangepicker:not(.show-calendar) .drp-buttons {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.daterangepicker .drp-calendar.left {
    margin-right: 12px;
}

.daterangepicker .calendar-table {
    padding: 0;
    background: transparent;
    border: 0;
}

.daterangepicker .calendar-table table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.daterangepicker th,
.daterangepicker td {
    width: 32px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    color: #2c343d;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
    white-space: nowrap;
}

.daterangepicker th.month {
    height: 36px;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.daterangepicker th.prev,
.daterangepicker th.next {
    cursor: pointer;
}

.daterangepicker th.prev span,
.daterangepicker th.next span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-color: #d0003b;
    border-style: solid;
    border-width: 0 2px 2px 0;
    border-radius: 0;
}

.daterangepicker th.prev span {
    transform: rotate(135deg);
}

.daterangepicker th.next span {
    transform: rotate(-45deg);
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    color: #d0003b;
    background: #fde9ef;
}

.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
    color: #a8b0ba;
    background: transparent;
}

.daterangepicker td.in-range {
    color: #d0003b;
    background: #fde9ef;
}

.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker td.start-date,
.daterangepicker td.end-date {
    color: #fff;
    background: #d0003b;
}

.daterangepicker .drp-buttons {
    clear: both;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf0f4;
}

.daterangepicker .drp-selected {
    margin-right: auto;
    color: #6b7280;
    font-size: 12px;
}

.daterangepicker .drp-buttons .btn {
    min-width: 72px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
}

.daterangepicker .cancelBtn {
    color: #d0003b;
    background: #fde9ef;
}

.daterangepicker .applyBtn {
    color: #fff;
    background: #d0003b;
}

@media (max-width: 640px) {
    .daterangepicker {
        padding: 12px;
    }

    .daterangepicker .ranges ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daterangepicker .drp-calendar {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .daterangepicker .drp-calendar.right {
        margin-top: 12px;
    }
}

/* The activity entry is intentionally hidden from the account menu. */
.main.bg-image-main .main-nav-box-border:has(> a[href*="read=notice"]) {
    display: none !important;
}

.main.bg-image-main a[href*="read=notice"] {
    display: none !important;
}

.runtime-home-banner {
    width: 100%;
    min-height: 1px;
}

.runtime-home-banner video,
.runtime-home-banner-image {
    width: 100%;
    border-radius: 18px;
    display: block;
    object-fit: cover;
}

/* Keep task media from changing the height of cards and the result dialog. */
#success-modal .task-success-dialog {
    width: calc(100% - 24px);
    max-width: 520px;
    margin: 6vh auto 0;
}

#success-modal .task-success-modal-content {
    display: flex;
    max-height: calc(100vh - 12vh);
    overflow: hidden;
}

#success-modal .task-success-modal-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#success-modal .task-success-image-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 190px;
    padding: 10px;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
}

#success-modal .task-success-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 170px;
    object-fit: contain;
}

#success-modal .task-success-product-name {
    display: -webkit-box;
    min-height: 2.7em;
    overflow: hidden;
    line-height: 1.35;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#success-modal .task-lucky-order-item {
    padding: 12px 10px 14px;
    border: 2px solid #f0b429 !important;
    border-radius: 12px;
    background: #fffaf0;
    box-shadow: 0 8px 22px rgba(180, 117, 0, .12);
}

#success-modal .task-lucky-order-item .task-success-image-frame {
    border: 1px solid #f3d58b;
    background: #fff;
}

#success-modal .task-success-combo-label {
    display: inline-block;
    margin: 5px auto 0;
    padding: 4px 14px;
    color: #9b6500;
    background: #fff0c7;
    border: 1px solid #f0b429;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

#success-modal .task-success-modal-footer {
    flex-shrink: 0;
    background: #fff;
}

.task-status-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.task-status-actions .task-record-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 7px;
    color: #fff;
    background: #d0003b;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
}

.task-status-actions .task-record-link:active,
.task-status-actions .task-record-link:focus,
.task-status-actions .task-record-link:hover {
    color: #fff;
    background: #ad0032;
    text-decoration: none;
}

.records_tabs_box_des {
    min-height: 98px;
}

.records_tabs_box_des.task-record-product-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.records_tabs_box_des > .col-3.task-record-product-media {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 96px;
    width: 96px;
    max-width: 96px;
    height: 86px;
    min-width: 0;
    overflow: hidden;
}

.records_tabs_box_des .task-record-product-image {
    display: block;
    width: 100%;
    height: 82px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.records_tabs_box_des > .col-9.task-record-product-info {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
}

.records_tabs_box_des .task-record-product-name {
    display: block;
    min-height: 1.35em;
    width: 100%;
    max-height: 1.35em;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
    cursor: pointer;
}

.records_tabs_box_des .task-record-product-name:hover,
.records_tabs_box_des .task-record-product-name:focus-visible {
    color: #bf0033;
    text-decoration: underline;
}

.runtime-product-name-open {
    overflow: hidden !important;
}

.runtime-product-name-dialog {
    position: fixed;
    z-index: 2400;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.runtime-product-name-dialog.is-open {
    display: flex;
}

.runtime-product-name-dialog-mask {
    position: absolute;
    inset: 0;
    background: rgba(20, 26, 38, .44);
}

.runtime-product-name-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(520px, calc(100vw - 36px));
    max-height: min(72vh, 520px);
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(20, 30, 50, .26);
}

.runtime-product-name-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #eceff3;
}

.runtime-product-name-dialog-head h2 {
    margin: 0;
    color: #202938;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.runtime-product-name-dialog-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #6d7786;
    background: #f3f5f7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.runtime-product-name-dialog-body {
    max-height: calc(min(72vh, 520px) - 62px);
    overflow-y: auto;
    padding: 20px 18px 24px;
    color: #202938;
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    #success-modal .task-success-dialog {
        margin-top: 4vh;
    }

    #success-modal .task-success-modal-content {
        max-height: calc(100vh - 8vh);
    }

    #success-modal .task-success-image-frame {
        height: 155px;
    }

    #success-modal .task-success-image {
        max-height: 135px;
    }

    .records_tabs_box_des {
        min-height: 92px;
    }

    .records_tabs_box_des > .col-3.task-record-product-media {
        flex-basis: 88px;
        width: 88px;
        max-width: 88px;
        height: 80px;
    }

    .records_tabs_box_des .task-record-product-image {
        height: 76px;
    }

    .runtime-product-name-dialog {
        padding: 12px;
    }

    .runtime-product-name-dialog-panel {
        width: calc(100vw - 24px);
        max-height: 70vh;
    }

    .runtime-product-name-dialog-body {
        max-height: calc(70vh - 62px);
    }
}
