/*****************************************************************

     █████╗  ██████╗ ██████╗ ██████╗ ██╗   ██╗███╗   ██╗████████╗
    ██╔══██╗██╔════╝██╔════╝██╔═══██╗██║   ██║████╗  ██║╚══██╔══╝
    ███████║██║     ██║     ██║   ██║██║   ██║██╔██╗ ██║   ██║
    ██╔══██║██║     ██║     ██║   ██║██║   ██║██║╚██╗██║   ██║
    ██║  ██║╚██████╗╚██████╗╚██████╔╝╚██████╔╝██║ ╚████║   ██║
    ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═══╝   ╚═╝

 *****************************************************************/

    /*
        The My Account pages.

        There is no artboard for them — the Figma file has Homepage, Category,
        Stores, Blog Post, Project, Blog Archive, Contact, CATALOGUES, 404 and
        Product, and nothing for the account. So this does not invent a look:
        it borrows the one the rest of the site already keeps. The inset and
        the heading scale are the cart's, in theme.cart.css; the fields are the
        contact form's, in theme.contact.css; the button is the outline button
        in theme.buttons.css, which is what the design uses everywhere else.

        page.php prints the_content() and nothing more, so a page whose content
        is only the [woocommerce_my_account] shortcode arrives with no panel
        around it. That is why the form ran edge to edge. The inset below is
        what holds it now.

        The classes are WooCommerce's and do change between versions. If this
        page ever looks bare after an update, this file is the first place to
        look.
    */

    .woocommerce-account .content-main > .woocommerce {
        padding: clamp( 40px, 5.73vw, 110px ) var(--nvm-content-inset) clamp( 50px, 7.64vw, 147px );
        color: var(--nvm-color-ink);
        font-family: var(--nvm-font-sans-serif);
    }

        .responsiville.woocommerce-account .content-main h2 {
            margin: 0 0 25px;
            color: var(--nvm-color-ink);
            font-size: clamp( 20px, 1.67vw, 24px );
            font-weight: 800;
            line-height: 1.3;
            text-align: left;
        }



