/*
 * SchoolDistricts styling for the websitesolutions/portfolio-provider pages.
 *
 * Ported from BJJWeb's provider.css (itself SheltersForHomeless -> RentAssistance ->
 * WICProgram -> Food-Banks.org): same package markup, same scoping. The rules below are
 * BJJWeb's verbatim; only the `--p1-*` tokens they read are re-pointed, just below, at this
 * site's own tokens from public/css/app-p3.css (navy ink, blue #1f5f8b accent, system sans),
 * with literal fallbacks for the admin layout, which does not load app-p3.css.
 *
 * WHY A STYLESHEET AND NOT PUBLISHED VIEWS: a published package view never receives the
 * package's later changes. So the package's own markup is restyled here and no package view
 * is published.
 *
 * Loaded ONLY on `pp.*` routes, by layouts/app.blade.php (public pages) and
 * layouts/app_admin.blade.php (admin queues). Every rule is scoped under a wrapper:
 *
 *   .pp-page       the container layouts/app wraps around every public pp.* page.
 *   .pp-dashboard  the package dashboard's wrapper.
 *   .pp-admin      the container layouts/app_admin wraps around pp.admin.* pages.
 *
 * Contrast: ink #1f2733 on white 15.2:1; ink-soft #566072 6.5:1; accent #1f5f8b 6.9:1, and
 * white on the accent 6.9:1.
 */

