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

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

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



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

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

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



    /*
        A sheet that comes down from the top of the window, over a dimmed
        page, carrying FiboSearch.

        It is fixed because it is printed at the end of the document, far from
        the header that opens it — and because a reader who scrolls while it is
        open should find it still there.
    */

    .nvm-search-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 200;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        background: rgba( 35, 31, 32, 0 );
        transition: background-color 0.3s ease-in-out;
    }

    /*
        Closed, it must be gone — not merely transparent.

        The panel carries `hidden`, and a browser's own stylesheet turns that
        into display: none. But an author's rule beats a user agent's, so the
        `display: flex` above quietly cancelled it: a transparent sheet at
        z-index 200 lay across the whole window at all times and swallowed
        every click on the site.

        Stated here as an author rule of its own, with the attribute giving it
        the weight to win.
    */

    .nvm-search-panel[hidden] {
        display: none;
    }

    .nvm-search-panel.is-open {
        background: rgba( 35, 31, 32, 0.4 );
    }

        /* The sheet itself. It starts above the top edge and slides down, so
           the movement reads as the search arriving rather than fading in. */

        .nvm-search-panel__sheet {
            width: 100%;
            padding: clamp( 20px, 2.60vw, 50px ) var(--nvm-content-inset);
            background: var(--nvm-color-white);
            transform: translateY( -100% );
            transition: transform 0.3s ease-in-out;
        }

        .nvm-search-panel.is-open .nvm-search-panel__sheet {
            transform: translateY( 0 );
        }

            .nvm-search-panel__inner {
                display: flex;
                align-items: center;
                gap: 20px;
                max-width: var(--nvm-panel-medium-width);
                margin: 0 auto;
            }

                .nvm-search-panel__field {
                    flex: 1 1 auto;
                    min-width: 0;
                }

                .responsiville .nvm-search-panel__close {
                    flex: 0 0 auto;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 40px;
                    height: 40px;
                    padding: 0;
                    border: none;
                    border-radius: 0;
                    background: none;
                    color: var(--nvm-color-ink);
                    font-size: 28px;
                    line-height: 1;
                    cursor: pointer;
                    transition: color 0.2s ease-in-out;
                }

                .responsiville .nvm-search-panel__close:hover {
                    background: none;
                    color: var(--nvm-color-gold);
                }

    /* The page behind does not scroll while the sheet is open. */

    .nvm-search-open,
    .nvm-search-open body {
        overflow: hidden;
    }



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

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

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



    /*
        FiboSearch's own field, brought into the theme's language: square
        corners, Hauora, the ink and gold this site is drawn in.

        Only the frame is touched. The suggestions panel the plugin builds —
        its layout, its images, its headings — is left alone, because it is
        the plugin's job and it changes between versions.
    */

    .responsiville .nvm-search-panel .dgwt-wcas-search-wrapp {
        max-width: none;
    }

        .responsiville .nvm-search-panel .dgwt-wcas-search-form {
            margin: 0;
        }

        .responsiville .nvm-search-panel .dgwt-wcas-sf-wrapp {
            border: none;
            border-bottom: 1px solid var(--nvm-color-ink);
            border-radius: 0;
            background: none;
        }

            .responsiville .nvm-search-panel input.dgwt-wcas-search-input,
            .responsiville .nvm-search-panel input[type="search"].dgwt-wcas-search-input {
                height: auto;
                min-height: 0;
                padding: 0 0 12px;
                border: none;
                border-radius: 0;
                background: none;
                box-shadow: none;
                color: var(--nvm-color-ink);
                font-family: var(--nvm-font-sans-serif);
                font-size: clamp( 20px, 2.08vw, 40px );
                font-weight: 700;
                line-height: 1.375;
            }

            .responsiville .nvm-search-panel input.dgwt-wcas-search-input::placeholder {
                color: var(--nvm-color-silver);
                font-weight: 400;
            }

            /*
                No magnifier inside the sheet.

                FiboSearch places its submit button over the field, and with
                the frame stripped back to a single rule it landed across the
                placeholder — a lens sitting on the word "Search".

                It is not needed here: the sheet was opened by pressing a
                magnifier, the cursor is already in the field, and Enter still
                submits the form. The button is the only thing hidden; the
                form around it is untouched, so nothing about searching
                changes for anyone using a keyboard.
            */

            /*
                Written to outweigh the plugin, not merely to disagree with it.

                FiboSearch is running its "pirx" style, whose own rule is

                    .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp
                    button.dgwt-wcas-search-submit { display: flex }

                — three classes and an element. The first attempt here had
                three classes and no element, so it lost, and the lens stayed
                exactly where it was. Naming the wrapper and the element makes
                it four and one.
            */

            .responsiville .nvm-search-panel .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
                display: none;
            }

        /* The suggestions hang under the field rather than over the dimmed
           ground, which is where the plugin would otherwise put them. */

        .responsiville .nvm-search-panel .dgwt-wcas-suggestions-wrapp {
            border: 1px solid var(--nvm-color-sand-dark);
            border-radius: 0;
        }



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

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

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



    /* The theme's own search form, still used on the results page. */

    .search-form .search-button {
        font-family: var(--nvm-font-icons), var(--nvm-font-sans-serif);
    }

    .search-form .search-field {
        width: 20em;
        max-width: 75vw;
    }

    .search-form label {
        margin-left: 0.5em;
    }



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

    THE SEARCH ON THE 404 PAGE

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

    /*
        FiboSearch's pirx skin draws two backgrounds, one inside the other: a
        white card around the form and a grey pill on the input. The artboard
        has one white field, so the card keeps its white and the pill inside it
        goes, along with the plugin's 10px of padding and its 30px radius.

        The artboard's 60px height and 4px radius are kept; the 540px width
        comes from the wrapper around the shortcode, in the page's own content.

        Only the frame is touched. The suggestions panel the plugin builds is
        left alone, as above.
    */

    .responsiville.error404 .nvm-text .dgwt-wcas-search-form {
        margin: 0;
    }

    .responsiville.error404 .nvm-text .dgwt-wcas-sf-wrapp {
        padding: 0;
        border: none;
        border-radius: 4px;
        background: var(--nvm-color-white);
    }

        .responsiville.error404 .nvm-text input.dgwt-wcas-search-input,
        .responsiville.error404 .nvm-text input[type="search"].dgwt-wcas-search-input {
            height: 60px;
            min-height: 0;
            padding: 0 20px 0 56px;
            border: none;
            border-radius: 4px;
            background: none;
            box-shadow: none;
            color: var(--nvm-color-ink);
            font-family: var(--nvm-font-sans-serif);
            font-size: 16px;
        }

        .responsiville.error404 .nvm-text input.dgwt-wcas-search-input::placeholder {
            color: var(--nvm-color-silver);
        }

        /*
            The magnifier is positioned by the plugin against the padding its
            own card used to have. With that gone it sat too high, so it is
            centred on the field instead of being offset from the top.
        */

        .responsiville.error404 .nvm-text .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
            top: 50%;
            left: 16px;
            margin: 0;
            transform: translateY( -50% );
        }
