/*
 * My Print Lab partner portal.
 *
 * The portal renders inside whatever the theme hands it, so most rules here are written
 * to win against Hello Elementor and the Elementor kit rather than to be minimal. That is
 * why link and table rules carry .mpl-portal-wrap in front of them: without it the kit's
 * global anchor underline and table borders come back.
 */

.mpl-portal-shell,
.mpl-portal-wrap,
.mpl-partner-products,
.mpl-partner-orders,
.mpl-partner-order-detail,
.mpl-partner-product-submit,
.mpl-apply {
    --mpl-primary: #0d67b5;
    --mpl-primary-hover: #0b5a9c;
    --mpl-primary-light: #e8f1fa;
    --mpl-accent: #ea6a1e;

    --mpl-ink: #0f172a;
    --mpl-ink-soft: #334155;
    --mpl-muted: #64748b;
    --mpl-line: #e2e8f0;
    --mpl-line-soft: #eef2f6;
    --mpl-surface: #ffffff;
    --mpl-sunken: #f8fafc;
    --mpl-sunken-deep: #eef2f7;

    --mpl-radius: 12px;
    --mpl-radius-sm: 8px;
    --mpl-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -16px rgba(15, 23, 42, .25);

    box-sizing: border-box;
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 20px 64px;
    color: var(--mpl-ink);
    font-size: 15px;
    line-height: 1.6;
}

.mpl-portal-wrap *,
.mpl-portal-wrap *::before,
.mpl-portal-wrap *::after {
    box-sizing: border-box;
}

/* ---------------------------------------------------------------- navigation */

/*
 * A segmented control rather than a row of links. It scrolls sideways on a narrow screen
 * instead of wrapping, because a wrapped nav changes the page's height between sections
 * and makes the portal feel like it is jumping around as you move through it.
 */
/*
 * The shell: navigation in a column on the left, the screen on the right.
 *
 * Opened by portal_header() and closed by portal_footer(), because the nav and the page
 * body are printed as siblings and two siblings only become columns if something wraps
 * them.
 */
.mpl-portal-shell {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 212px minmax(0, 1fr);
    gap: 40px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 20px 64px;
}

.mpl-portal-shell * {
    box-sizing: border-box;
}

/*
 * Inside the shell the wrapper is a grid cell, so the grid owns the width and the
 * padding. Outside it, on the public application page, the wrapper is the page and keeps
 * its own.
 */
.mpl-portal-shell > .mpl-portal-wrap {
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
}

/* The application form reads better narrow than wide. */
.mpl-portal-wrap.mpl-apply {
    max-width: 840px;
}

.mpl-portal-nav {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--mpl-sunken-deep);
    border: 1px solid var(--mpl-line);
    border-radius: 14px;
}

.mpl-portal-bar .mpl-portal-nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--mpl-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.mpl-portal-bar .mpl-portal-nav a:hover,
.mpl-portal-bar .mpl-portal-nav a:focus-visible {
    color: var(--mpl-ink);
    background: rgba(255, 255, 255, .7);
    text-decoration: none;
}

.mpl-portal-bar .mpl-portal-nav a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--mpl-primary-light);
}

.mpl-portal-bar .mpl-portal-nav a[aria-current="page"],
.mpl-portal-bar .mpl-portal-nav a.is-current {
    color: var(--mpl-primary);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 0 0 1px rgba(15, 23, 42, .04);
}

/* Without this Submit Order reads as a third way of looking at orders. */
.mpl-nav-label {
    margin: 14px 0 4px;
    padding: 0 12px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #94a3b8;
}

/*
 * The drawer button, which exists only below the breakpoint.
 *
 * Written against the shell and the element, not the class alone, because the theme
 * styles buttons through selectors of its own and was winning: the button turned up on
 * desktop wearing the theme's outline, with the hamburger inheriting its colour.
 */