/*********************

    THE LOGIN FORM

 *********************/

    /*
        Laid out like the contact form in theme.contact.css, which is the only
        other form the site draws: one label column, the field beside it, and
        the whole thing capped so the inputs do not run the width of a 1280
        grid for a username. The label column is the same clamp, so a visitor
        who has used one form recognises the other.

        The loose controls under the rows — remember me, the button, the lost
        password link — are not in a row of their own, so they are pushed over
        by the width of the label column to line up with the fields above.
    */

    .responsiville.woocommerce-account .woocommerce form.woocommerce-form-login {
        --nvm-account-label: clamp( 110px, 22%, 168px );
        --nvm-account-gap: 20px;

        max-width: min( 768px, 100% );
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 0;
    }

        .responsiville.woocommerce-account .woocommerce form .woocommerce-form-row {
            display: grid;
            grid-template-columns: var(--nvm-account-label) minmax( 0, 1fr );
            align-items: center;
            gap: 8px var(--nvm-account-gap);
            margin: 0 0 40px;
            padding: 0;
        }

        /*
            Placed by hand, both of them. Left to flow, the label landed in the
            second column and the field in the first — with `grid-auto-flow:
            row`, no `order`, no float and the label first in the DOM, which
            should not happen and which I could not account for. Naming the
            columns settles it either way, and is what the notices wrapper
            above needed for the same reason.
        */

        .responsiville.woocommerce-account .woocommerce form .woocommerce-form-row label {
            grid-column: 1;
            margin: 0;
            padding: 0;
            color: var(--nvm-color-ink);
            font-size: 16px;
            font-weight: 400;
            line-height: 1.25;
        }

        /* Drawn without a marker, as on the contact form; the fields still
           carry their own required attribute. */

        .responsiville.woocommerce-account .required {
            display: none;
        }

        /*
            The same field as the contact form: 50px tall, 4px radius, white on
            the sand ground. responsiville.moressette.css paints a striped
            background on `input:invalid`, which every required field is while
            it is empty, hence the explicit background here.
        */

        .responsiville.woocommerce-account input[type="text"].woocommerce-Input,
        .responsiville.woocommerce-account input[type="email"].woocommerce-Input,
        .responsiville.woocommerce-account input[type="password"].woocommerce-Input,
        .responsiville.woocommerce-account input[type="tel"].woocommerce-Input {
            grid-column: 2;
            width: 100%;
            height: 50px;
            margin: 0;
            padding: 0 16px;
            border: 0;
            border-radius: 4px;
            background: var(--nvm-color-white);
            color: var(--nvm-color-ink);
            font-family: var(--nvm-font-sans-serif);
            font-size: 16px;
        }

        .responsiville.woocommerce-account .woocommerce form .woocommerce-form-login__rememberme,
        .responsiville.woocommerce-account .woocommerce form .woocommerce-LostPassword {
            margin-left: calc( var(--nvm-account-label) + var(--nvm-account-gap) );
        }

        .responsiville.woocommerce-account .woocommerce form .woocommerce-form-login__rememberme {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 30px;
            font-size: 15px;
            font-weight: 400;
        }

            .responsiville.woocommerce-account .woocommerce form .woocommerce-form-login__rememberme input {
                flex: 0 0 auto;
                width: auto;
                height: auto;
                margin: 0;
            }

        /*
            The site's button is the outline one. These are the same
            declarations as `.nvm-button-outline` in theme.buttons.css, applied
            to the markup WooCommerce prints, which cannot be given that class
            from here.
        */

        .responsiville.woocommerce-account .woocommerce form button.woocommerce-form-login__submit,
        .responsiville.woocommerce-account button.woocommerce-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 270px;
            max-width: 100%;
            height: 40px;
            margin-left: calc( var(--nvm-account-label) + var(--nvm-account-gap) );
            padding: 0 20px;
            border: 1px solid var(--nvm-color-ink);
            border-radius: 4px;
            background: transparent;
            box-shadow: none;
            color: var(--nvm-color-ink);
            font-family: var(--nvm-font-sans-serif);
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            text-transform: uppercase;
            transition: 0.2s background-color ease-in, 0.2s color ease-in;
        }

        .responsiville.woocommerce-account .woocommerce form button.woocommerce-form-login__submit:hover,
        .responsiville.woocommerce-account button.woocommerce-button:hover {
            background: var(--nvm-color-ink);
            color: var(--nvm-color-white);
        }

        .responsiville.woocommerce-account .woocommerce form .woocommerce-LostPassword {
            margin-top: 24px;
            margin-bottom: 0;
            font-size: 15px;
        }

            .responsiville.woocommerce-account .woocommerce form .woocommerce-LostPassword a {
                color: var(--nvm-color-ink);
            }



/*************************************

    THE ACCOUNT ITSELF, ONCE IN

 *************************************/

    /*
        WooCommerce prints a list of links beside the panel they open. It is
        given the grid the rest of the site uses rather than the plugin's
        floats, which is also what stops the two from overlapping.
    */

    .laptop .woocommerce-account .woocommerce-MyAccount-navigation {
        float: none;
        width: auto;
    }

    .laptop .woocommerce-account .woocommerce-MyAccount-content {
        float: none;
        width: auto;
    }

    .laptop .woocommerce-account .content-main > .woocommerce:has( .woocommerce-MyAccount-navigation ) {
        display: grid;
        grid-template-columns: 220px 1fr;
        column-gap: 60px;
        align-items: start;
    }

        /*
            The three are placed by hand rather than left to flow.

            WooCommerce opens the panel with an empty notices wrapper, printed
            whether or not there is anything to say. As a grid item it took the
            first cell, which pushed the navigation into the second column and
            the panel onto a row of its own — in a 220px track, where the
            orders table could not fit and spilled out of it.
        */

        .laptop .woocommerce-account .woocommerce-notices-wrapper {
            grid-column: 1 / -1;
        }

        .laptop .woocommerce-account .woocommerce-MyAccount-navigation {
            grid-column: 1;
        }

        .laptop .woocommerce-account .woocommerce-MyAccount-content {
            grid-column: 2;
            /* A table refuses to shrink below its contents, and a grid item is
               `min-width: auto` by default, so without this the track is
               widened by the table instead of the table fitting the track. */
            min-width: 0;
        }

        .responsiville.woocommerce-account .woocommerce-MyAccount-navigation ul {
            display: block;
            margin: 0;
            padding: 0;
            list-style: none;
        }

            .responsiville.woocommerce-account .woocommerce-MyAccount-navigation li {
                margin: 0 0 14px;
                padding: 0;
                list-style: none;
            }

            .responsiville.woocommerce-account .woocommerce-MyAccount-navigation a {
                color: var(--nvm-color-ink);
                font-size: 16px;
                font-weight: 400;
                line-height: 1.375;
                text-decoration: none;
                border: none;
            }

            .responsiville.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
                font-weight: 700;
            }



