/* Page styles for tenders/my-bids.php — loaded where the page's <style> block used to be, so the cascade order is unchanged */
/* ── Bid card — matches tender-card layout ── */
.bid-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--spacing-xl);
    padding: var(--spacing-2xl);
    border: 1px solid var(--color-gray-200);
    background: var(--bg-white);
    align-items: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin-bottom: -1px;
}

.bid-card:hover {
    background: var(--bg-light);
}

.bid-row {
    display: contents;
}

.bid-info {
    min-width: 0;
}

.bid-name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    margin: 0 0 0.625rem;
    color: var(--color-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.bid-meta {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
}

.bid-meta-sep {
    color: var(--color-gray-300);
}

/* ── Status pill + stage dots ── */
.bid-status-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.bid-pill {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    cursor: help;
    border: 1px solid var(--border-color);
    background: var(--color-gray-100);
    color: var(--text-secondary);
}

.stage-dots {
    display: flex;
    gap: 0.25rem;
}

.stage-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5625rem;
    font-weight: 700;
    background: var(--color-gray-100);
    color: var(--color-gray-400);
}

.stage-dot.completed,
.stage-dot.accepted {
    background: var(--color-success);
    color: #fff;
}

.stage-dot.in-progress,
.stage-dot.pending,
.stage-dot.shortlisted {
    background: var(--color-warning);
    color: #fff;
}

.stage-dot.rejected {
    background: var(--color-danger);
    color: #fff;
}

/* ── Actions ── */
.bid-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.bid-expand-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.25rem;
    padding: 0.3rem 0.45rem;
    border: none;
    background: none;
    color: var(--color-gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.bid-expand-toggle i {
    font-size: 0.65rem;
    transition: transform 0.15s ease;
}

.bid-card.is-open .bid-expand-toggle i {
    transform: rotate(180deg);
}

.bid-expand-toggle:hover {
    color: var(--color-black);
}

/* ── Expandable details ── */
.bid-expand {
    grid-column: 1 / -1;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--color-gray-100);
}

.bid-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.bid-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bid-detail-full {
    grid-column: 1 / -1;
}

.bid-details-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem 1.5rem;
}

.bid-details-stats .detail-value {
    font-size: 1.0625rem;
    font-weight: 600;
}

.bid-detail-prose {
    max-width: 72ch;
    white-space: pre-wrap;
    line-height: 1.65;
}

.detail-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.detail-value {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: 1.5;
}

.detail-value a {
    color: var(--text-primary);
    text-decoration: underline;
}

/* ── Section headings ── */
.section-title-inline {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 2.5rem 0 1rem;
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title-inline i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .bid-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }

    .bid-name {
        white-space: normal;
        font-size: 1rem;
    }

    .bid-status-inline {
        justify-content: flex-start;
    }

    .bid-actions {
        justify-content: stretch;
    }

    .bid-actions .btn {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .bid-expand-toggle {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* Unread messages from the client on this bid */
.bid-pill.bid-unread-pill {
    cursor: pointer;
    text-decoration: none;
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.5);
    color: #854d0e;
}
