.ims-ao,
.ims-ao *,
.ims-ao *::before,
.ims-ao *::after {
    box-sizing: border-box;
}

.ims-ao {
    --ims-ao-text: #252a31;
    --ims-ao-muted: #72767c;
    --ims-ao-line: #e8e8e8;
    width: 100%;
    min-width: 0;
    color: var(--ims-ao-text);
}

.ims-ao svg {
    display: block;
    fill: currentColor;
}

.ims-ao-editor-notice {
    padding: 16px;
    color: #3c434a;
    text-align: center;
    background: #f6f7f7;
    border: 1px dashed #c3c4c7;
}

/* History */
.ims-ao-history {
    --ims-ao-search-icon-box: 34px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: #f7f7f8;
}

.ims-ao-history__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.ims-ao-history__heading {
    min-width: 0;
    margin: 0;
    color: #343434;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.15;
}

.ims-ao-history__filters {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 0;
}

.ims-ao-history__search {
    position: relative;
    display: flex;
    width: 188px;
    height: 30px;
    align-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dedede;
}

.ims-ao-history__search-input {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 var(--ims-ao-search-icon-box) 0 10px;
    color: #75787d;
    font-size: 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.ims-ao-history__search-input::-webkit-search-cancel-button {
    display: none;
}

.ims-ao-history__search-input::placeholder {
    color: #94979b;
    opacity: 1;
}

.ims-ao-history__search-trigger {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    width: var(--ims-ao-search-icon-box);
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #8c8f93;
    font-size: 13px;
    cursor: pointer;
}

.ims-ao-history__sort-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ims-ao-history__filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777b80;
    font-size: 13px;
}