.mpl-portal-shell .mpl-portal-bar button.mpl-nav-toggle {
    display: none;
    width: 100%;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 11px 14px;
    background: var(--mpl-surface);
    border: 1px solid var(--mpl-line);
    border-radius: 10px;
    box-shadow: none;
    color: var(--mpl-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    cursor: pointer;
}

.mpl-portal-shell .mpl-portal-bar button.mpl-nav-toggle:hover {
    background: var(--mpl-sunken);
    border-color: #cbd5e1;
    color: var(--mpl-ink);
}

.mpl-nav-toggle-bars {
    position: relative;
    flex: 0 0 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.mpl-nav-toggle-bars::before,
.mpl-nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.mpl-nav-toggle-bars::before { top: -5px; }
.mpl-nav-toggle-bars::after  { top: 5px; }

/* ---------------------------------------------------------------- page header */

/*
 * A block, not a flex row. The heading and the partner chip share their own row inside
 * it, and the description is a block under them. Relying on flex-wrap to push the
 * description onto its own line left it sitting beside the heading whenever anything in
 * the theme touched the flex defaults.
 */
.mpl-portal-header {
    margin-bottom: 28px;
}

.mpl-portal-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.mpl-portal-wrap .mpl-portal-heading h2,
.mpl-portal-wrap .mpl-portal-header h2,
.mpl-portal-wrap h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--mpl-ink);
}

/*
 * The description takes the whole row rather than sitting beside the heading. It runs to
 * a few sentences on most screens, and a paragraph that wraps around a heading reads as
 * a caption on it instead of as the page's own introduction.
 */
.mpl-portal-header p {
    display: block;
    max-width: 72ch;
    margin: 8px 0 0;
    color: var(--mpl-muted);
    font-size: 14.5px;
    line-height: 1.65;
}

/* The partner's own name, which is the one thing on the page that is theirs. */
.mpl-portal-header .mpl-partner-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--mpl-primary-light);
    color: var(--mpl-primary);
    font-size: 13px;
    font-weight: 600;
}

/* ---------------------------------------------------------------- summary tiles */

.mpl-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin: 0 0 28px;
}

.mpl-portal-wrap a.mpl-summary-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    background: var(--mpl-surface);
    border: 1px solid var(--mpl-line);
    border-radius: var(--mpl-radius);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.mpl-portal-wrap a.mpl-summary-card:hover {
    border-color: #c7d9ec;
    box-shadow: var(--mpl-shadow);
    transform: translateY(-1px);
    text-decoration: none;
}

.mpl-summary-number {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--mpl-ink);
}

.mpl-summary-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--mpl-muted);
}

/* A tile reading zero is the normal state, not an error, so it recedes rather than alarms. */
.mpl-summary-card[data-empty="1"] .mpl-summary-number {
    color: #cbd5e1;
}

/* ---------------------------------------------------------------- action cards */

.mpl-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin: 0 0 32px;
}

.mpl-dashboard-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--mpl-surface);
    border: 1px solid var(--mpl-line);
    border-radius: var(--mpl-radius);
}

.mpl-portal-wrap .mpl-dashboard-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 650;
    color: var(--mpl-ink);
}

.mpl-dashboard-card p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--mpl-muted);
}

.mpl-dashboard-card .mpl-button {
    margin-top: auto;
    align-self: flex-start;
}

/* ---------------------------------------------------------------- buttons */

.mpl-portal-wrap .mpl-button,
.mpl-portal-wrap button.mpl-button,
.mpl-apply .mpl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--mpl-radius-sm);
    background: var(--mpl-primary);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}

.mpl-portal-wrap .mpl-button:hover {
    background: var(--mpl-primary-hover);
    text-decoration: none;
}

.mpl-portal-wrap .mpl-button:active {
    transform: translateY(1px);
}

.mpl-portal-wrap .mpl-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--mpl-primary-light);
}

.mpl-portal-wrap .mpl-button.secondary {
    background: #fff;
    border-color: var(--mpl-line);
    color: var(--mpl-ink-soft) !important;
}

.mpl-portal-wrap .mpl-button.secondary:hover {
    background: var(--mpl-sunken);
    border-color: #cbd5e1;
}

.mpl-portal-wrap .mpl-button.accent {
    background: var(--mpl-accent);
}

.mpl-portal-wrap .mpl-button.accent:hover {
    background: #d25c15;
}

.mpl-portal-wrap .mpl-button[disabled],
.mpl-portal-wrap .mpl-button.is-disabled {
    opacity: .5;
    pointer-events: none;
}

/* ---------------------------------------------------------------- sections */

.mpl-section {
    margin: 0 0 32px;
}

.mpl-portal-wrap .mpl-section h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -.01em;
    color: var(--mpl-ink);
}

