/* ==========================================================================
   Product Portfolio Page
   ========================================================================== */

/* Expand control alignment */
.app-product-portfolio-list-page .dt-control {
    vertical-align: middle;
}

/* Product family thumbnail */
.app-product-portfolio-list-page .family-thumbnail {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

/* Product family name */
.family-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
}

/* Buttons inside portfolio rows */
.app-product-portfolio-list-page a.btn-primary {
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    min-width: 9rem;
    line-height: 1;
}

/* Child row spacing */
table.product-overview tr[data-dt-row] > td[colspan] > div {
    margin-left: 0.65rem;
    margin-right: 0.65rem;
}

/* Border around the first-level expansion (family details + nested products table).
   Direct-child combinators keep this scoped to the top-level expansion row
   so the second-level nested expansion inside it is unaffected. */
#productPortfolioDataTable > tbody > tr[data-dt-row] > td[colspan] {
    padding: 0;
    box-shadow: 0 8px 12px -4px rgba(0, 0, 0, 0.18);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Pull the expansion row up the full 14px of row border-spacing so the
   border meets the parent row (overrides the generic -8px translate in
   datatable.css). Also reset the detail-panel's negative margin-top,
   which only existed to fake-close that same gap. */
#productPortfolioDataTable > tbody > tr[data-dt-row] {
    transform: translateY(-14px);
}

#productPortfolioDataTable > tbody > tr[data-dt-row] > td[colspan] > .detail-panel {
    margin-top: 0;
}

/* ==========================================================================
   Progress bars (quantity breakdown)
   ========================================================================== */
.portfolio-progress.progress {
    height: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f0f0f0;
}

.portfolio-progress .progress-bar {
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.5rem;
    transition: width 0.4s ease;
}

/* ==========================================================================
   Quantities bar legend (column header)
   ========================================================================== */
.quantities-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.quantities-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.quantities-legend .legend-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
}

.quantities-legend .legend-dot.delivered {
    background-color: var(--nedspice-orange);
}

.quantities-legend .legend-dot.pending {
    background-color: var(--nedspice-light-orange);
}

.quantities-legend .legend-dot.open {
    background-color: var(--nedspice-light-green);
}

