/* =========================================================
   Marston Robing – My orders list and order view.
   Builds on css/mr-home.css (brand tokens, .mr-btn) and
   css/mr-cart.css (.mr-page-head, .mr-crumbs, .mr-card,
   .mr-summary, .mr-empty), all under the .mr-home scope.
   ========================================================= */

/* Status badge */
.mr-home .mr-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-family: Poppins-Medium, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.mr-home .mr-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.mr-home .mr-status--done {
    background: #e7f4ec;
    color: #1d6b3c;
}

.mr-home .mr-status--pending {
    background: #fdf3dc;
    color: #8a5a00;
}

.mr-home .mr-status--cancelled {
    background: #fbe9e8;
    color: #a3261d;
}

.mr-home .mr-empty--loading > i {
    animation: mr-orders-pulse 1.4s ease-in-out infinite;
}

@keyframes mr-orders-pulse {
    50% { opacity: .35; }
}

/* ---------------------------------------------------------
   My orders list
   --------------------------------------------------------- */
.mr-orders .mr-orders__body {
    max-width: 960px;
    padding-top: 28px;
    padding-bottom: 90px;
}

.mr-orders .mr-orders__count {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--mr-muted);
}

.mr-orders .mr-orders__list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mr-orders .mr-order {
    padding: 0;
    overflow: hidden;
    transition: box-shadow .25s, border-color .25s;
}

.mr-orders .mr-order:hover {
    border-color: var(--mr-gold-300);
    box-shadow: 0 14px 30px -22px rgba(0, 37, 87, .45);
}

.mr-orders .mr-order__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 16px 22px;
    background: var(--mr-page);
    border-bottom: 1px solid var(--mr-line);
}

.mr-orders .mr-order__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 36px;
    margin: 0;
}

.mr-orders .mr-order__meta dt {
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mr-muted);
}

.mr-orders .mr-order__meta dd {
    margin: 2px 0 0;
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-size: 15px;
    color: var(--mr-navy);
}

.mr-orders .mr-order__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 16px 22px 18px;
}

.mr-orders .mr-order__items {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mr-orders .mr-order__items li {
    display: flex;
    gap: 8px;
    padding: 3px 0;
    font-size: 14px;
    line-height: 1.45;
}

.mr-orders .mr-order__item-name {
    min-width: 0;
    color: var(--mr-ink);
}

.mr-orders .mr-order__item-qty {
    flex: 0 0 auto;
    color: var(--mr-muted);
}

.mr-orders .mr-order__more {
    color: var(--mr-muted);
}

.mr-orders .mr-order__view {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 22px;
}

/* ---------------------------------------------------------
   Order view
   --------------------------------------------------------- */
.mr-order-view .mr-order-view__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.mr-order-view .mr-order-view__placed {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--mr-muted);
}

.mr-order-view .mr-order-view__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
    padding: 32px 0 90px;
}

.mr-order-view .mr-order-view__main {
    display: grid;
    gap: 24px;
}

.mr-order-view .mr-order-view__lines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mr-order-view .mr-order-view__line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--mr-line);
}

.mr-order-view .mr-order-view__line:first-child {
    padding-top: 0;
    border-top: 0;
}

.mr-order-view .mr-order-view__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mr-order-view .mr-order-view__name {
    font-family: Poppins-Medium, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: var(--mr-ink);
    text-decoration: none;
}

.mr-order-view .mr-order-view__name:hover {
    color: var(--mr-navy-700);
    text-decoration: underline;
}

.mr-order-view .mr-order-view__attr {
    font-size: 13px;
    line-height: 1.45;
    color: var(--mr-muted);
}

.mr-order-view .mr-order-view__line-total {
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-size: 15px;
    color: var(--mr-navy);
    white-space: nowrap;
}

.mr-order-view .mr-order-view__addresses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.mr-order-view .mr-order-view__addresses h3 {
    margin: 0 0 6px;
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mr-muted);
}

.mr-order-view .mr-order-view__addresses p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--mr-ink);
}

.mr-order-view .mr-order-view__addresses strong {
    font-family: Poppins-Medium, Arial, sans-serif;
    font-weight: normal;
}

.mr-order-view .mr-summary__cta {
    display: flex;
}

.mr-order-view .mr-summary__assure a {
    font-size: 13px;
    color: var(--mr-navy-700);
    text-decoration: underline;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 991px) {
    .mr-order-view .mr-order-view__layout {
        grid-template-columns: minmax(0, 1fr);
        padding: 24px 0 64px;
    }
}

@media (max-width: 767px) {
    .mr-orders .mr-orders__body { padding-top: 20px; padding-bottom: 64px; }
    .mr-orders .mr-order__head,
    .mr-orders .mr-order__body { padding-left: 16px; padding-right: 16px; }
    .mr-orders .mr-order__meta { gap: 10px 22px; }
    .mr-orders .mr-order__body { flex-direction: column; align-items: stretch; }
    .mr-orders .mr-order__view { width: 100%; }
    .mr-order-view .mr-order-view__addresses { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .mr-home .mr-empty--loading > i { animation: none; }
}

/* ---------------------------------------------------------
   My addresses (Pages/Addresses.razor)
   --------------------------------------------------------- */
.mr-addresses .mr-addresses__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
}

