/* Shared controls for the organization and person playgrounds. */
body.agents-theme .psp .psp-header::before,
body.agents-theme .opg .opg-header::before { opacity: .35; }
body.agents-theme .psp .psp-header::after,
body.agents-theme .opg .opg-header::after { animation: none; opacity: .4; }
.opg-presets { border-bottom: 1px solid var(--aui-border); text-align: left; }
.opg-presets summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 20px;
    color: var(--aui-muted);
    font-size: 12px;
    cursor: pointer;
    list-style: none;
}
.opg-presets summary::-webkit-details-marker { display: none; }
.opg-presets summary:hover { color: var(--aui-text); }
.opg-preset-chevron { flex: 0 0 auto; margin-left: auto; transition: transform .15s ease; }
.opg-presets[open] .opg-preset-chevron { transform: rotate(180deg); }
.opg-preset-active { color: var(--aui-text); font-weight: 500; }
.opg-preset-options button { min-height: 36px; }
.opg-presets summary:focus-visible,
.opg .opg-mode:focus-visible,
.opg .opg-feature:focus-visible { outline: 2px solid var(--aui-accent); outline-offset: 2px; }
.opg .opg-search-form { padding: 0 16px 24px; }
.opg-search-label { text-align: left; font-size: 12px; font-weight: 500; color: var(--aui-text); }
.opg .opg-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.opg-section-heading h3 { color: var(--aui-text); font-size: 14px; font-weight: 600; }
.opg-selection-count { color: var(--aui-muted); font-size: 11px; white-space: nowrap; }
.opg .opg-base-data { margin-bottom: 4px; }
.opg-base-data summary { display: flex; align-items: center; gap: 6px; min-height: 30px; cursor: pointer; list-style: none; }
.opg-base-data summary::-webkit-details-marker { display: none; }
.opg-base-data summary > span { margin-left: auto; white-space: nowrap; }
.opg-base-data summary > svg { flex-shrink: 0; color: var(--aui-muted); }
.opg-base-data[open] summary > svg { transform: rotate(180deg); }
.opg-base-data summary:focus-visible { outline: 2px solid var(--aui-accent); outline-offset: 2px; }
.opg-base-data strong { color: var(--aui-text); font-size: 12px; font-weight: 500; }
.opg-base-data span { color: var(--aui-muted); font-size: 10px; }
.opg-base-data p { margin: 2px 0 8px; color: var(--aui-muted); font-size: 12px; line-height: 1.6; }
.opg .opg-modes { display: grid; gap: 0; padding-bottom: 6px; margin-bottom: 10px; border-bottom: 1px solid var(--aui-border); }
body.agents-theme .opg-mode {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 30px;
    padding: 4px 0;
    background: transparent !important;
    border: 0;
    text-align: left;
    cursor: pointer;
}
.opg-mode-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; flex: 1; min-width: 0; }
.opg-mode-title { display: flex; flex-shrink: 0; align-items: baseline; gap: 6px; color: var(--aui-text); font-size: 12px; font-weight: 500; }
.opg-mode-cost { color: var(--aui-muted); font-size: 10px; font-weight: 400; font-variant-numeric: tabular-nums; }
.opg-mode-description { display: block; margin-top: 0; color: var(--aui-muted); font-size: 11px; line-height: 1.5; }
.opg-beta { color: var(--aui-muted); font-size: 9px; font-weight: 400; }
.opg-switch { flex: 0 0 30px; width: 30px; height: 18px; padding: 2px; border-radius: 10px; background: var(--aui-border); transition: background .15s; }
.opg-switch > span { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--aui-muted); transition: transform .15s; }
.opg-mode[aria-checked="true"] .opg-switch { background: var(--aui-accent); }
.opg-mode[aria-checked="true"] .opg-switch > span { background: #fff; transform: translateX(12px); }
.opg .opg-options-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 8px; margin-bottom: 14px; }
.opg-options-heading h4 { color: var(--aui-text); font-size: 12px; font-weight: 500; }
.opg-credit-total { color: var(--aui-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.opg-credit-total strong { color: var(--aui-text); font-weight: 600; }
.opg .opg-features .space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 3px; }
body.agents-theme .opg .opg-features .opg-feature {
    min-height: 36px;
    gap: 10px;
    padding: 7px 8px;
    background: transparent !important;
    border-color: transparent !important;
    border-radius: 6px;
    text-align: left;
    box-shadow: none !important;
    cursor: pointer;
}
body.agents-theme .opg .opg-features .opg-feature:hover:not(:disabled) { background: var(--aui-surface-soft) !important; }
body.agents-theme .opg .opg-features .opg-feature[aria-pressed="true"] { background: var(--aui-surface-soft) !important; border-color: var(--aui-border) !important; }
.opg-feature > div:first-child { flex: 1; min-width: 0; flex-wrap: wrap; gap: 3px 0; }
.opg-feature > div:first-child > svg { flex-shrink: 0; }
.opg-feature > div:first-child > span:first-of-type { font-size: 12px; line-height: 1.4; }
.opg-feature > div:first-child > span:not(:first-of-type) { background: transparent !important; color: var(--aui-muted) !important; padding: 0; }
body.agents-theme .opg .opg-features .opg-upgrade-badge {
    padding: 2px 5px;
    border: 1px solid color-mix(in srgb, #FFB328 40%, transparent);
    border-radius: 4px;
    background: color-mix(in srgb, #FFB328 12%, transparent) !important;
    color: var(--aui-text-amber) !important;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}
body.agents-theme .opg .opg-features .opg-feature .opg-check {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 1px solid var(--aui-muted);
    border-radius: 4px;
    background: transparent !important;
    color: var(--aui-text) !important;
}
body.agents-theme .opg .opg-features .opg-feature[aria-pressed="true"] .opg-check { background: var(--aui-accent) !important; border-color: var(--aui-accent); color: var(--aui-bg) !important; }
body.agents-theme .opg .opg-features .opg-feature:disabled { opacity: .5; cursor: not-allowed; }
.opg .opg-example-note { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--aui-border); color: var(--aui-muted); font-size: 11px; line-height: 1.5; }
.opg-example-note > span { color: var(--aui-text); font-weight: 500; }
.opg-example-note p { flex: 1 1 220px; }
@media (max-width: 767px) {
    .opg-presets summary { padding-inline: 16px; }
    .opg-preset-active { display: none; }
    .opg .opg-feature-scroll { max-height: 480px; margin-bottom: 16px; }
    .opg .opg-feature { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .opg-preset-chevron, .opg-switch, .opg-switch > span { transition: none; }
}

.opg .opg-change-hint { text-align: left; font-size: 11px; line-height: 1.5; color: var(--aui-muted); }

.psp .psp-preview-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; padding: 8px 16px; margin-bottom: 8px; color: var(--aui-muted); font-size: 11px; line-height: 1.5; }
body.agents-theme .psp .psp-ai-included { cursor: default; }
.psp-ai-included .opg-switch > span { display: flex; align-items: center; justify-content: center; color: var(--aui-link); }
