/* Found Jobs responsive layout fixes.
   This file is loaded by the public SEO partial and is also copied to public_html. */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.flex > *,
.grid > * {
    min-width: 0;
}

/* Header uses explicit layout rules because its semantic class names are not Tailwind utilities. */
.home-header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
    padding-top: 10px;
    padding-bottom: 10px;
}

.home-brand {
    display: flex !important;
    align-items: center;
    gap: 9px;
    min-width: 0;
    max-width: 100%;
    text-decoration: none;
}

.home-brand-mark {
    flex: 0 0 40px;
    width: 40px !important;
    height: 40px !important;
}

.home-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
}

.home-brand-title,
.home-brand-subtitle {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-brand-subtitle {
    white-space: nowrap;
}

.home-header-nav {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
}

.home-header-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    overflow-wrap: normal;
}

/* Show one search bar only: the dedicated bar below the header on mobile/tablet. */
.home-header-search {
    display: none !important;
    min-width: 0;
    width: 100%;
}

.home-mobile-search {
    display: block !important;
    width: 100%;
    max-width: 100%;
}

.home-mobile-search form,
.home-mobile-search [data-global-search] {
    display: flex;
    width: 100%;
    max-width: none;
    min-width: 0;
}

.home-mobile-search input {
    min-width: 0;
    width: 100%;
}

.home-mobile-search label {
    min-width: 0;
    flex: 1 1 auto;
}

.home-mobile-search button {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .home-header-nav .home-primary-link,
    .home-header-nav .home-secondary-link {
        display: none !important;
    }

    .home-header-nav .home-auth-action {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 8px 9px !important;
        font-size: 12px !important;
        line-height: 1.1;
    }

    main,
    main > section,
    main article,
    main aside {
        min-width: 0;
        max-width: 100%;
    }

    main .grid {
        min-width: 0;
    }

    main h1,
    main h2,
    main p,
    main a {
        overflow-wrap: break-word;
    }

    footer > div {
        min-width: 0;
        flex-wrap: wrap;
    }

    footer a {
        white-space: normal;
    }
}

@media (max-width: 360px) {
    .home-header-inner {
        gap: 6px;
        padding-inline: 12px !important;
    }

    .home-brand {
        gap: 7px;
    }

    .home-brand-mark {
        flex-basis: 36px;
        width: 36px !important;
        height: 36px !important;
    }

    .home-brand-subtitle {
        display: none !important;
    }

    .home-brand-title {
        font-size: 13px !important;
    }

    .home-header-nav {
        gap: 4px;
    }

    .home-header-nav .home-auth-action {
        padding-inline: 7px !important;
        font-size: 11px !important;
    }
}

@media (min-width: 768px) {
    .home-header-inner {
        grid-template-columns: minmax(170px, auto) minmax(0, 1fr);
        gap: 12px 18px;
    }

    .home-header-nav .home-primary-link {
        display: inline-flex !important;
    }

    .home-header-nav .home-secondary-link {
        display: none !important;
    }

    .home-header-search {
        display: none !important;
    }

    .home-mobile-search {
        display: block !important;
    }
}

@media (min-width: 1200px) {
    .home-header-inner {
        grid-template-columns: minmax(190px, auto) minmax(0, 1fr) minmax(260px, 340px);
        gap: 16px;
    }

    .home-header-search {
        display: block !important;
    }

    .home-header-search form,
    .home-header-search [data-global-search] {
        display: flex;
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .home-mobile-search {
        display: none !important;
    }

    .home-header-nav .home-secondary-link {
        display: inline-flex !important;
    }
}

/* Preserve deliberate table scrolling while preventing page-level overflow. */
.overflow-x-auto {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

pre,
code,
.prose,
.break-words {
    overflow-wrap: anywhere;
}