.mr-addresses .mr-addresses__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 22px;
}

.mr-addresses .mr-addresses__actions .mr-btn {
    min-height: 44px;
}

.mr-addresses .mr-addresses__body {
    padding-top: 32px;
    padding-bottom: 90px;
}

.mr-addresses .mr-addresses__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mr-addresses .mr-address {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 22px;
    transition: border-color .2s, box-shadow .2s;
}

.mr-addresses .mr-address:hover {
    border-color: var(--mr-gold-300);
    box-shadow: 0 14px 30px -22px rgba(0, 37, 87, .45);
}

.mr-addresses .mr-address__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.mr-addresses .mr-address__head i {
    font-size: 18px;
    color: var(--mr-gold);
}

.mr-addresses .mr-address__name {
    margin: 0;
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 16px;
    color: var(--mr-navy);
}

.mr-addresses .mr-address__lines {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--mr-ink);
}

.mr-addresses .mr-address__phone {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--mr-muted);
}

.mr-addresses .mr-address__phone i {
    color: var(--mr-gold);
}

.mr-addresses .mr-address__foot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--mr-line);
}

.mr-addresses .mr-address--add {
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    border: 2px dashed var(--mr-gold-300);
    border-radius: 14px;
    background: var(--mr-page);
    font-family: Poppins-Medium, Arial, sans-serif;
    font-size: 15px;
    color: var(--mr-navy);
    text-decoration: none;
}

.mr-addresses .mr-address--add i {
    font-size: 34px;
    color: var(--mr-gold);
}

.mr-addresses .mr-address--add:hover {
    border-color: var(--mr-gold);
    background: var(--mr-gold-100);
    text-decoration: none;
}

/* Add / edit address popup (Components/Address.razor), built on the Quick View shell */
.mr-address-form .mr-address-form__dialog {
    max-width: 640px;
}

.mr-address-form .mr-address-form__title {
    margin: 0 48px 22px 0;
    font-family: PlayfairDisplay-Bold, Georgia, serif;
    font-weight: normal;
    font-size: 26px;
    color: var(--mr-navy);
}

.mr-address-form .mr-address-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 26px;
}

@media (max-width: 575px) {
    .mr-addresses .mr-addresses__actions { width: 100%; justify-content: space-between; }
    .mr-address-form .mr-address-form__actions { flex-direction: column-reverse; align-items: stretch; }
    .mr-address-form .mr-address-form__actions .mr-btn { width: 100%; }
}

/* ---------------------------------------------------------
   Payment result (Pages/Payment.razor)
   --------------------------------------------------------- */
.mr-payment .mr-payment__wrap {
    max-width: 680px;
    padding-top: 48px;
    padding-bottom: 90px;
}

.mr-payment .mr-payment__card {
    padding: 40px 40px 34px;
    border-top: 3px solid var(--mr-gold);
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 30px 60px -40px rgba(0, 37, 87, .45);
}

.mr-payment .mr-payment__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 38px;
    color: #fff;
}

.mr-payment .mr-payment__badge--success {
    background: #1d6b3c;
    box-shadow: 0 0 0 8px #e7f4ec;
}

.mr-payment .mr-payment__badge--failed {
    background: #a3261d;
    box-shadow: 0 0 0 8px #fbe9e8;
}

.mr-payment .mr-payment__spinner {
    display: inline-block;
    width: 56px;
    height: 56px;
    border: 4px solid var(--mr-gold-100);
    border-top-color: var(--mr-navy);
    border-radius: 50%;
    animation: mr-payment-spin .9s linear infinite;
}

@keyframes mr-payment-spin {
    to { transform: rotate(360deg); }
}

.mr-payment .mr-payment__title {
    margin: 22px 0 10px;
    font-family: PlayfairDisplay-Bold, Georgia, serif;
    font-weight: normal;
    font-size: 32px;
    line-height: 1.2;
    color: var(--mr-navy);
}

.mr-payment .mr-payment__lead {
    max-width: 480px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.7;
    color: var(--mr-muted);
}

.mr-payment .mr-payment__facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 40px;
    margin: 26px 0 0;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--mr-page);
}

.mr-payment .mr-payment__facts dt {
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mr-muted);
}

.mr-payment .mr-payment__facts dd {
    margin: 4px 0 0;
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-size: 17px;
    color: var(--mr-navy);
}

.mr-payment .mr-payment__details {
    margin-top: 26px;
    text-align: left;
}

.mr-payment .mr-payment__subtitle {
    margin: 18px 0 8px;
    font-family: Poppins-SemiBold, Arial, sans-serif;
    font-weight: normal;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mr-muted);
}

