/* *******************************************************************************
 * Copyright (c) 2026 Contributors to the Eclipse Foundation
 *
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Apache License Version 2.0 which is available at
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * SPDX-License-Identifier: Apache-2.0
 * *****************************************************************************/

/* ---------------------------------------------------------------------------
 * Compact process-area overview tables (used in feature_and_process_status.rst)
 * ---------------------------------------------------------------------------*/

.compact-overview-wrapper {
    overflow-x: auto;
}

.compact-overview-table td:nth-child(1),
.compact-overview-table th:nth-child(1),
.compact-overview-table td:nth-child(5),
.compact-overview-table th:nth-child(5),
.compact-overview-table td:nth-child(6),
.compact-overview-table th:nth-child(6) {
    text-align: center;
    vertical-align: middle;
}

.compact-overview-table {
    width: 100%;
    table-layout: fixed;
    max-width: 100%;
}

.compact-overview-table td {
    width: 33%;
    overflow: hidden;
}

.compact-overview-table td:has(img[id^="needpie-"]) {
    vertical-align: middle;
    text-align: center;
}

/* Override the fixed pixel size sphinx-needs writes into the img attributes */
.small-pie-cell img,
.compact-overview-table td img,
img[id^="needpie-"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* ---------------------------------------------------------------------------
 * Module phase tracker table (also used in feature_and_process_status.rst)
 * ---------------------------------------------------------------------------*/

.module-phase-tracker-table td,
.module-phase-tracker-table th {
    vertical-align: middle;
    white-space: nowrap;
}

.module-phase-tracker-table td:first-child {
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
 * Wide content area: pages that opt in via a `wide-content-page` body class
 * get a full-width article container.
 * ---------------------------------------------------------------------------*/

body.wide-content-page .bd-content .bd-article-container {
    max-width: 100%;
}

/* ---------------------------------------------------------------------------
 * Process-area cards (used in roadmap.rst — Qualifiable State section)
 * ---------------------------------------------------------------------------*/

.card-pa-grey {
    background-color: #e8e8e8 !important;
    border-color: #c8c8c8 !important;
    font-size: 0.82rem;
}

.card-pa-grey .sd-card-header {
    background-color: #e8e8e8 !important;
    border-color: #c8c8c8 !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
}

.card-pa-grey .sd-card-body {
    background-color: #e8e8e8 !important;
    color: #444;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
}

/* Thin border around each process-area grid group (Management / Development / Support) */
.score-grid {
    border: 1px solid #c0c8d4;
    border-radius: 6px;
    padding: 0.6rem 0.6rem 0.2rem 0.6rem;
    margin-bottom: 1.2rem;
}

/* Compact card grid (Management section) — approximately half the visual size */
.score-grid-compact .sd-card {
    min-height: unset;
}

.score-grid-compact .sd-card-header {
    padding: 0.2rem 0.35rem !important;
    font-size: 0.68rem !important;
}

.score-grid-compact .sd-card-body {
    padding: 0.2rem 0.35rem !important;
    font-size: 0.62rem !important;
}

/* Highlighted process-area cards (Requirements Engineering, Architecture Design,
   Implementation, Verification) */
.card-pa-highlight {
    background-color: #1a5fa8 !important;
    border-color: #134a87 !important;
    font-size: 0.82rem;
}

.card-pa-highlight .sd-card-header {
    background-color: #1a5fa8 !important;
    border-color: #134a87 !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    color: #ffffff !important;
}

.card-pa-highlight .sd-card-header a,
.card-pa-highlight .sd-card-header a:visited {
    color: #ffffff !important;
}

.card-pa-highlight .sd-card-body {
    background-color: #1a5fa8 !important;
    color: #e8f0fc !important;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
}

/* ---------------------------------------------------------------------------
 * Landing-page grid cards (docs/index.rst): white text, original background.
 * ---------------------------------------------------------------------------*/

.landing-grid .sd-card *,
.landing-grid .sd-card a,
.landing-grid .sd-card a:visited,
.landing-grid .sd-card a:hover {
    color: #ffffff !important;
}

/* ---------------------------------------------------------------------------
 * RST line-blocks inside list-tables (used in overall_status.rst PA cells):
 * Sphinx wraps the indented "| ..." continuation in a <blockquote>, which
 * adds a left border and a tinted background. Inside a status table we want
 * those secondary lines (test counts, coverage values, links) to look like
 * regular text — same color, no border, no inset background.
 * ---------------------------------------------------------------------------*/

table.docutils blockquote,
table blockquote {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

table.docutils blockquote > div,
table blockquote > div {
    margin: 0 !important;
    padding: 0 !important;
}

table.docutils .line-block,
table .line-block {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

table.docutils .line-block .line,
table .line-block .line {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* ---------------------------------------------------------------------------
 * Platform Verification Report admonition (overall_status.rst PA5):
 * make this single project-wide deliverable visually prominent.
 * ---------------------------------------------------------------------------*/

.admonition.platform-ver-report {
    font-size: 1.15rem;
    border-left: 6px solid #1a5fa8;
    background-color: #eef4fb;
    padding: 0.8rem 1rem;
    margin: 1.2rem 0;
}

.admonition.platform-ver-report > .admonition-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a5fa8;
    margin-bottom: 0.3rem;
}

.admonition.platform-ver-report p {
    margin: 0;
    font-size: 1.1rem;
}

/* ---------------------------------------------------------------------------
 * Process / Implementation status headings (overall_status.rst):
 * make rubric headings visually larger, and render the implementation
 * status as a single inline row with a progress bar.
 * ---------------------------------------------------------------------------*/

p.rubric.status-heading,
.rubric.status-heading {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    color: #1a5fa8;
}

.impl-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a5fa8;
    margin: 1.2rem 0 0.8rem 0;
}

.impl-status-row .impl-status-label {
    white-space: nowrap;
}

.impl-status-row .impl-status-icon {
    font-size: 1.25rem;
}

.impl-status-row .impl-status-percent {
    min-width: 3.5rem;
    text-align: right;
}

.impl-status-row .impl-status-bar {
    flex: 1 1 200px;
    min-width: 160px;
    max-width: 360px;
    height: 14px;
    background-color: #e3e8ef;
    border: 1px solid #c0c8d4;
    border-radius: 7px;
    overflow: hidden;
}

.impl-status-row .impl-status-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a5fa8 0%, #4a90d9 100%);
    border-radius: 6px 0 0 6px;
}

.impl-status-row .impl-status-detail {
    font-size: 1rem;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
}
