/*
 * Prod Protect — server-managed environment settings.
 *
 * Styles for the read-only affordances shown when an environment's type is
 * pinned centrally rather than chosen by the user.
 *
 * Its own file rather than an addition to core.css, which is already past the
 * 40k split-CSS budget (see CLAUDE.md → CSS Architecture).
 */

/* ---------------------------------------------------------------------------
 * Environment editor — the "managed centrally" note under the type dropdown.
 *
 * Visibility is owned by the `hidden` attribute, which environment.js toggles
 * (`note.hidden = !locked`). This rule is scoped with `:not([hidden])` so it
 * can never override the attribute — an earlier version used a `.is-visible`
 * class with a `display: none` default, which meant that if this one stylesheet
 * failed to load the note became unconditionally visible while the dropdown
 * stayed enabled, telling every user their environment was centrally managed.
 * Styling may fail; the hidden/shown state may not.
 * ------------------------------------------------------------------------ */
.prod-protect-note:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--vscode-descriptionForeground);
}

/* The note's children are shown/hidden with the `hidden` attribute too, and at
 * least one of them (`.help-icon` in core.css) sets `display: inline-flex`,
 * which outranks the UA sheet's `[hidden] { display: none }`. This restores it
 * for anything inside the note. */
.prod-protect-note [hidden] {
    display: none;
}

.prod-protect-shield {
    flex-shrink: 0;
    /* The same error-tinted token the Hub production header uses, so the
     * production signal reads consistently across surfaces. */
    color: var(--vscode-statusBarItem-errorBackground);
}

/* Neutral counterpart for a non-production pin — the field is locked, but there
 * is nothing to warn about, so it must not borrow the production red. */
.prod-protect-lock {
    flex-shrink: 0;
    color: var(--vscode-descriptionForeground);
}

/* A field pinned by policy. Matches the disabled treatment used for the
 * immutable Base URL, but as a class rather than inline styles. */
.prod-protect-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* No Prod Protect marker in the Hub environment list. Production environments
 * are called out in red in the selector dropdown instead —
 * `hub.css` → `.hub-env-popup-item.is-production`. */