.pp-page,
.pp-dashboard,
.pp-admin {
    --p1-font: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    --p1-ink: var(--ink, #1f2733);
    --p1-ink-2: var(--ink-soft, #566072);
    --p1-muted: var(--ink-faint, #8792a3);
    --p1-line: var(--line, #e4e8ee);
    --p1-field-line: #b9c2cf;
    --p1-panel: var(--bg-soft, #f6f8fb);
    --p1-accent: var(--accent, #1f5f8b);
    --p1-accent-hover: var(--accent-dark, #16456a);
    --p1-selected: var(--accent-tint, #e8f1f8);
    --p1-radius: var(--radius-sm, 7px);
}

/* ------------------------------------------------------------------ page shell -- */

.pp-page {
    /* Also a .container (layouts/app), which supplies the side gutters. */
    padding-top: 28px;
    padding-bottom: 56px;
    overflow-wrap: anywhere;
}
/* [hidden] header links stay hidden whatever display a site rule gives them (signed-in.js). */
[data-pp-auth][hidden] { display: none !important; }

/* Reading width: forms and prose stay a comfortable column on wide screens. Works with
   or without the package's own wrapper div (changes/form has none). */
.pp-page > *,
.pp-page > .pp-auth > *,
.pp-page > .pp-suggest > *,
.pp-page > .pp-suggest-confirmed > *,
.pp-page > .pp-manage > * {
    max-width: 760px;
}

.pp-page h1 {
    font-family: var(--p1-font);
    font-size: 44px;
    line-height: 1.08;
    font-weight: 600;
    color: var(--p1-ink);
    margin: 0 0 14px;
}

.pp-page h2 {
    font-family: var(--p1-font);
    font-size: 24px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--p1-ink);
    margin: 26px 0 10px;
}

/* Sign-in extras the package renders since rc.4 ("Did not get it?" + "Send a new code",
   "Use my password instead"). Styled here rather than inline: the site override that used
   to add them is gone, and the package markup carries no style attributes. */
.pp-page .pp-resend-heading {
    font-family: var(--p1-font);
    font-size: 18px;
    font-weight: 600;
    color: var(--p1-ink);
    margin: 22px 0 6px;
}

.pp-page .pp-hint {
    color: var(--p1-ink-2);
    font-size: 14px;
}

.pp-page .pp-password {
    margin-top: 24px;
}

.pp-page .pp-password > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--p1-accent);
}

.pp-page .pp-password > form {
    margin-top: 12px;
}

.pp-page p {
    margin: 0 0 14px;
    color: var(--p1-ink-2);
    font-size: 16px;
}

.pp-page a {
    color: var(--p1-accent);
    font-weight: 600;
    /* The legacy style.min.css still sets `p a { font-style: italic }`. */
    font-style: normal;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pp-page a:focus-visible,
.pp-dashboard a:focus-visible {
    outline: 3px solid var(--p1-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

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

.pp-page form {
    background: #fff;
    border: 1px solid var(--p1-field-line);
    border-radius: 18px;
    padding: 26px;
    margin: 22px 0 18px;
    box-shadow: 0 14px 30px -24px rgba(29, 90, 126, .45);
}

.pp-page form p {
    margin: 0 0 18px;
}

.pp-page label {
    display: block;
    font-weight: 700;
    color: var(--p1-ink);
    font-size: 15px;
    margin: 0 0 7px;
}

/* "Is this ... open?" (package rc.8, the same question on every site): a radio group, not a
   box. Without this the browser's fieldset border framed it and each answer was a bold block
   label like a field name; here the legend reads like the field labels and each radio sits
   at its own size in front of its words. */
.pp-page fieldset.pp-status-report {
    border: 0;
    padding: 0;
    margin: 0 0 18px;
    min-width: 0;
}

.pp-page fieldset.pp-status-report legend {
    font-weight: 700;
    color: var(--p1-ink);
    font-size: 15px;
    padding: 0;
    margin: 0 0 7px;
}

.pp-page fieldset.pp-status-report label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    margin: 0 0 6px;
    cursor: pointer;
}

.pp-page fieldset.pp-status-report input[type=radio] {
    width: 18px;
    height: 18px;
    flex: none;
    margin: 0;
    padding: 0;
    float: none;
    accent-color: var(--p1-accent);
}

.pp-page input[type=text],
.pp-page input[type=email],
.pp-page input[type=password],
.pp-page input[type=tel],
.pp-page input[type=url],
.pp-page input:not([type]),
.pp-page select,
.pp-page textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    border: 1.5px solid var(--p1-field-line);
    border-radius: 12px;
    padding: 11px 14px;
    background: #fff;
    color: var(--p1-ink);
    font-size: 16px; /* 16px stops iOS zooming into the field */
    line-height: 1.4;
    outline: 0;
}

.pp-page textarea {
    min-height: 120px;
    resize: vertical;
}

/* One-line proposed values (package rc.5). They are <textarea rows="1"> because Firefox and
   Chrome autofill an address form built from <input>s with the VISITOR's own details, and do
   not autofill textareas (measured in both, 2026-10-06). They must still look and size like
   the inputs beside them: no resize handle, the input's height, growing with the text where
   the browser supports field-sizing (Chrome) and scrolling inside the box elsewhere. */
.pp-page textarea.pp-oneline {
    min-height: 48px;
    height: 48px;
    max-height: 160px;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    field-sizing: content;
}

@supports (field-sizing: content) {
    .pp-page textarea.pp-oneline {
        height: auto;
    }
}

.pp-page select {
    cursor: pointer;
}

.pp-page input::placeholder,
.pp-page textarea::placeholder {
    color: var(--p1-muted);
    opacity: 1;
}

.pp-page input:focus,
.pp-page select:focus,
.pp-page textarea:focus {
    border-color: var(--p1-accent);
    box-shadow: 0 0 0 3px rgba(29, 90, 126, .28);
}

/* The sign-in code: short, numeric, easy to read back. */
.pp-page #pp-code {
    max-width: 220px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 22px;
    letter-spacing: .25em;
}

.pp-page button {
    border: 0;
    background: var(--p1-accent);
    color: #fff;
    font-family: var(--p1-font);
    font-weight: 700;
    font-size: 16px;
    padding: 0 26px;
    border-radius: 12px;
    cursor: pointer;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;
}

.pp-page button:hover {
    background: var(--p1-accent-hover);
}

.pp-page button:focus-visible {
    outline: 3px solid var(--p1-ink);
    outline-offset: 2px;
}

/* changes/form ends with a bare <button>, not one inside a <p>. */
.pp-page form > button {
    margin-top: 4px;
}

/* --------------------------------------------------- per-field list (suggest/manage) -- */

.pp-page dl {
    margin: 0 0 8px;
}

.pp-page dt {
    margin: 0;
    padding-top: 18px;
    border-top: 1px solid var(--p1-panel);
}

.pp-page dt:first-child {
    padding-top: 0;
    border-top: 0;
}

.pp-page dd {
    margin: 0 0 18px;
}

/* "Currently: ..." -- what the listing says now, above the box for what it should say. */
/* The current value, as plain muted text: a filled box read as a disabled input. */
.pp-page .pp-current {
    display: block;
    margin: 0 0 6px;
    color: var(--p1-ink-2);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
}

/* ------------------------------------------------- status, help, error, captcha -- */

.pp-page .pp-help {
    display: block;
    color: var(--p1-ink-2);
    font-size: 14px;
    margin-top: 6px;
}

/* Field-level errors. changes/form prints its errors as class-less <span>s after the
   input, so those are matched by position as well. */
.pp-page .pp-error,
.pp-page form :is(input, select, textarea) ~ span:not([class]) {
    display: block;
    color: #9b2c2c;
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
}

/* Page-level messages: the package prints them as <p class="pp-error|pp-status">. */
.pp-page p.pp-error,
.pp-page p.pp-status,
.pp-dashboard p.pp-status {
    border-radius: 14px;
    padding: 14px 18px;
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.55;
}

.pp-page p.pp-error {
    background: #fff3f3;
    border: 1px solid #f0b8b8;
    color: #7a1c1c;
}

.pp-page p.pp-status,
.pp-dashboard p.pp-status {
    background: var(--p1-selected);
    border: 1px solid #bcd0db;
    color: var(--p1-accent-hover);
}

.pp-page .pp-warning {
    background: #f6ebd6;
    border: 1px solid #e8c98a;
    color: #8a5a12;
    border-radius: 14px;
    padding: 14px 18px;
}

/* Turnstile / hCaptcha: its own line, with room around it. The widget is a fixed 300px. */
.pp-page .cf-turnstile,
.pp-page .h-captcha {
    display: block;
    min-height: 65px;
    margin: 4px 0 20px;
}

/* --------------------------------------------------------- confirmation page -- */

.pp-page .pp-suggest-confirmed {
    background: #fff;
    border: 1px solid var(--p1-field-line);
    border-radius: 18px;
    padding: 28px;
    max-width: 760px;
}

.pp-page .pp-suggest-confirmed h1 {
    font-size: 34px;
}

.pp-page .pp-suggest-confirmed p:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------- dashboard (override) -- */
/* resources/views/vendor/portfolio-provider/dashboard/index.blade.php: plain package-style
   markup (no site button classes), so the cards and the one action are styled here. */

.pp-dashboard .pp-listing-card {
    background: #fff;
    border: 1px solid var(--p1-field-line);
    border-radius: 16px;
    padding: 22px 24px;
    margin: 0 0 16px;
    box-shadow: 0 6px 18px rgba(21, 41, 59, .05);
}

.pp-dashboard .pp-listing-card h2,
.pp-dashboard .pp-listing-card h3 {
    margin: 0 0 4px;
    font-size: 22px;
}

.pp-dashboard .pp-type {
    margin: 0;
    color: var(--p1-muted);
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

.pp-dashboard .pp-state {
    font-weight: 600;
    color: var(--p1-accent-hover);
}

.pp-dashboard .pp-note,
.pp-dashboard .pp-moved {
    background: var(--p1-panel);
    border-left: 3px solid #e0992e;
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--p1-ink-2);
}

/* The one action on a card: the site's primary button look (site.css primary button). */
.pp-dashboard .pp-listing-card a[href*="/edit?"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 9px;
    background: var(--p1-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.pp-dashboard .pp-listing-card a[href*="/edit?"]:hover {
    background: var(--p1-accent-hover);
    color: #fff;
}

.pp-dashboard .pp-listing-card a[href*="/edit?"]:focus-visible {
    outline: 3px solid var(--p1-ink);
    outline-offset: 2px;
}

.pp-dashboard .pp-history {
    margin-top: 36px;
}

.pp-dashboard .pp-history-next {
    color: var(--p1-ink-2);
    font-size: 14.5px;
}

.pp-dashboard > h2 {
    margin-top: 36px;
}

.pp-dashboard .pp-listing-card h2 a,
.pp-dashboard .pp-listing-card h3 a {
    color: var(--p1-ink);
    text-decoration: none;
}

.pp-dashboard .pp-listing-card h2 a:hover,
.pp-dashboard .pp-listing-card h3 a:hover {
    color: var(--p1-accent);
    text-decoration: underline;
}

.pp-dashboard .pp-listing-card p {
    margin: 10px 0 0;
}

.pp-dashboard .pp-listing-card--history {
    background: var(--p1-panel);
}

.pp-dashboard .pp-history-intro {
    margin: 8px 0 0;
}

.pp-dashboard .pp-changes {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--p1-field-line);
    border-radius: 14px;
    font-size: 15px;
}

.pp-dashboard .pp-changes th,
.pp-dashboard .pp-changes td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--p1-field-line);
    vertical-align: top;
    text-align: left;
}

.pp-dashboard .pp-changes th {
    font-weight: 700;
    color: var(--p1-ink);
    background: var(--p1-panel);
    white-space: nowrap;
}

.pp-dashboard .pp-changes tbody tr:last-child td {
    border-bottom: 0;
}

/* ------------------------------------------------------------------ mobile -- */

@media (max-width: 980px) {
    .pp-page {
        padding: 26px 24px 44px;
    }

    .pp-page h1 {
        font-size: 36px;
    }
}

@media (max-width: 560px) {
    .pp-page {
        padding: 22px 18px 36px;
    }

    .pp-page h1 {
        font-size: 30px;
    }

    /* Flat form on phones: the Turnstile widget is a fixed 300px, and a card's padding
       and border would push it past a 360px screen. */
    .pp-page form {
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        margin-top: 18px;
    }

    .pp-page button {
        width: 100%;
    }

    .pp-page #pp-code {
        max-width: 100%;
    }

    .pp-page .pp-suggest-confirmed {
        padding: 20px;
    }

    .pp-page .pp-suggest-confirmed h1 {
        font-size: 28px;
    }

    /* Stack the change list on phones instead of scrolling it sideways. */
    .pp-dashboard .pp-changes,
    .pp-dashboard .pp-changes tbody,
    .pp-dashboard .pp-changes tr,
    .pp-dashboard .pp-changes td {
        display: block;
        width: 100%;
    }

    .pp-dashboard .pp-changes thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .pp-dashboard .pp-changes tr {
        padding: 12px 14px;
        border-bottom: 1px solid var(--p1-field-line);
    }

    .pp-dashboard .pp-changes tbody tr:last-child {
        border-bottom: 0;
    }

    .pp-dashboard .pp-changes td {
        padding: 2px 0;
        border-bottom: 0;
    }

    .pp-dashboard .pp-changes td:first-child {
        font-weight: 700;
        color: var(--p1-ink);
    }

    /* The header row is hidden when stacked, so each value carries its own label. The
       columns are fixed by the dashboard override (Listing, Sent, Fields, Status). */
    .pp-dashboard .pp-changes td:nth-child(2)::before { content: "Sent: "; }
    .pp-dashboard .pp-changes td:nth-child(3)::before { content: "Fields: "; }
    .pp-dashboard .pp-changes td:nth-child(4)::before { content: "Status: "; }

    .pp-dashboard .pp-changes td::before {
        font-weight: 700;
        color: var(--p1-ink);
    }
}

/* ================================================================== ADMIN ==
 * pp.admin.* pages inside layouts/app_admin (Bootstrap 4.1). A light pass so the package's
 * bare tables, inputs and buttons read like the site's own admin screens, which use
 * Bootstrap's .table / .btn / .alert / .form-control. Values mirror Bootstrap 4.1.
 */

.pp-admin {
    padding-top: 8px;
    padding-bottom: 40px;
}

.pp-admin h1 {
    font-size: 1.75rem;
    font-weight: 500;
    margin: 0 0 .75rem;
}

.pp-admin h2 {
    font-size: 1.35rem;
    font-weight: 500;
    margin: 1.75rem 0 .6rem;
}

.pp-admin table {
    width: 100%;
    margin: .5rem 0 1rem;
    border-collapse: collapse;
    background: #fff;
}

.pp-admin th,
.pp-admin td {
    padding: .65rem .75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
    text-align: left;
}

.pp-admin thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    border-top: 0;
    white-space: nowrap;
}

.pp-admin tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, .03);
}