.mpl-section > p {
    margin: 0 0 12px;
    color: var(--mpl-muted);
    font-size: 14px;
}

/* The panel a table or a form sits in, so neither floats loose on the page background. */
.mpl-panel {
    background: var(--mpl-surface);
    border: 1px solid var(--mpl-line);
    border-radius: var(--mpl-radius);
    overflow: hidden;
}

/* ---------------------------------------------------------------- tables */

.mpl-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mpl-portal-wrap table.mpl-table {
    width: 100%;
    margin: 0;
    border: none;
    border-collapse: collapse;
    font-size: 14px;
}

.mpl-portal-wrap table.mpl-table th,
.mpl-portal-wrap table.mpl-table td {
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid var(--mpl-line-soft);
    text-align: left;
    vertical-align: middle;
}

.mpl-portal-wrap table.mpl-table thead th {
    position: sticky;
    top: 0;
    background: var(--mpl-sunken);
    border-bottom: 1px solid var(--mpl-line);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mpl-muted);
    white-space: nowrap;
}

.mpl-portal-wrap table.mpl-table tbody tr:last-child td {
    border-bottom: none;
}

.mpl-portal-wrap table.mpl-table tbody tr:hover td {
    background: #fbfdff;
}

.mpl-portal-wrap table.mpl-table tfoot th {
    padding: 12px 16px;
    background: var(--mpl-sunken);
    border-top: 1px solid var(--mpl-line);
    font-size: 13px;
}

/* Figures line up column to column only if the digits are the same width. */
.mpl-portal-wrap table.mpl-table td.mpl-num,
.mpl-portal-wrap table.mpl-table th.mpl-num,
.mpl-cost-cell,
.mpl-margin-cell,
.mpl-summary-number {
    font-variant-numeric: tabular-nums;
}

.mpl-portal-wrap table.mpl-table .mpl-num {
    text-align: right;
}

.mpl-row-rejected td {
    background: #fff7f7;
}

/*
 * The second line in a cell: a date under an order number, an invoice number under a
 * payment state, a tracking number under a fulfilment state.
 *
 * Stacking inside the cell is what took the orders table from eleven columns to five.
 * Each of those pairs was two columns saying one thing, and five of the eleven were
 * status columns that showed a dash on most rows.
 */
