/*
 * ECS Service Deployment State — pane styles.
 * Doc 32 batch-5 §27. Cluster cards containing service rows with
 * desired/running progress + deployment-status badge. No hex.
 */

.lp-pane {

    container-type: inline-size;
}

.lp-ecs-body { padding: 14px var(--lp-pane-pad-x); }

.lp-ecs-tag-footnote { margin: 0 0 8px; }

/* stripped 2026-05-27 — canonical lp-pane-* class now
   owned by embed/sd-embed.css. Restore by un-commenting
   if you need a deliberate per-pane override. */
/* .lp-pane-section-end {
    height: 2px;
    background: var(--lp-pane-amber-900);
    margin: 16px 0 0;
}
 */

/* stripped 2026-05-27 — canonical lp-pane-* class now
   owned by embed/sd-embed.css. Restore by un-commenting
   if you need a deliberate per-pane override. */
/* .lp-pane-subhead {
    background: var(--lp-pane-amber-100);
    color: var(--lp-pane-amber-900);
    padding: 8px var(--lp-pane-pad-x);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--lp-pane-divider);
}
 */

/* Filter chips. Padding above + below matches so the chip strip has
   equal breathing space against the divider above and the table
   below. */
.lp-ecs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 14px;
}

.lp-ecs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--lp-pane-bg);
    color: var(--lp-pane-ink);
    border: 1px solid var(--lp-pane-border);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.lp-ecs-chip:hover { background: var(--lp-pane-amber-50); border-color: var(--lp-pane-amber-300); }
.lp-ecs-chip[aria-pressed="true"] {
    background: var(--lp-pane-amber-300);
    border-color: var(--lp-pane-amber-700);
    color: var(--lp-pane-amber-900);
    font-weight: 600;
}

/* Cluster card — head is full-width, services are wrapped in
   .lp-pane-embedded-table-frame to keep them inset from pane edges. */
.lp-ecs-cluster {
    margin: 0 calc(-1 * var(--lp-pane-pad-x)) 12px;
}

.lp-ecs-cluster-head {
    background: var(--lp-pane-amber-100);
    color: var(--lp-pane-amber-900);
    padding: 10px var(--lp-pane-pad-x);
    margin-bottom: 12px;
    border-top: 2px solid var(--lp-pane-amber-900);
    border-bottom: 1px solid var(--lp-pane-divider);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.lp-ecs-cluster .lp-pane-embedded-table-frame {
    border: 1px solid var(--lp-pane-amber-700);
    border-radius: 6px;
    margin: 0 var(--lp-pane-pad-x);
    overflow: hidden;
}

.lp-ecs-cluster-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

.lp-ecs-cluster-meta {
    font-size: 11px;
    color: var(--lp-pane-amber-900);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Live-mode "deferred" note — replaces .lp-pane-embedded-table-frame
   when there are no service rows to render so the live card doesn't
   show a wide bordered box around a one-line message. */
.lp-ecs-deferred-note {
    margin-top: 6px;
    padding: 4px 0 0 16px;
    font-size: 11px;
    font-style: italic;
    color: var(--lp-pane-ink-faint);
}

/* Service row — sits inside .lp-pane-embedded-table-frame */
.lp-ecs-service {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto 14px;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--lp-pane-divider);
    cursor: pointer;
    background: var(--lp-pane-bg);
}

.lp-ecs-service:hover { background: var(--lp-pane-amber-50); }
.lp-ecs-service:last-child { border-bottom: 0; }
.lp-ecs-service[hidden] { display: none; }
.lp-ecs-service[aria-expanded="true"] { background: var(--lp-pane-detail-bg); }

.lp-ecs-service-dot {
    width: 10px; height: 10px; border-radius: 50%;
    align-self: center;
}

.lp-ecs-service-dot--ok       { background: var(--lp-pane-status-ok-ink); }
.lp-ecs-service-dot--warning  { background: var(--lp-pane-amber-700); }
.lp-ecs-service-dot--critical { background: var(--lp-pane-status-critical-ink); }

.lp-ecs-service-body { min-width: 0; }

.lp-ecs-service-name {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--lp-pane-ink);
    overflow-wrap: anywhere;
}

.lp-ecs-service-meta {
    font-size: 12px;
    color: var(--lp-pane-ink-dim);
    margin-top: 2px;
    line-height: 1.4;
}

