/* ============================================================
   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. */
.pr-card-open { border-left-color: #065D8F; }
.pr-card-closingsoon { border-left-color: #b45309; }
.pr-card-closed { border-left-color: #94a3b8; }
.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;
}

.pr-status-open { background: rgba(6, 93, 143, 0.1); color: #065D8F; }
.pr-status-closingsoon { background: rgba(180, 83, 9, 0.12); color: #b45309; }
.pr-status-closed { background: rgba(100, 116, 139, 0.14); color: #475569; }
.pr-status-awarded { background: rgba(21, 128, 61, 0.12); color: #15803d; }

/* ---------- 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;
}

.pr-deadline-passed {
    color: #94a3b8;
}

/* ---------- 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;
}

.pr-fact-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    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;
    }
}
