﻿html {
    height: 100%;
}

body {
    background-color: var(--colorNeutralBackground3);
    color: var(--colorNeutralForeground1);
    color-scheme: light dark;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    max-height: 54px;
    background-color: var(--colorNeutralBackground1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 0 1em;
    position: sticky;
    top: 0;
    z-index: 99;
}

/* New homepage: white body, gray header, gray footer */
body.new-homepage {
    background-color: var(--colorNeutralBackground1, #ffffff);
}

body.new-homepage > header {
    background-color: var(--colorNeutralBackground3, #f3f2f1);
    border-bottom: 1px solid var(--colorNeutralStroke2, #e5e5e5);
}

/* header .inner is display:block containing two FLOATED children
   (.push-left / .push-right, see below) - floats align to the TOP of
   their containing block, so .push-right never vertically centers.
   .push-left only looked correct because it independently sets its own
   display:flex; align-items:center. This float/block mismatch existed
   before too (~1.5px, invisible) but became a visible 9px offset once
   the header-logo-lockup chip grew .push-left from ~24px to 40px tall.
   Making .inner itself a flex container centers both children exactly;
   justify-content: space-between reproduces the same left/right split
   the floats produced, so no horizontal layout changes.
   Scoped to the new UX only (legacy header is feature-flagged and being
   retired untouched per this session's earlier decision) - legacy .inner
   keeps its milder, visually-imperceptible version of this same bug.
   .push-left/.push-right's float declarations below are left in place:
   legacy's .inner is still display:block and still needs them: they
   simply become inert (floats are ignored on flex items) for this
   new-homepage .inner. */
body.new-homepage > header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.new-homepage > footer {
    background-color: var(--colorNeutralBackground3, #f3f2f1);
    border-top: 1px solid var(--colorNeutralStroke2, #e5e5e5);
    padding-left: max(1em, calc((100% - 1200px) / 2));
    padding-right: max(1em, calc((100% - 1200px) / 2));
}
    header img {
        height: 24px;
    }
    header fluent-link {
        margin: 0 var(--spacingHorizontalL);
    }
    header .push-left {
        float: left;
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    header .push-right {
        float: right;
    }

.header-logo-text {
    padding-left: var(--spacingVerticalM);
    padding-right: var(--spacingVerticalM);
    text-align: center;
    font-size: var(--fontSizeBase500);
    font-weight: var(--fontWeightSemibold);
    line-height: 24px;
    letter-spacing: -0.2px;
}

/* Logo + wordmark treated as one accessible unit (role="img" + aria-label on
   this wrapper, children aria-hidden) so the accessible name survives the
   mobile breakpoint even after .header-logo-text is visually hidden below. */
.header-logo-lockup {
    display: flex;
    align-items: center;
}

/* The Visual Studio wordmark (visualstudio-logo.png) is a wide horizontal
   lockup - 2872x301px, ~9.54:1 - not the square icon the generic
   `header img { height: 24px }` rule above was written for. At 24px tall
   it renders ~229px wide, noticeably wider than legacy's left-side content
   (a 24px square icon + two short text runs) and risks crowding
   .push-right's three nav links before the <768px breakpoint hides the
   text. Scoping it down to 20px tall here (~191px wide) keeps this
   lockup's total width in the same range as legacy's, without touching
   the generic `header img` rule legacy's vscode.png still relies on. */
.header-logo-lockup img {
    height: 20px;
    /* Legacy's img-to-separator gap comes from .header-logo-text's own
       padding-right (var(--spacingVerticalM), 12px) since a text div sits
       between the image and the separator there. Our lockup puts the
       separator directly after a bare <img> (margin:0, padding:0), so
       without this the gap collapses to just the separator's own 4px
       margin-left - 4px left of the bar vs 16px right of it. Matching the
       same var(--spacingVerticalM) token .header-logo-text already uses
       (rather than a literal 12px) keeps this deliberately in lockstep
       with that neighbouring rule - yes, it's a "Vertical" token used
       horizontally, but that inconsistency is pre-existing there, and
       retuning the token later should move both gaps together. */
    margin-right: var(--spacingVerticalM);
}

.vertical-seperator {
    border-left: 1px solid var(--colorNeutralForeground1);
    color-scheme: light dark;
    margin: 0 0.25em;
}

h1 {
    margin: 0;
    font-size: var(--fontSizeHero900);
    font-weight: var(--fontWeightSemibold);
    line-height: var(--lineHeightHero900);
}

h2 {
    font-size: var(--fontSizeHero700);
    font-weight: var(--fontWeightSemibold);
    line-height: var(--lineHeightHero800);
}

h3 {
    font-size: var(--fontSizeBase600);
    font-weight: var(--fontWeightSemibold);
    line-height: var(--lineHeightBase600);
    margin-block-end: var(--spacingVerticalS);
}

p {
    font-size: var(--fontSizeBase400);
    font-weight: var(--fontWeightRegular);
    line-height: var(--lineHeightBase500);
}

ul {
    list-style-type: none;
    padding: var(--spacingVerticalS) 0 0 var(--spacingHorizontalS);
    margin: 0;
}

section {
    padding-bottom: var(--spacingVerticalXXXL);
}
    section .subtitle {
        margin: 0 0 2em 0;
    }



/* Accessibility: Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.content {
    box-sizing: border-box;
    margin-bottom: var(--spacingVerticalXXL);
    display: flex;
    flex: 1;
    justify-content: center;
    padding: 0 1em;
}
.inner {
    width: 100%;
    max-width: 1200px;
}

.welcome {
    padding: calc(var(--spacingVerticalXXXL) * 2) 0;
}

#copy-success-message {
    visibility: hidden;
    padding-left: var(--spacingHorizontalM);
    color: var(--colorNeutralForeground3);
}

.service-url-textbox {
    align-items: center;
    background-color: var(--colorNeutralBackground1);
    border: var(--strokeWidthThick) solid var(--colorNeutralStroke1);
    border-radius: calc(var(--borderRadiusXLarge) * 2);
    box-sizing: border-box;
    height: 72px;
    display: inline-flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--spacingHorizontalXXS);
    padding: 0 var(--spacingHorizontalM) 0 var(--spacingHorizontalXL);
    position: relative;
    width: 100%;
    max-width: 700px;
}

#service-url-textbox-text {
    width: 100%;
    margin-left: var(--spacingHorizontalS);
}

.inline-icon {
    vertical-align: middle;
    margin-right: var(--spacingHorizontalXS)
}

.truncate-text {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

/* Connect dialog */
.connect-url-row {
    display: flex;
    align-items: center;
    gap: var(--spacingHorizontalS);
    margin-top: var(--spacingVerticalXS);
}

.connect-url-input {
    flex: 1;
    font-family: inherit;
    font-size: var(--fontSizeBase300);
    padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    background-color: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground1);
    min-width: 0;
}

.connect-panel-content {
    padding: var(--spacingVerticalM) 0;
}

.connect-panel-content label {
    font-weight: var(--fontWeightSemibold);
    font-size: var(--fontSizeBase300);
}

.connect-instructions {
    font-size: var(--fontSizeBase300);
    color: var(--colorNeutralForeground2);
    margin: var(--spacingVerticalS) 0;
}

/* Legacy accordion style (kept for _HomepageLegacy) */
.no-padding-accordion {
    margin: 0 calc(var(--spacingHorizontalM) * -1);
}


.details-header {
    font-size: var(--fontSizeBase600);
    font-weight: var(--fontWeightSemibold);
    line-height: var(--lineHeightBase600);
}

.details-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    align-content: flex-start;
    gap: var(--spacingHorizontalM);
    padding-top: var(--spacingVerticalS);
    margin-bottom: var(--spacingVerticalXXXL);
}

.details-container-item {
    background-color: var(--colorNeutralBackground1);
    border-radius: var(--borderRadiusMedium);
    border: 1px solid var(--colorNeutralStrokeAlpha);
    padding: var(--spacingVerticalM);
    flex-basis: 30%;
    min-width: 256px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-content: stretch;
}
    .details-container-item h4 {
        display: inline-block;
        font-size: var(--fontSizeBase500);
        font-weight: var(--fontWeightSemibold);
        line-height: var(--lineHeightBase500);
    }
    .details-container-item p {
        margin-bottom: 0;
        color: var(--colorNeutralForeground2);
    }
    .details-container-item .health-status {
        float: right;
    }
.details-container-subtitle {
    display: block;
}

/* Card grid — matches reference design */
.card-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: var(--spacingVerticalXXXL);
}

.card-grid.two-up {
    grid-template-columns: 1fr 1fr;
}

.card-grid.three-up {
    grid-template-columns: 1fr 1fr 1fr;
}

.info-card {
    border: 1px solid var(--colorNeutralStrokeAlpha);
    border-radius: var(--borderRadiusMedium);
    padding: 10px 12px;
    background: var(--colorNeutralBackground1);
}

.info-card h3 {
    margin: 0 0 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: var(--fontSizeBase300);
    font-weight: var(--fontWeightSemibold);
    line-height: var(--lineHeightBase300);
}

.info-card p {
    margin: 0;
    color: var(--colorNeutralForeground2);
    font-size: var(--fontSizeBase300);
}

.info-card-metadata {
    display: grid;
    gap: 4px;
    margin: 8px 0 0;
}

.info-card-metadata div {
    display: grid;
    grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
    gap: 12px;
}

.info-card-metadata dt {
    color: var(--colorNeutralForeground2);
    font-size: var(--fontSizeBase300);
    font-weight: var(--fontWeightSemibold);
}

.info-card-metadata dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--colorNeutralForeground2);
    font-size: var(--fontSizeBase300);
}

.health-badge {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    line-height: 1;
}

.ok-badge {
    background: var(--colorPaletteGreenBackground3, #107C10);
}

.warn-badge {
    background: var(--colorPaletteYellowBackground3, #C4A000);
}

.error-badge {
    background: var(--colorPaletteRedBackground3, #B10E1C);
}

.extensions-header {
    text-align: center;
    margin-block-end: 1.5em;
}

.extensions-table {
    border-collapse: collapse;
    text-align: left;
    background-color: var(--colorNeutralBackground1);
    --border: 1px solid var(--colorNeutralBackground3Pressed);
    border-radius: var(--borderRadiusXLarge);
    border-spacing: 0;
    border-collapse: separate;
    border: var(--border);
    overflow: hidden;
    width: 100%;
    box-shadow: var(--shadow4);
}
    .extensions-table thead {
        font-size: var(--fontSizeBase500);
        font-weight: var(--fontWeightSemibold);
        line-height: var(--lineHeightBase500);
    }
    .extensions-table thead tr {
        font-size: var(--fontSizeBase500);
        font-weight: var(--fontWeightSemibold);
        line-height: var(--lineHeightBase500);
    }
        .extensions-table thead th:hover {
            background-color: var(--colorNeutralBackground2Hover);
        }
        .extensions-table thead th[aria-sort="descending"] span::after {
            content: ' ';
            background-color: var(--colorNeutralForeground1);
            width: 16px;
            height: 16px;
            mask-image: url("../static/chevron-up.svg");
            top: 6px;
            position: relative;
            float: right;
        }
        .extensions-table thead th[aria-sort="ascending"] span::after {
            content: ' ';
            background-color: var(--colorNeutralForeground1);
            width: 16px;
            height: 16px;
            mask-image: url("../static/chevron-down.svg");
            top: 6px;
            position: relative;
            float: right;
        }

    .extensions-table th,
    .extensions-table td {
        padding: 8px 14px;
    }
    .extensions-table td {
        font-size: var(--fontSizeBase300);
    }
    .extensions-table th {
        font-size: var(--fontSizeBase400);
        font-weight: var(--fontWeightSemibold);
        line-height: var(--lineHeightBase500);
        border-bottom: var(--border);
    }

    .extensions-table td:not(:last-child),
    .extensions-table th:not(:last-child) {
        border-right: var(--border);
    }
    .extensions-table > thead > tr:not(:last-child) > th,
    .extensions-table > thead > tr:not(:last-child) > td,
    .extensions-table > tbody > tr:not(:last-child) > th,
    .extensions-table > tbody > tr:not(:last-child) > td,
    .extensions-table > tfoot > tr:not(:last-child) > th,
    .extensions-table > tfoot > tr:not(:last-child) > td,
    .extensions-table > tr:not(:last-child) > td,
    .extensions-table > tr:not(:last-child) > th,
    .extensions-table > thead:not(:last-child),
    .extensions-table > tbody:not(:last-child),
    .extensions-table > tfoot:not(:last-child) {
        border-bottom: var(--border);
    }

footer {
    padding: 0 1em;
    max-height: 54px;
    background-color: var(--colorNeutralBackground5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    font-size: var(--fontSizeBase300);
    line-height: var(--lineHeightBase200);
    font-weight: var(--fontWeightRegular);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 99;
}

/* New homepage: flat, squared table to match reference design */
body.new-homepage .extensions-table {
    border-radius: 0;
    box-shadow: none;
    border-collapse: separate;
}

body.new-homepage fluent-table {
    display: block;
    box-shadow: none;
}

.catalog-empty-msg {
    text-align: center;
    padding: 1.5rem;
    color: var(--colorNeutralForeground3, #605e5c);
    font-style: italic;
}

footer .right {
    float: right;
    text-align: center;
    margin-right: 1.75em
}

footer .left {
    float: left;
    text-align: center;
}

footer fluent-link {
    margin-right: var(--spacingHorizontalXXL);
}

.footer-feature-flags {
    font-size: var(--fontSizeBase200);
    color: var(--colorNeutralForeground2, #525252);
    margin-left: auto;
    padding-right: 1em;
}

/* ── New homepage layout (page / zones / tiles) ── */

.page {
    box-sizing: border-box;
    width: 100%;
    padding: 24px 1em;
}

.page-intro {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--colorNeutralStroke2, #e5e5e5);
}

.page-title {
    font-size: 34px;
    font-weight: 600;
    margin: 0 0 4px;
}

.page-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 28px;
    background: var(--colorBrandBackground, #005a9e);
    margin-right: 12px;
    vertical-align: -5px;
    border-radius: 2px;
}

.page-tagline {
    color: var(--colorNeutralForeground2, #525252);
    font-size: 15px;
    margin: 0 0 12px;
}

.page-zone {
    border: 1px solid var(--colorNeutralStroke2, #e5e5e5);
    border-radius: 2px;
    padding: 18px 20px;
    background: var(--colorNeutralBackground1, #ffffff);
}

.info-zone {
    margin-bottom: 16px;
    padding: 12px 16px;
}

.catalog-zone {
    padding: 18px 20px;
}

.catalog-zone > h2 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

/* Collapse empty tab panels — content is rendered outside the tabs component */
.catalog-zone fluent-tab-panel {
    padding: 0;
    overflow: hidden;
    max-height: 0;
}

/* Space between the tab strip and the table below */
.catalog-zone #catalog-tabs {
    margin-block-end: 16px;
}

/* Catalog switcher — centered button group */
.catalog-switcher {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.catalog-btn {
    padding: 6px 24px;
    border: 1px solid var(--colorNeutralStroke1, #cccccc);
    background: var(--colorNeutralBackground1, #ffffff);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: var(--colorNeutralForeground1, #242424);
    transition: background 0.15s, border-color 0.15s;
}

.catalog-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.catalog-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.catalog-btn.is-active {
    background: var(--colorBrandBackground, #0078d4);
    color: var(--colorNeutralForegroundOnBrand, #ffffff);
    border-color: var(--colorBrandBackground, #0078d4);
}

.catalog-btn:hover:not(.is-active) {
    background: var(--colorNeutralBackground3, #f5f5f5);
}

.info-header h2 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

/* Tile strips */
.tile-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.tile-strip-url {
    margin-bottom: 8px;
}

/* Base tile */
.tile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--colorNeutralStroke1, #cccccc);
    border-radius: 6px;
    background: var(--colorNeutralBackground1, #ffffff);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    color: inherit;
}

.tile:hover {
    border-color: var(--colorBrandBackground, #005a9e);
    background: var(--colorNeutralBackground3, #f3f2f1);
}

.tile-label {
    font-weight: 600;
}

.tile-sub {
    color: var(--colorNeutralForeground2, #525252);
}

/* Status tile (button variant) */
.tile-status {
    flex: 1;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tile-status[aria-expanded="true"] {
    border-color: var(--colorBrandBackground, #005a9e);
    box-shadow: inset 0 -2px 0 var(--colorBrandBackground, #005a9e);
    background: var(--colorNeutralBackground3, #f3f2f1);
}

/* URL tile */
.tile-url {
    flex: 1 1 100%;
    cursor: default;
    gap: 6px;
}

.tile-url:hover {
    border-color: var(--colorNeutralStroke1, #cccccc);
    background: var(--colorNeutralBackground1, #ffffff);
}

.tile-url-label {
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tile-url-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    color: inherit;
    min-width: 0;
    outline: none;
}

.tile-icon {
    display: inline-flex;
    align-items: center;
    color: var(--colorNeutralForeground2, #525252);
}

.copy-button {
    padding: 2px 10px;
    border: 1px solid var(--colorNeutralStroke1, #cccccc);
    border-radius: 4px;
    background: var(--colorNeutralBackground1, #ffffff);
    font-size: 11px;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    white-space: nowrap;
}

.copy-button:hover {
    background: var(--colorNeutralBackground3, #f3f2f1);
    border-color: var(--colorBrandBackground, #005a9e);
}

/* Status dots */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot-green {
    background: var(--colorPaletteGreenBackground3, #107c10);
    box-shadow: 0 0 0 2px rgba(16, 124, 16, 0.2);
}

.status-dot-yellow {
    background: var(--colorPaletteYellowBackground3, #C4A000);
    box-shadow: 0 0 0 2px rgba(196, 160, 0, 0.2);
}

.status-dot-red {
    background: var(--colorPaletteRedBackground3, #B10E1C);
    box-shadow: 0 0 0 2px rgba(177, 14, 28, 0.2);
}

/* Chevron indicator */
.chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--colorNeutralForeground3, #8a90a0);
    border-bottom: 1.5px solid var(--colorNeutralForeground3, #8a90a0);
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.tile[aria-expanded="true"] .chevron {
    transform: rotate(45deg);
}

/* Expandable detail panels */
.tile-detail {
    display: none;
    margin: 10px -16px -12px;
    padding: 12px 16px;
    border-top: 1px solid var(--colorNeutralStroke2, #e5e5e5);
    background: var(--colorNeutralBackground3, #f3f2f1);
}

.tile-detail.is-active {
    display: block;
}

.detail-content {
    padding: 4px 0;
}

.detail-refresh {
    margin: 0 0 8px;
    color: var(--colorNeutralForeground2, #525252);
}

/* Chip list (observability pills) */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.chip-list span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--colorNeutralBackground3, #f3f2f1);
    color: var(--colorNeutralForeground2, #525252);
    font-size: 11px;
}

/* Inside detail panel, chips need white bg since panel is already gray */
.tile-detail .chip-list span {
    background: var(--colorNeutralBackground1, #ffffff);
}

.config-json-card {
    background-color: var(--colorNeutralBackground1);
    border: 1px solid var(--colorNeutralStroke2);
    border-radius: var(--borderRadiusMedium);
    padding: var(--spacingVerticalM) var(--spacingHorizontalL);
    overflow-x: auto;
}

    .config-json-card pre {
        margin: 0;
        font-family: "Cascadia Code", "Fira Code", Consolas, "Courier New", monospace;
        font-size: var(--fontSizeBase200);
        line-height: var(--lineHeightBase300);
        white-space: pre;
    }

@media screen and (max-width: 768px) {
    .header-logo-text {
        display: none;
    }

    /* Legacy's separator is a bare child of .push-left (no wrapper) and is
       left showing here unchanged - existing, accepted "dangling separator"
       behavior. New-UX's separator lives inside .header-logo-lockup only;
       once .header-logo-text hides above it would leave a bare
       "[logo] |" with nothing after it, so hide it too, scoped so legacy's
       .vertical-seperator is untouched. */
    .header-logo-lockup .vertical-seperator {
        display: none;
    }

    .tile-strip {
        flex-direction: column;
    }

    .card-grid.two-up,
    .card-grid.three-up {
        grid-template-columns: 1fr;
    }

    #connect-dialog {
        --dialog-width: 100%;
    }

    .page {
        padding: 12px;
    }
}