.ims-ao-history__sort-label {
    color: #70747a;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.ims-ao-history__select-wrap,
.ims-ao-history__limit-select-wrap {
    position: relative;
    display: block;
    width: 118px;
    height: 30px;
    overflow: hidden;
    color: #9a9da1;
    background: #fff;
    border: 1px solid #dedede;
}

.ims-ao-history__select-wrap::after,
.ims-ao-history__limit-select-wrap::after {
    position: absolute;
    top: 50%;
    right: 11px;
    width: 7px;
    height: 7px;
    content: "";
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.ims-ao-history__select-wrap--status {
    width: 118px;
}

.ims-ao-history__select,
.ims-ao-history__limit-select {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 32px 0 10px;
    color: #75787d;
    font-size: 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.ims-ao-history__table {
    --ims-ao-col-id: 1.1fr;
    --ims-ao-col-date: 1.1fr;
    --ims-ao-col-quantity: .8fr;
    --ims-ao-col-total: 1fr;
    --ims-ao-col-status: 1fr;
    --ims-ao-col-action: 54px;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

.ims-ao-history__thead,
.ims-ao-history__row {
    display: grid;
    grid-template-columns:
        minmax(0, var(--ims-ao-col-id))
        minmax(0, var(--ims-ao-col-date))
        minmax(0, var(--ims-ao-col-quantity))
        minmax(0, var(--ims-ao-col-total))
        minmax(0, var(--ims-ao-col-status))
        var(--ims-ao-col-action);
    align-items: center;
}

.ims-ao-history__thead {
    min-height: 37px;
    color: #fff;
    background: #20252b;
}

.ims-ao-history__row {
    min-height: 50px;
    color: #30343a;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    border-bottom-style: solid;
    transition:
        color 180ms ease,
        background-color 180ms ease;
}

.ims-ao-history__row:nth-child(odd) {
    background: #fff;
}

.ims-ao-history__row:nth-child(even) {
    background: #fafafa;
}

.ims-ao-history__row:hover {
    color: #30343a;
    background: #f3f4f5;
}

.ims-ao-history__head-cell,
.ims-ao-history__cell {
    display: flex;
    min-width: 0;
    align-items: center;
    padding: 13px 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ims-ao-history__head-cell {
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 500;
}

.ims-ao-history__cell {
    font-size: 13px;
    line-height: 1.35;
}

.ims-ao-history__head-cell--id,
.ims-ao-history__cell--id,
.ims-ao-history__head-cell--date,
.ims-ao-history__cell--date,
.ims-ao-history__head-cell--total,
.ims-ao-history__cell--total {
    justify-content: flex-start;
    text-align: left;
}

.ims-ao-history__head-cell--quantity,
.ims-ao-history__cell--quantity,
.ims-ao-history__head-cell--status,
.ims-ao-history__cell--status,
.ims-ao-history__cell--action,
.ims-ao-history__head-cell--action {
    justify-content: center;
    text-align: center;
}

.ims-ao-history__cell--id {
    color: #30343a;
}

.ims-ao-history__total {
    color: #20252b;
    font-weight: 600;
}

.ims-ao-history__detail-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    color: #20252b;
    font-size: 11px;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.ims-ao-history__row:hover .ims-ao-history__detail-icon {
    transform: translateX(2px);
}

.ims-ao-status {
    display: inline-flex;
    min-width: 88px;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 7px 12px;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ims-ao-status--success {
    color: #00a968;
    background: #e5f7ef;
}

.ims-ao-status--info {
    color: #078be5;
    background: #e8f5ff;
}

.ims-ao-status--warning {
    color: #ff8708;
    background: #fff2e3;
}

.ims-ao-status--danger {
    color: #df2f3b;
    background: #fdebed;
}

.ims-ao-status--pending {
    color: #9b7421;
    background: #fff6dc;
}

.ims-ao-status--muted {
    color: #73777d;
    background: #eee;
}

.ims-ao-history__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-top: 14px;
}

.ims-ao-history__result-count {
    color: #6f7378;
    font-size: 12px;
    line-height: 1.35;
}

.ims-ao-history__pagination,
.ims-ao-history__pagination-placeholder {
    display: flex;
    min-width: 1px;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ims-ao-history__page-link {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: #252a31;
    font-size: 12px;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e4e4e4;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

.ims-ao-history__page-link:hover:not(.is-disabled):not(.is-current):not(.ims-ao-history__page-link--dots) {
    color: #fff;
    background: #343a40;
}

.ims-ao-history__page-link.is-disabled {
    cursor: not-allowed;
    opacity: .42;
}

.ims-ao-history__page-link--dots {
    cursor: default;
}

.ims-ao-history__page-link.is-current {
    color: #fff;
    background: #20252b;
    border-color: #20252b;
}

.ims-ao-history__page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-size: 10px;
    line-height: 1;
}

.ims-ao-history__page-icon i,
.ims-ao-history__page-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    color: currentColor;
    fill: currentColor;
}

.ims-ao-history__limit {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    color: #72767c;
}

.ims-ao-history__limit-label {
    color: #72767c;
    font-size: 12px;
}

.ims-ao-history__limit-select-wrap {
    width: 96px;
    height: 32px;
}

.ims-ao-history__limit-select {
    color: #252a31;
    font-size: 12px;
}

.ims-ao-history__empty {
    padding: 40px 24px;
    color: #777b80;
    text-align: center;
    background: #fff;
    border: 1px solid #e8e8e8;
}

@media (max-width: 1024px) {
    .ims-ao-history__top {
        align-items: flex-start;
        flex-direction: column;
    }

    .ims-ao-history__filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .ims-ao-history__footer {
        grid-template-columns: 1fr;
    }

    .ims-ao-history__result-count,
    .ims-ao-history__limit {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 767px) {
    .ims-ao-history__heading {
        font-size: 26px;
    }

    .ims-ao-history__filters {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ims-ao-history__search,
    .ims-ao-history__select-wrap,
    .ims-ao-history__select-wrap--status {
        width: 100%;
    }

    .ims-ao-history__sort-group {
        display: grid;
        grid-template-columns: auto auto minmax(0, 1fr);
        align-items: center;
    }

    .ims-ao-history__thead {
        display: none;
    }

    .ims-ao-history__tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .ims-ao-history__row {
        position: relative;
        display: grid;
        min-height: 0;
        grid-template-columns: 1fr auto;
        gap: 8px 14px;
        padding: 16px;
        background: #fff;
        border: 1px solid #e8e8e8;
    }

    .ims-ao-history__row:nth-child(even),
    .ims-ao-history__row:nth-child(odd) {
        background: #fff;
    }

    .ims-ao-history__cell {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        overflow: visible;
        text-align: right;
        white-space: normal;
    }

    .ims-ao-history__cell::before {
        flex: 0 0 auto;
        content: attr(data-label);
        color: #777b80;
        font-size: 12px;
        font-weight: 400;
        text-align: left;
    }

    .ims-ao-history__cell--id {
        grid-column: 1 / -1;
        padding-right: 42px;
        font-weight: 600;
    }

    .ims-ao-history__cell--id::before,
    .ims-ao-history__cell--action::before {
        display: none;
    }

    .ims-ao-history__cell--status {
        justify-content: space-between;
    }

    .ims-ao-history__cell--action {
        position: absolute;
        top: 7px;
        right: 8px;
        padding: 0;
    }

    .ims-ao-history__total {
        font-weight: 600;
    }

    .ims-ao-history__pagination {
        flex-wrap: wrap;
    }

    .ims-ao-history__limit {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ims-ao-history__row,
    .ims-ao-history__detail-icon,
    .ims-ao-history__page-link {
        transition: none;
    }
}

/* Details */
.ims-ao-details__back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #353a40; text-decoration: none; }
.ims-ao-details__back-icon { display: inline-flex; align-items: center; justify-content: center; }
.ims-ao-details__heading { margin: 0 0 34px; color: #363636; font-size: 38px; font-weight: 600; line-height: 1.15; }
.ims-ao-timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 34px; }
.ims-ao-timeline__track { position: absolute; top: 22px; right: 6%; left: 6%; height: 8px; overflow: hidden; background: #e6e6e6; border-radius: 99px; }
.ims-ao-timeline__progress-fill { display: block; width: var(--ims-ao-progress); height: 100%; background: #20252b; border-radius: inherit; }
.ims-ao-timeline__step { position: relative; z-index: 2; display: flex; align-items: center; flex-direction: column; text-align: center; }
.ims-ao-timeline__marker { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-bottom: 10px; color: #20252b; background: #fff; border: 1px solid #20252b; border-radius: 50%; }
.ims-ao-timeline__step.is-complete .ims-ao-timeline__marker { color: #fff; background: #20252b; border-color: #20252b; }
.ims-ao-timeline__step.is-current .ims-ao-timeline__marker { color: #fff; background: #20252b; border-color: #20252b; }
.ims-ao-timeline__step.is-error .ims-ao-timeline__marker { color: #fff; background: #d72f3b; border-color: #d72f3b; }
.ims-ao-timeline__label { font-weight: 600; line-height: 1.3; }
.ims-ao-timeline__date { margin-top: 4px; color: #656a70; font-size: 13px; line-height: 1.3; }
.ims-ao-details__card { padding: 24px; background: #fff; border: 1px solid #e6e6e6; }
.ims-ao-details__section-heading,
.ims-ao-details__info-heading { margin: 0 0 18px; color: #252a31; font-size: 22px; font-weight: 600; line-height: 1.25; }
.ims-ao-details__item { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid #ececec; }
.ims-ao-details__item:first-child { padding-top: 0; }
.ims-ao-details__item:last-child { padding-bottom: 0; border-bottom: 0; }
.ims-ao-details__item-media { display: flex; align-items: center; justify-content: center; }
.ims-ao-details__item-image { display: block; width: 80px; height: 80px; object-fit: contain; background: #f9f5ee; border: 1px solid #ececec; }
.ims-ao-details__item-copy { min-width: 0; }
.ims-ao-details__item-name { color: #252a31; line-height: 1.45; }
.ims-ao-details__item-meta { margin-top: 5px; color: #74787e; font-size: 13px; }
.ims-ao-details__item-price { color: #252a31; font-weight: 600; white-space: nowrap; }
.ims-ao-details__item-qty { white-space: nowrap; }
.ims-ao-details__info-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; margin-top: 18px; }
.ims-ao-details__info-box { padding: 24px; background: #fff; border: 1px solid #e6e6e6; }
.ims-ao-details__info-row { display: flex; gap: 6px; margin-bottom: 14px; color: #353a40; line-height: 1.5; }
.ims-ao-details__info-row:last-child { margin-bottom: 0; }
.ims-ao-details__payment-box { display: flex; flex-direction: column; gap: 16px; }
.ims-ao-details__payment-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: #f7f7f7; }
.ims-ao-details__payment-label { color: #353a40; }
.ims-ao-details__payment-method { display: inline-flex; align-items: center; gap: 8px; color: #353a40; }
.ims-ao-details__payment-icon { display: inline-flex; align-items: center; justify-content: center; }
.ims-ao-details__grand-total { color: #252a31; font-size: 22px; font-weight: 600; }

@media (max-width: 1024px) {
    .ims-ao-history__top { flex-direction: column; }
    .ims-ao-history__filters { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .ims-ao-history__footer { grid-template-columns: 1fr; }
    .ims-ao-history__result-count,
    .ims-ao-history__limit { justify-content: center; text-align: center; }
    .ims-ao-details__info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .ims-ao-history__heading,
    .ims-ao-details__heading { font-size: 30px; }
    .ims-ao-history__filters { display: grid; grid-template-columns: 1fr; }
    .ims-ao-history__search,
    .ims-ao-history__select-wrap,
    .ims-ao-history__select-wrap--status { width: 100%; }
    .ims-ao-history__sort-group { display: grid; grid-template-columns: auto 1fr; align-items: center; }
    .ims-ao-history__sort-group .ims-ao-history__select-wrap { grid-column: 1 / -1; }
    .ims-ao-history__thead { display: none; }
    .ims-ao-history__row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 16px; }
    .ims-ao-history__cell { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; }
    .ims-ao-history__cell::before { content: attr(data-label); color: #777b80; font-size: 13px; }
    .ims-ao-history__cell--id { grid-column: 1 / -1; font-weight: 600; }
    .ims-ao-history__cell--action { position: absolute; right: 16px; align-self: start; }
    .ims-ao-history__row { position: relative; }
    .ims-ao-history__total { font-weight: 600; }
    .ims-ao-history__pagination { flex-wrap: wrap; }
    .ims-ao-timeline { grid-template-columns: 1fr; gap: 18px; padding-left: 54px; }
    .ims-ao-timeline__track { top: 22px; bottom: 22px; left: 21px; width: 8px; height: auto; }
    .ims-ao-timeline__progress-fill { width: 100%; height: var(--ims-ao-progress); }
    .ims-ao-timeline__step { min-height: 62px; align-items: flex-start; text-align: left; }
    .ims-ao-timeline__marker { position: absolute; top: 0; left: -54px; }
    .ims-ao-details__item { grid-template-columns: auto 1fr; align-items: start; }
    .ims-ao-details__item-price,
    .ims-ao-details__item-qty { grid-column: 2; }
    .ims-ao-details__info-row { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .ims-ao-history__row,
    .ims-ao-history__detail-icon { transition: none; }
}


/* IMS Account Orders 1.2.0 — Checkout/SePay payment presentation */
.ims-ao-details__payment-method {
    min-width: 0;
}
.ims-ao-details__payment-icon {
    flex: 0 0 auto;
    color: #20252b;
}
.ims-ao-details__payment-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}
.ims-ao-details__payment-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* =========================================================
 * Responsive hardening 1.2.1
 * ========================================================= */
.ims-ao,
.ims-ao-history,
.ims-ao-history__top,
.ims-ao-history__filters,
.ims-ao-history__table,
.ims-ao-history__row,
.ims-ao-history__cell,
.ims-ao-details__card,
.ims-ao-details__item,
.ims-ao-details__item-copy,
.ims-ao-details__info-box,
.ims-ao-details__payment-card,
.ims-ao-details__payment-method,
.ims-ao-details__payment-title {
	min-width: 0;
}

.ims-ao-history__cell,
.ims-ao-history__total,
.ims-ao-status,
.ims-ao-details__item-name,
.ims-ao-details__item-meta,
.ims-ao-details__item-price,
.ims-ao-details__item-qty,
.ims-ao-details__info-row,
.ims-ao-details__payment-title,
.ims-ao-details__payment-label,
.ims-ao-details__grand-total {
	overflow-wrap: anywhere;
	word-break: normal;
}

.ims-ao-status,
.ims-ao-details__payment-method {
	max-width: 100%;
	white-space: normal;
}

@media (max-width: 1024px) {
	.ims-ao-history__filters {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.ims-ao-history__search,
	.ims-ao-history__select-wrap,
	.ims-ao-history__select-wrap--status,
	.ims-ao-history__sort-group {
		width: 100%;
		min-width: 0;
	}

	.ims-ao-details__card,
	.ims-ao-details__info-box {
		padding: 20px;
	}
}

@media (max-width: 767px) {
	.ims-ao-history__heading,
	.ims-ao-details__heading {
		font-size: clamp(27px, 8vw, 30px);
	}

	.ims-ao-history__filters {
		grid-template-columns: minmax(0, 1fr);
	}

	.ims-ao-history__row {
		position: relative;
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 10px;
		padding: 15px 14px;
	}

	.ims-ao-history__cell,
	.ims-ao-history__cell--id,
	.ims-ao-history__cell--date,
	.ims-ao-history__cell--status,
	.ims-ao-history__cell--quantity,
	.ims-ao-history__cell--total {
		position: static;
		display: grid;
		grid-column: 1;
		grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
		align-items: start;
		gap: 10px;
		width: 100%;
		padding: 0;
		text-align: right;
	}

	.ims-ao-history__cell::before {
		min-width: 0;
		text-align: left;
		overflow-wrap: anywhere;
	}

	.ims-ao-history__cell--action {
		position: static;
		display: flex;
		grid-column: 1;
		justify-content: flex-end;
		width: 100%;
		margin-top: 2px;
	}

	.ims-ao-history__cell--action::before {
		display: none;
	}

	.ims-ao-history__pagination {
		max-width: 100%;
		overflow-x: auto;
		flex-wrap: nowrap;
		justify-content: flex-start;
		padding-bottom: 4px;
	}

	.ims-ao-details__card,
	.ims-ao-details__info-box {
		padding: 16px;
	}

	.ims-ao-details__item {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 10px 12px;
	}

	.ims-ao-details__item-image {
		width: 72px;
		height: 72px;
	}

	.ims-ao-details__item-price,
	.ims-ao-details__item-qty {
		grid-column: 2;
		white-space: normal;
	}

	.ims-ao-details__payment-method {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.ims-ao-details__grand-total {
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.ims-ao-history__cell {
		grid-template-columns: minmax(80px, 36%) minmax(0, 1fr);
	}

	.ims-ao-details__item {
		grid-template-columns: minmax(0, 1fr);
	}

	.ims-ao-details__item-media,
	.ims-ao-details__item-copy,
	.ims-ao-details__item-price,
	.ims-ao-details__item-qty {
		grid-column: 1;
	}

	.ims-ao-details__item-media {
		justify-content: flex-start;
	}

	.ims-ao-details__info-row {
		flex-direction: column;
		gap: 2px;
	}

	.ims-ao-timeline {
		padding-left: 48px;
	}

	.ims-ao-timeline__marker {
		left: -48px;
	}
}