.pp-admin tbody tr.pp-drifted {
    background: #fff3cd;
}

.pp-admin input[type=text],
.pp-admin input:not([type]),
.pp-admin select,
.pp-admin textarea {
    display: inline-block;
    max-width: 100%;
    min-height: calc(2.25rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    vertical-align: middle;
}

.pp-admin input[type=text]:focus,
.pp-admin input:not([type]):focus,
.pp-admin select:focus,
.pp-admin textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25);
}

.pp-admin label {
    font-weight: 600;
    margin-right: .5rem;
}

/* Consecutive decision forms (approve, then reject, then withdraw) need air between
   them: changes/admin-show ends its approve form with a bare button. */
.pp-admin form + form {
    margin-top: 1.25rem;
}

/* A label on its own line above a wide input (reject / withdraw / note). */
.pp-admin form > p > label[for] {
    display: block;
}

.pp-admin form > p > input[type=text] {
    width: 32rem;
}

/* The decision form inside a table cell: note box above, buttons below. */
.pp-admin td form input[type=text] {
    width: 100%;
    min-width: 12rem;
    margin-bottom: .4rem;
}

.pp-admin input[type=checkbox] {
    width: 1.15rem;
    height: 1.15rem;
    vertical-align: middle;
}

.pp-admin button {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #007bff;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    color: #fff;
    background: #007bff;
    cursor: pointer;
    margin: 0 .25rem .25rem 0;
}