.mpl-cell-sub {
    display: block;
    margin-top: 3px;
    color: var(--mpl-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.mpl-cell-sub a {
    color: var(--mpl-primary);
}

.mpl-portal-wrap .mpl-button.small {
    margin-top: 6px;
    padding: 5px 11px;
    font-size: 12.5px;
}

/* ---------------------------------------------------------------- badges */

.mpl-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.mpl-badge-grey   { background: #f1f5f9; color: #475569; }
.mpl-badge-blue   { background: #e0edfb; color: #175b9e; }
.mpl-badge-green  { background: #dcfce7; color: #15803d; }
.mpl-badge-orange { background: #ffedd5; color: #b45309; }
.mpl-badge-red    { background: #fee2e2; color: #b91c1c; }

/* ---------------------------------------------------------------- money */

.mpl-margin-positive { color: #15803d; font-weight: 650; }
.mpl-margin-negative { color: #b91c1c; font-weight: 650; }

.mpl-margin-each {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--mpl-muted);
    white-space: nowrap;
}

.mpl-muted { color: var(--mpl-muted); }

/* ---------------------------------------------------------------- forms */

.mpl-form {
    padding: 24px;
}

.mpl-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px 20px;
}

/* A field that needs the full width, such as a file picker or a long description. */
.mpl-field-wide {
    grid-column: 1 / -1;
}

.mpl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mpl-portal-wrap .mpl-field label,
.mpl-apply .mpl-field label {
    font-size: 13px;
    font-weight: 650;
    color: var(--mpl-ink-soft);
}

.mpl-req {
    color: #dc2626;
    font-weight: 400;
}

.mpl-portal-wrap .mpl-field input[type="text"],
.mpl-portal-wrap .mpl-field input[type="email"],
.mpl-portal-wrap .mpl-field input[type="url"],
.mpl-portal-wrap .mpl-field input[type="tel"],
.mpl-portal-wrap .mpl-field input[type="number"],
.mpl-portal-wrap .mpl-field input[type="file"],
.mpl-portal-wrap .mpl-field select,
.mpl-portal-wrap .mpl-field textarea,
.mpl-apply .mpl-field input,
.mpl-apply .mpl-field select,
.mpl-apply .mpl-field textarea {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: var(--mpl-radius-sm);
    color: var(--mpl-ink);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.mpl-portal-wrap .mpl-field textarea {
    min-height: 110px;
    resize: vertical;
}

.mpl-portal-wrap .mpl-field input:focus,
.mpl-portal-wrap .mpl-field select:focus,
.mpl-portal-wrap .mpl-field textarea:focus,
.mpl-apply .mpl-field input:focus,
.mpl-apply .mpl-field select:focus,
.mpl-apply .mpl-field textarea:focus {
    outline: none;
    border-color: var(--mpl-primary);
    box-shadow: 0 0 0 3px var(--mpl-primary-light);
}

.mpl-portal-wrap .mpl-field input[type="file"] {
    padding: 8px 12px;
    background: var(--mpl-sunken);
    border-style: dashed;
    cursor: pointer;
}

.mpl-hint {
    font-size: 12px;
    color: var(--mpl-muted);
}

.mpl-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--mpl-line-soft);
}

/* The price input, which carries its own currency mark rather than a label saying AUD. */
.mpl-price-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 150px;
}

.mpl-currency {
    position: absolute;
    left: 11px;
    color: var(--mpl-muted);
    font-size: 14px;
    pointer-events: none;
}

.mpl-portal-wrap input.mpl-price-input {
    width: 100%;
    padding: 8px 10px 8px 24px;
    border: 1px solid #cbd5e1;
    border-radius: var(--mpl-radius-sm);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.mpl-portal-wrap input.mpl-price-input:focus {
    outline: none;
    border-color: var(--mpl-primary);
    box-shadow: 0 0 0 3px var(--mpl-primary-light);
}

.mpl-pricing-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: var(--mpl-sunken);
    border-top: 1px solid var(--mpl-line);
}

/* The explanation sits left and the button right, whether or not there is an explanation. */
.mpl-pricing-actions small {
    margin-right: auto;
    color: var(--mpl-muted);
    font-size: 12.5px;
}

/* A checkbox reads as one line with its own words, not as a field with a label above it. */
.mpl-portal-wrap .mpl-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    font-size: 14px;
    font-weight: 400;
    color: var(--mpl-ink-soft);
}

.mpl-portal-wrap .mpl-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--mpl-primary);
}

.mpl-portal-wrap input.mpl-qty-input {
    width: 78px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: var(--mpl-radius-sm);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.mpl-portal-wrap input.mpl-qty-input:focus {
    outline: none;
    border-color: var(--mpl-primary);
    box-shadow: 0 0 0 3px var(--mpl-primary-light);
}

/* ---------------------------------------------------------------- notices */

.mpl-notice {
    display: flex;
    gap: 10px;
    margin: 0 0 20px;
    padding: 13px 16px;
    border: 1px solid var(--mpl-line);
    border-left: 3px solid var(--mpl-muted);
    border-radius: var(--mpl-radius-sm);
    background: var(--mpl-sunken);
    font-size: 14px;
}

.mpl-notice p {
    margin: 0;
}

.mpl-notice p + p {
    margin-top: 6px;
}

.mpl-notice-success { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #16a34a; }
.mpl-notice-error   { background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; }
.mpl-notice-info    { background: var(--mpl-primary-light); border-color: #c7ddf2; border-left-color: var(--mpl-primary); }

/* ---------------------------------------------------------------- empty states */

/*
 * An empty table is the first thing a new partner sees on four of these screens, so it
 * says what to do next rather than only that there is nothing here.
 */
.mpl-empty {
    padding: 44px 24px;
    text-align: center;
}

.mpl-empty h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 650;
    color: var(--mpl-ink);
}

.mpl-empty p {
    margin: 0 0 16px;
    color: var(--mpl-muted);
    font-size: 14px;
}

/* ---------------------------------------------------------------- narrow screens */

@media (max-width: 960px) {
    .mpl-portal-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 22px 16px 48px;
    }

    .mpl-portal-shell .mpl-portal-bar button.mpl-nav-toggle {
        display: flex;
    }

    /*
     * Closed by default. A sidebar on a phone is either a drawer or a tall block of links
     * the partner scrolls past on the way to the page every single time.
     */
    .mpl-portal-nav {
        position: static;
        display: none;
        margin-top: 6px;
    }

    .mpl-portal-bar.is-open .mpl-portal-nav {
        display: flex;
    }

    .mpl-portal-wrap .mpl-portal-header h2,
    .mpl-portal-wrap h2 {
        font-size: 24px;
    }

    .mpl-summary-number {
        font-size: 26px;
    }

    .mpl-form {
        padding: 18px;
    }

    /* Sticky headers inside a sideways-scrolling table fight the page scroll on touch. */
    .mpl-portal-wrap table.mpl-table thead th {
        position: static;
    }
}

/* ---------------------------------------------------------------- theme title */

/*
 * Hello Elementor and most themes print the page title above the content. Every portal
 * screen already carries its own heading, so without this each one reads its name twice,
 * in two different sizes, with the navigation stranded between them.
 *
 * Scoped to the body class the plugin adds, so it touches only portal pages. A page built
 * in Elementor with its own title widget is unaffected, since that is not the theme's.
 */
body.mpl-portal-page .page-header,
body.mpl-portal-page .entry-header,
body.mpl-portal-page .page-header .entry-title,
body.mpl-portal-page h1.entry-title,
body.mpl-portal-page h1.page-title {
    display: none;
}

/* ---------------------------------------------------------------- carried over
 *
 * The public application form, its thank you page, the STL preview and the
 * honeypot. These screens were styled on their own terms before the restyle and
 * are unchanged by it, so the rules move across as they were rather than being
 * rewritten for the sake of it.
 */

.mpl-badge-yellow { background: #fff4ce; color: #6b4e00; }

.mpl-badge-purple { background: #ede9fe; color: #5b21b6; }

.mpl-stl-viewer {
    width: 100%;
    height: 560px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    overflow: hidden;
    position: relative;
}

.mpl-stl-loading {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.mpl-spinner {
    width: 34px;
    height: 34px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--mpl-primary);
    border-radius: 50%;
    animation: mpl-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

.mpl-shop-cell {
    white-space: nowrap;
}

.mpl-shop-cell small {
    white-space: normal;
    display: inline-block;
    max-width: 160px;
    line-height: 1.3;
}

/* ---- Application form (slice 5) ---- */

.mpl-apply-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.mpl-apply-grid label {
    display: block;
    font-weight: 600;
    color: #111827;
}

.mpl-apply-wide { grid-column: 1 / -1; }

.mpl-apply-grid input,
.mpl-apply-grid select,
.mpl-apply-grid textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.mpl-apply-grid input:focus,
.mpl-apply-grid select:focus,
.mpl-apply-grid textarea:focus {
    outline: none;
    border-color: var(--mpl-primary);
    box-shadow: 0 0 0 3px var(--mpl-primary-light);
}

.mpl-apply-grid small {
    display: block;
    font-weight: 400;
    color: #6b7280;
    margin-top: 4px;
}

.mpl-apply-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.mpl-apply-actions .mpl-button {
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 12px 22px;
}

/* The honeypot. Off screen rather than display:none, because some bots skip
   anything hidden and the point is for them to fill it in. */
.mpl-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------------------------
   The page an applicant lands on after submitting.
   Every outcome renders this, so it never says whether the address was new.
   --------------------------------------------------------------------------- */

.mpl-applied {
    max-width: 760px;
    margin: 0 auto;
    padding: 8px 0 24px;
}

.mpl-applied-title {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
}

.mpl-applied-lede {
    margin: 0 0 28px;
    font-size: 17px;
    color: #4b5563;
}

.mpl-applied-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.mpl-applied-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    background: #fff;
}

.mpl-applied-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.mpl-applied-card p,
.mpl-applied-card ul {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.mpl-applied-card ul {
    padding-left: 20px;
}

.mpl-applied-card li {
    margin-bottom: 4px;
}

.mpl-applied-small {
    margin-top: 10px !important;
    font-size: 13px !important;
    color: #6b7280 !important;
}

.mpl-applied-foot {
    margin: 24px 0 0;
    font-size: 15px;
    color: #4b5563;
}

/* The quiet line back to the public programme page, at the foot of the dashboard. */
.mpl-portal-foot {
    margin: 36px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--mpl-line-soft);
    color: var(--mpl-muted);
    font-size: 13.5px;
}
