/*
 * MUJI UK cancellation portal — hand-written to match the BigBlue returns portal
 * (Mantine UI). Values extracted from the live reference site.
 */

:root {
    --maroon: #7c0018;
    --maroon-dark: #660014;
    --ink: #000;
    --body-text: #343a40;
    --muted: #adb5bd;
    --border: #ced4da;
    --disabled-bg: #f1f3f5;
    --card-bg: #fff;
    --card-radius: 16px;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
    --font: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji";
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Full-viewport background photo with the centered card column on top. */
.portal {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 128px 16px 48px;
    background-image: url("../img/background.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.portal__column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 448px;
}

.card {
    padding: 40px;
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

/* Brand row at the top of the main card. */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.brand__logo {
    display: block;
    width: 46px;
    height: 46px;
}

.brand__name {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.card__title {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 700;
    line-height: 40px;
    color: var(--ink);
}

/* Form */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
}

.field__label {
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.field__control {
    position: relative;
}

.field__input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field__input:focus {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px rgba(124, 0, 24, .12);
}

.field__control--help .field__input {
    padding-right: 52px;
}

/* The "?" help affordance inside the order-number field. */
.field__help {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #868e96;
    border-radius: 50%;
    cursor: help;
    user-select: none;
}

/* Button (used as <button> on the form and as a link on the result page). */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    margin-top: 4px;
    padding: 0 22px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #fffbfb;
    text-decoration: none;
    background: var(--maroon);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease;
}

.button:hover {
    background: var(--maroon-dark);
}

.button:disabled {
    color: var(--muted);
    background: var(--disabled-bg);
    cursor: not-allowed;
}

/* Result-page message body. */
.card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.card__body p {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    color: var(--body-text);
}

/* Validation / error banner on the form. */
.form__error {
    margin: 0 0 20px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 20px;
    color: #b00020;
    background: #fdecef;
    border: 1px solid #f5c6cf;
    border-radius: 8px;
}

/* Footer card. */
.footer-card__brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-card__logo {
    display: block;
    width: 64px;
    height: 64px;
}

.footer-card__name {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.footer-card__shop {
    font-size: 16px;
    font-weight: 600;
    color: var(--maroon);
    text-decoration: none;
}

.footer-card__shop:hover {
    text-decoration: underline;
}

.footer-card__links {
    margin-top: 24px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.footer-card__links a {
    font-size: 16px;
    font-weight: 600;
    color: var(--maroon);
    text-decoration: none;
}

.footer-card__links a:hover {
    text-decoration: underline;
}

.footer-card__sep {
    margin: 0 8px;
    color: var(--muted);
}

.footer-card__social {
    margin-top: 16px;
    text-align: center;
}

.footer-card__social img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.footer-card__powered {
    margin: 16px 0 0;
    font-size: 13px;
    text-align: center;
    color: #868e96;
}

.footer-card__powered a {
    color: #868e96;
    text-decoration: none;
}

.footer-card__powered a:hover {
    text-decoration: underline;
}

/* Confirmation page — order summary + product lines. */
.order-summary {
    margin: 0 0 20px;
}

.order-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.order-summary__label {
    margin: 0;
    font-size: 15px;
    color: #868e96;
}

.order-summary__value {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    text-align: right;
}

.line-items {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.line-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid #f1f3f5;
}

.line-item:last-child {
    border-bottom: 0;
}

.line-item__name {
    flex: 1 1 auto;
    color: var(--ink);
}

.line-item__qty {
    flex: 0 0 auto;
    color: #868e96;
}

.line-item__price {
    flex: 0 0 auto;
    font-weight: 600;
    color: var(--ink);
}

.card__link {
    display: block;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: var(--maroon);
    text-decoration: none;
}

.card__link:hover {
    text-decoration: underline;
}

/* Test-mode banner (fixed slim strip along the top). */
.test-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: #fffbfb;
    background: var(--maroon);
}

@media (max-width: 520px) {
    .portal {
        padding: 40px 12px 32px;
    }

    .card {
        padding: 28px 22px;
    }

    .card__title {
        font-size: 26px;
        line-height: 36px;
    }

    .footer-card__logo {
        width: 56px;
        height: 56px;
    }
}