.lp-ecs-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.lp-ecs-progress-track {
    width: 70px;
    height: 6px;
    background: var(--lp-pane-amber-100);
    border-radius: 3px;
    overflow: hidden;
}

.lp-ecs-progress-fill { height: 100%; background: var(--lp-pane-amber-700); border-radius: 3px; }
.lp-ecs-progress-fill--ok   { background: var(--lp-pane-status-ok-ink); }
.lp-ecs-progress-fill--crit { background: var(--lp-pane-status-critical-ink); }

.lp-ecs-progress-text {
    font-size: 12px;
    color: var(--lp-pane-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
}

.lp-ecs-status-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.lp-ecs-status-badge--ok       { background: var(--lp-pane-status-ok-bg);       color: var(--lp-pane-status-ok-ink); }
.lp-ecs-status-badge--warning  { background: var(--lp-pane-amber-200);          color: var(--lp-pane-amber-900); }
.lp-ecs-status-badge--critical { background: var(--lp-pane-status-critical-bg); color: var(--lp-pane-status-critical-ink); }

.lp-ecs-arrow { width: 14px; text-align: center; }

.lp-pane-chevron {
    display: block;
    color: var(--lp-pane-amber-700);
    transition: transform 150ms ease, color 120ms ease;
    transform-origin: center;
}

.lp-ecs-service:hover .lp-pane-chevron { color: var(--lp-pane-amber-900); }
.lp-ecs-service[aria-expanded="true"] .lp-pane-chevron { transform: rotate(90deg); }

.lp-ecs-detail {
    background: var(--lp-pane-amber-50);
    border-bottom: 1px solid var(--lp-pane-divider);
    padding: 12px 12px 14px 32px;
    font-size: 13px;
    color: var(--lp-pane-ink);
}

.lp-ecs-detail strong { color: var(--lp-pane-amber-900); font-weight: 600; }

.lp-ecs-detail-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--lp-pane-divider);
}

.lp-ecs-detail-list {
    margin: 6px 0 0 0;
    padding-left: 22px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: var(--lp-pane-ink);
}

.lp-ecs-detail-list li { padding: 2px 0; }

.lp-ecs-detail-event {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: var(--lp-pane-ink-dim);
    padding: 2px 0;
    line-height: 1.5;
}

@container (max-width: 520px) {
    .lp-ecs-body { padding: 12px 12px; }
/* stripped 2026-05-27 — canonical lp-pane-* class now
   owned by embed/sd-embed.css. Restore by un-commenting
   if you need a deliberate per-pane override. */
/*     .lp-pane-subhead { padding: 8px 12px; } */

    .lp-ecs-cluster { margin: 0 -12px 12px; }
    .lp-ecs-cluster-head { padding: 10px 12px; }
    .lp-ecs-cluster .lp-pane-embedded-table-frame { margin: 0 12px; }
    .lp-ecs-service {
        padding: 10px 10px;
        grid-template-columns: 10px minmax(0, 1fr) 14px;
        gap: 8px;
    }
    .lp-ecs-progress, .lp-ecs-status-badge {
        grid-column: 2;
        margin-top: 4px;
        align-self: start;
        justify-self: start;
    }
    .lp-ecs-detail { padding: 10px 10px 12px 28px; }
}

@media (max-width: 520px) {
    .lp-ecs-body { padding: 12px 12px; }
/* stripped 2026-05-27 — canonical lp-pane-* class now
   owned by embed/sd-embed.css. Restore by un-commenting
   if you need a deliberate per-pane override. */
/*     .lp-pane-subhead { padding: 8px 12px; } */

    .lp-ecs-cluster { margin: 0 -12px 12px; }
    .lp-ecs-cluster-head { padding: 10px 12px; }
    .lp-ecs-cluster .lp-pane-embedded-table-frame { margin: 0 12px; }
    .lp-ecs-service {
        padding: 10px 10px;
        grid-template-columns: 10px minmax(0, 1fr) 14px;
        gap: 8px;
    }
    .lp-ecs-progress, .lp-ecs-status-badge {
        grid-column: 2;
        margin-top: 4px;
        align-self: start;
        justify-self: start;
    }
    .lp-ecs-detail { padding: 10px 10px 12px 28px; }
}