.pp-admin button:hover {
    background: #0069d9;
    border-color: #0062cc;
}

.pp-admin button:focus {
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .5);
}

.pp-admin button:disabled {
    opacity: .65;
    cursor: not-allowed;
}

/* Negative decisions look negative. */
.pp-admin button[value=rejected],
.pp-admin button[value=revoked],
.pp-admin form[action$="/reject"] button {
    color: #fff;
    background: #dc3545;
    border-color: #dc3545;
}

.pp-admin button[value=rejected]:hover,
.pp-admin button[value=revoked]:hover,
.pp-admin form[action$="/reject"] button:hover {
    background: #c82333;
    border-color: #bd2130;
}

.pp-admin form[action$="/withdraw"] button {
    color: #fff;
    background: #6c757d;
    border-color: #6c757d;
}

.pp-admin form[action$="/withdraw"] button:hover {
    background: #5a6268;
    border-color: #545b62;
}

.pp-admin p.pp-error,
.pp-admin p.pp-status,
.pp-admin p.pp-warning {
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}

.pp-admin p.pp-error {
    color: #721c24;
    background: #f8d7da;
    border-color: #f5c6cb;
}

.pp-admin p.pp-status {
    color: #155724;
    background: #d4edda;
    border-color: #c3e6cb;
}

.pp-admin p.pp-warning {
    color: #856404;
    background: #fff3cd;
    border-color: #ffeeba;
}

.pp-admin small.pp-warning {
    color: #856404;
}

.pp-admin .pp-inert {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 87.5%;
    color: #6c757d;
}

/* The suggestion queue's tabs, as Bootstrap nav-pills. */
.pp-admin .pp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: .5rem 0 1rem;
}

.pp-admin .pp-tab {
    display: inline-block;
    padding: .5rem 1rem;
    border-radius: .25rem;
    text-decoration: none;
}

.pp-admin .pp-tab:hover {
    background: #e9ecef;
}

.pp-admin .pp-tab--on,
.pp-admin .pp-tab--on:hover {
    color: #fff;
    background: #007bff;
}

@media (max-width: 767px) {
    .pp-admin table {
        display: block;
        overflow-x: auto;
    }

    .pp-admin form > p > input[type=text] {
        width: 100%;
    }
}

/* Every box fits the column on a phone (BJJWeb measured the inputs running 12px past it). */
.pp-page input,
.pp-page select,
.pp-page textarea {
    box-sizing: border-box;
    max-width: 100%;
}