/***********************

    ORDERS AND NOTICES

 ***********************/

    /*
        The tables WooCommerce prints — orders, downloads, addresses. Stripped
        back to a rule between rows, which is as much as the rest of the site
        draws.
    */

    .responsiville.woocommerce-account .woocommerce table.shop_table {
        width: 100%;
        margin: 0;
        border: none;
        border-collapse: collapse;
        border-radius: 0;
        font-family: var(--nvm-font-sans-serif);
        font-size: 16px;
    }

        .responsiville.woocommerce-account .woocommerce table.shop_table th {
            padding: 0 16px 12px 0;
            border: none;
            border-bottom: 1px solid var(--nvm-color-ink);
            background: none;
            color: var(--nvm-color-ink);
            font-size: 12px;
            font-weight: 700;
            text-align: left;
            text-transform: uppercase;
        }

        .responsiville.woocommerce-account .woocommerce table.shop_table td {
            padding: 18px 16px 18px 0;
            border: none;
            border-bottom: 1px solid var(--nvm-color-silver);
            background: none;
            color: var(--nvm-color-ink);
            vertical-align: middle;
        }

        /* The plugin grounds the table in white; it sits on the page's own
           colour instead, like every other table on the site. */

        .responsiville.woocommerce-account .woocommerce table.shop_table,
        .responsiville.woocommerce-account .woocommerce table.shop_table thead,
        .responsiville.woocommerce-account .woocommerce table.shop_table tbody,
        .responsiville.woocommerce-account .woocommerce table.shop_table tr {
            background: none;
        }

        /*
            The actions column stacks its buttons; they are the outline button
            at a size that suits a table row.
        */

        .responsiville.woocommerce-account .woocommerce table.shop_table td.woocommerce-orders-table__cell-order-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .responsiville.woocommerce-account .woocommerce table.shop_table .button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            height: 32px;
            margin: 0;
            padding: 0 14px;
            border: 1px solid var(--nvm-color-ink);
            border-radius: 4px;
            background: transparent;
            box-shadow: none;
            color: var(--nvm-color-ink);
            font-size: 11px;
            font-weight: 700;
            line-height: 1;
            text-transform: uppercase;
        }

        .responsiville.woocommerce-account .woocommerce table.shop_table .button:hover {
            background: var(--nvm-color-ink);
            color: var(--nvm-color-white);
        }

    /*
        WooCommerce's own notices, which arrive with a coloured top rule and a
        grey ground. Given the sand the rest of the site uses, and room to
        breathe — the markup puts a button inside the paragraph, which is why
        the two are laid out rather than left inline.
    */

    .responsiville.woocommerce-account .woocommerce-message,
    .responsiville.woocommerce-account .woocommerce-info,
    .responsiville.woocommerce-account .woocommerce-error {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px;
        margin: 0 0 30px;
        padding: 18px 20px;
        border: none;
        border-radius: 4px;
        /* Not the sand: that is the page's own background, so the notice
           would have no edges at all. White is what lifts it off. */
        background: var(--nvm-color-white);
        color: var(--nvm-color-ink);
        font-size: 15px;
        line-height: 1.45;
        list-style: none;
    }

        .responsiville.woocommerce-account .woocommerce-message::before,
        .responsiville.woocommerce-account .woocommerce-info::before,
        .responsiville.woocommerce-account .woocommerce-error::before {
            display: none;
        }

        .responsiville.woocommerce-account .woocommerce-message .button,
        .responsiville.woocommerce-account .woocommerce-info .button {
            flex: 0 0 auto;
            order: 2;
            height: 32px;
            min-width: 0;
            margin: 0;
            padding: 0 14px;
            border: 1px solid var(--nvm-color-ink);
            border-radius: 4px;
            background: transparent;
            color: var(--nvm-color-ink);
            font-size: 11px;
            font-weight: 700;
            line-height: 30px;
            text-transform: uppercase;
        }