.mr-payment .mr-payment__items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mr-payment .mr-payment__items li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mr-line);
    font-size: 14px;
}

.mr-payment .mr-payment__item-name {
    flex: 1;
    min-width: 0;
    color: var(--mr-ink);
}

.mr-payment .mr-payment__item-name small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--mr-muted);
}

.mr-payment .mr-payment__item-qty {
    color: var(--mr-muted);
    white-space: nowrap;
}

.mr-payment .mr-payment__item-total {
    font-family: Poppins-SemiBold, Arial, sans-serif;
    color: var(--mr-navy);
    white-space: nowrap;
}

.mr-payment .mr-payment__address {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--mr-ink);
}

.mr-payment .mr-payment__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 26px;
    margin-top: 30px;
}

.mr-payment .mr-payment__signoff {
    margin: 26px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--mr-line);
    font-size: 13px;
    line-height: 1.6;
    color: var(--mr-muted);
}

@media (max-width: 575px) {
    .mr-payment .mr-payment__wrap { padding-top: 24px; padding-bottom: 64px; }
    .mr-payment .mr-payment__card { padding: 30px 18px 26px; }
    .mr-payment .mr-payment__title { font-size: 26px; }
    .mr-payment .mr-payment__actions .mr-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .mr-payment .mr-payment__spinner { animation-duration: 3s; }
}

/* How-to-pay box on the cheque / bank transfer confirmation (Pages/OrderConfirmation.razor) */
.mr-payment .mr-pay-how {
    margin-top: 26px;
    padding: 18px 20px;
    border: 1px solid var(--mr-gold-300);
    border-radius: 12px;
    text-align: left;
}

.mr-payment .mr-pay-how .mr-payment__subtitle { margin-top: 0; }

.mr-payment .mr-pay-how__rows { margin: 0; }

.mr-payment .mr-pay-how__rows > div {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--mr-line);
}

.mr-payment .mr-pay-how__rows dt {
    flex: 0 0 auto;
    font-family: Poppins-Regular, Arial, sans-serif;
    font-weight: normal;
    font-size: 14px;
    color: var(--mr-muted);
}

.mr-payment .mr-pay-how__rows dd {
    margin: 0;
    font-family: Poppins-Medium, Arial, sans-serif;
    font-size: 14px;
    text-align: right;
    color: var(--mr-ink);
}

.mr-payment .mr-pay-how__ref {
    margin-top: 6px;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 8px;
    background: var(--mr-gold-100);
}

.mr-payment .mr-pay-how__ref dd {
    font-family: Poppins-SemiBold, Arial, sans-serif;
    color: var(--mr-navy);
}

.mr-payment .mr-pay-how__note {
    display: flex;
    gap: 10px;
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mr-muted);
}

.mr-payment .mr-pay-how__note i { margin-top: 3px; color: var(--mr-gold); }

@media (max-width: 575px) {
    .mr-payment .mr-pay-how__rows > div { flex-direction: column; gap: 2px; }
    .mr-payment .mr-pay-how__rows dd { text-align: left; }
}

/* ---------------------------------------------------------
   Page not found (App.razor <NotFound>)
   --------------------------------------------------------- */
.mr-notfound .mr-notfound__wrap {
    max-width: 680px;
    padding-top: 72px;
    padding-bottom: 100px;
    text-align: center;
}

.mr-notfound .mr-notfound__code {
    margin: 0;
    font-family: PlayfairDisplay-Bold, Georgia, serif;
    font-size: clamp(88px, 16vw, 140px);
    line-height: 1;
    color: var(--mr-gold-100);
    -webkit-text-stroke: 2px var(--mr-gold);
}

.mr-notfound .mr-notfound__title {
    margin-top: 18px;
    font-size: 34px;
}

.mr-notfound .mr-notfound__lead {
    max-width: 460px;
    margin: 12px auto 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--mr-muted);
}

.mr-notfound .mr-notfound__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.mr-notfound .mr-btn--ghost {
    border: 1px solid var(--mr-navy);
    background: #fff;
    color: var(--mr-navy);
}

.mr-notfound .mr-btn--ghost:hover {
    border-color: var(--mr-gold);
    background: var(--mr-gold-100);
}

.mr-notfound .mr-notfound__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 26px;
    margin: 34px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--mr-line);
    list-style: none;
}

.mr-notfound .mr-notfound__links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: Poppins-Medium, Arial, sans-serif;
    font-size: 14px;
    color: var(--mr-navy-700);
    text-decoration: none;
}

.mr-notfound .mr-notfound__links a:hover {
    color: var(--mr-gold);
    text-decoration: underline;
}

.mr-notfound .mr-notfound__links i {
    font-size: 16px;
    color: var(--mr-gold);
}

@media (max-width: 575px) {
    .mr-notfound .mr-notfound__wrap { padding-top: 40px; padding-bottom: 64px; }
    .mr-notfound .mr-notfound__title { font-size: 26px; }
    .mr-notfound .mr-notfound__actions .mr-btn { width: 100%; }
}
