/* ============================================================
   Procurement Styles
   Dedicated styles for the Procurement and Contracting pages
   (solicitation cards and the solicitation detail page).
   ============================================================ */

/* Icon vertical alignment fix */
.pr-card i,
.pr-meta i,
.pr-status i,
.pr-fact i,
.pr-doc-item i,
.pr-section-heading i {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
}

/* Section Heading */
.pr-section-heading {
    display: flex;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #065D8F;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* ---------- Solicitation card ---------- */

.pr-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #ffffff;
    border-left: 4px solid #cbd5e1;
    transition: box-shadow 0.2s ease;
    margin-bottom: 1rem;
}

.pr-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Accent keyed to lifecycle stage, so a scan down the page reads at a glance.
   #94a3b8 measured 2.56:1 on #ffffff — fails even the 3:1 non-text/UI-boundary
   threshold, let alone 4.5:1. Reused the same #6b7684 used by
   .pr-deadline-passed below (4.62:1 on #ffffff) so "closed" has one audited
   grey instead of two near-identical ones. */
.pr-card-open { border-left-color: #065D8F; }
.pr-card-closingsoon { border-left-color: #b45309; }
.pr-card-closed { border-left-color: #6b7684; }
.pr-card-awarded { border-left-color: #15803d; }

.pr-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #10395B;
    margin-bottom: 0.35rem;
}

/* Solicitation number: monospaced so digits line up down a list. */
.pr-solicitation-no {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #10395B;
    background: rgba(6, 93, 143, 0.08);
    border: 1px solid rgba(6, 93, 143, 0.18);
    border-radius: 0.25rem;
    padding: 0.1rem 0.45rem;
    margin-bottom: 0.35rem;
}

/* ---------- Title / status header row ----------
   The title is a flex item with its own basis rather than a plain block, otherwise a long
   headline claims the whole row and pushes the status pill onto a line of its own. Below the
   basis it wraps, which is what we want on a phone. */

.pr-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.pr-heading-main {
    flex: 1 1 320px;
    min-width: 0;
}

.pr-heading-aside {
    flex: 0 0 auto;
}

/* ---------- Status pill ---------- */

.pr-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 2rem;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
}

/* Text colour is checked against the *composited* pill background (the rgba
   tint flattened onto the card's #ffffff), not against #ffffff itself — the
   two are close but not the same, and two of these four missed it:
     open:         #e6eff4 composited, #065D8F text -> 6.07:1  pass
     closingsoon:  #f6eae1 composited, #b45309 text -> 4.25:1  FAIL (needed darkening)
     closed:       #e9ecef composited, #475569 text -> 6.39:1  pass
     awarded:      #e3f0e8 composited, #15803d text -> 4.27:1  FAIL (needed darkening)
   Pill text is 11.2px bold (0.7rem/700) — too small for the large-text 3:1
   exemption, so 4.5:1 applies. Not caught by the scan because axe reads the
   nominal rgba() alpha, not always the flattened composite; the scanner only
   sees pages it crawled anyway. Darkened the two failing tokens only —
   .pr-deadline-urgent and the closingsoon/awarded left-border accents use the
   original #b45309/#15803d against plain #ffffff, where they already pass, so
   they were left alone. */
.pr-status-open { background: rgba(6, 93, 143, 0.1); color: #065D8F; }
.pr-status-closingsoon { background: rgba(180, 83, 9, 0.12); color: #a54c08; }
.pr-status-closed { background: rgba(100, 116, 139, 0.14); color: #475569; }
.pr-status-awarded { background: rgba(21, 128, 61, 0.12); color: #137538; }

/* ---------- Card meta row ---------- */

.pr-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.pr-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pr-meta-label {
    font-weight: 600;
    color: #475569;
}

/* Deadline emphasis once the window is short. */
.pr-deadline-urgent {
    font-weight: 700;
    color: #b45309;
}

/* #94a3b8 measured 2.56:1 on #ffffff (13px normal weight, needs 4.5:1) — the
   card this text lives in has an opaque `background: #ffffff` (line 37), so
   white is the only surface this ever renders on; confirmed no other .pr-card
   background exists in this file. #6b7684 is the lightest/most-muted value
   that still clears 4.5:1 with a safety margin (4.62:1) — deliberately not
   reusing .pr-meta's #64748b (4.76:1), which is only marginally darker but is
   the "regular" meta-text tone used elsewhere in this file; there is very
   little room between the passing floor (~4.55:1 at #6c7786) and #64748b, so
   this is close to the darkest a de-emphasised tone can be while still being
   visibly a step lighter than normal meta text. */
.pr-deadline-passed {
    color: #6b7684;
}

/* ---------- Detail page fact grid ---------- */

.pr-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.pr-fact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.65rem 0.85rem;
}

/* #64748b on the tinted fact-card surfaces (#f8fafc = 4.55:1, #f0f5f8 = 4.33:1)
   fails 4.5:1 at 11px bold — this text is small enough that the large-text
   3:1 threshold does not apply. Darkened to #5a6a7d: 5.29:1 on #f8fafc,
   5.04:1 on #f0f5f8 (the .pr-fact-deadline tint). Re-verify both surfaces
   if either background token changes. */
.pr-fact-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a6a7d;
    margin-bottom: 0.15rem;
}

.pr-fact-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #10395B;
    overflow-wrap: anywhere;
}

/* The submission deadline is the one date a vendor must not miss. */
.pr-fact-deadline {
    background: rgba(6, 93, 143, 0.06);
    border-color: rgba(6, 93, 143, 0.25);
}

/* ---------- Award notice ---------- */

.pr-award {
    border-left: 4px solid #15803d;
    background: rgba(21, 128, 61, 0.06);
    border-radius: 0.375rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}

/* ---------- Document list ---------- */

.pr-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: #ffffff;
    margin-bottom: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.pr-doc-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pr-doc-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pr-doc-size {
    font-size: 0.8125rem;
    color: #64748b;
    white-space: nowrap;
}

/* ---------- Contact block ---------- */

.pr-contact {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #065D8F;
    border-radius: 0.375rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 575.98px) {
    .pr-facts {
        grid-template-columns: 1fr;
    }

    .pr-doc-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}
