.marketplace-content { --page-content-width: 1040px; }
.marketplace-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 12px; }
.marketplace-connected-count { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .85rem; cursor: default; }
.marketplace-connected-icons { display: flex; padding-left: 5px; }
.marketplace-connected-icons .marketplace-brand { width: 24px; height: 24px; margin-left: -5px; border: 2px solid var(--surface); border-radius: 6px; font-size: .55rem; }
.marketplace-connected-icons .marketplace-brand img { width: 16px; height: 16px; }
.marketplace-chips { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 28px; }
.marketplace-chip { min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 999px; background: var(--subtle); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.marketplace-chip:hover { background: var(--selected); }
.marketplace-chip[aria-pressed="true"] { border-color: var(--line); background: var(--text); color: var(--surface); }
/* Connection status stays distinct from the filled app categories. */
.marketplace-chip[data-category="connected"] { background: transparent; border-color: var(--color-border-emphasized); }
.marketplace-chip[data-category="connected"][aria-pressed="true"] { color: var(--color-text-primary); border-color: var(--color-text-primary); font-weight: var(--font-weight-semibold); text-decoration: underline; text-underline-offset: .2em; }
.marketplace-result-count { color: var(--muted); font-size: .85rem; min-height: 1.5em; margin: 0 0 20px; }
.marketplace-section { margin: 0 0 32px; }
.marketplace-section-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.marketplace-section-heading h2 { margin: 0; font-size: 1rem; line-height: 1.6; font-weight: 600; }
.marketplace-section-heading > span { font-size: .8rem; color: var(--muted); }
.marketplace-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 4px 24px; list-style: none; padding: 0; margin: 0; }
.marketplace-item { min-width: 0; overflow-wrap: anywhere; }
.marketplace-permissions { border-radius: 12px; }
.marketplace-permissions > :is(summary,.marketplace-summary) { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 64px; padding: 8px; border-radius: 12px; list-style: none; }
.marketplace-permissions > summary { cursor: pointer; }
.marketplace-permissions > summary::-webkit-details-marker { display: none; }
.marketplace-permissions > summary:hover, .marketplace-permissions[open] { background: var(--subtle); }
.marketplace-permissions > summary:focus-visible, .marketplace-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.marketplace-brand { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: oklch(98% 0.006 145); color: oklch(25% 0.025 150); font-size: .8rem; font-weight: 600; }
.marketplace-brand img { width: 24px; height: 24px; object-fit: contain; }
.marketplace-app-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.marketplace-app-name { font-size: .95rem; line-height: 1.45; font-weight: 400; }
.marketplace-status { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.marketplace-status-connected { color: var(--accent); }
.marketplace-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; min-height: 28px; padding: 5px 12px; border-radius: 999px; background: var(--subtle); color: var(--text); font-size: .8rem; line-height: 1.3; white-space: nowrap; }
.marketplace-permissions[open] .marketplace-pill:not(.marketplace-connected-pill,.marketplace-coming-later) { background: var(--surface); }
.marketplace-coming-later { min-width: 0; background: transparent; color: var(--muted); padding-inline: 2px; font-size: .75rem; }
.marketplace-app-details { padding: 4px 14px 18px 56px; font-size: .85rem; line-height: 1.6; }
.marketplace-description { max-width: 65ch; margin: 0 0 12px; }
.marketplace-proof, .marketplace-permission-warning { color: var(--muted); margin: 8px 0; }
.marketplace-permission-warning { color: var(--text); padding-block: 10px; border-block: 1px solid var(--line); }
.marketplace-access-details h4 { font-size: .8rem; font-weight: 600; margin: 14px 0 6px; }
.marketplace-access-details ul { margin: 6px 0; padding-left: 18px; }
.marketplace-access-details p { margin: 8px 0; }
.marketplace-item-action { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.marketplace-item-action:empty { display: none; }
.marketplace-item-action .button { min-height: 44px; border-radius: 999px; white-space: normal; text-align: center; font-size: .8rem; }
.marketplace-empty { padding: 24px 0; }
.marketplace-empty h2 { font-size: 1.1rem; margin: 0 0 8px; }
.marketplace-empty p { color: var(--muted); max-width: 65ch; margin: 0 0 16px; }
.marketplace-error { margin-bottom: 20px; }
.marketplace-loading { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 24px; }
.marketplace-loading > div { height: 64px; border-radius: 12px; background: var(--subtle); }
@container (max-width: 720px) {
 .marketplace-list, .marketplace-loading { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
 .marketplace-content { padding: 24px 16px; }
 .marketplace-toolbar { gap: 8px; }
 .marketplace-search-label { flex-basis: 100%; }
 .marketplace-connected-count { margin-right: auto; }
 .marketplace-chips { margin-bottom: 24px; }
 .marketplace-chip { flex-shrink: 0; }
 .marketplace-list, .marketplace-loading { grid-template-columns: minmax(0,1fr); gap: 4px; }
 .marketplace-section { margin-bottom: 28px; }
 .marketplace-app-details { padding-left: 16px; }
}

/* Reuse the shared panel's focus, Escape and return-focus behavior. */
.integrations-modal .marketplace-page { min-height: 0; flex: 1; overflow: hidden; }
.integrations-modal .standard-page > .marketplace-content { height: auto; min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; padding: 24px 28px; }
.marketplace-error { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; padding: 24px; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 2px 8px #00000008; }
.marketplace-error > div { min-width: 0; }
.marketplace-error h2 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; }
.marketplace-error p { margin: 0; font-size: .85rem; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.marketplace-error button { flex-shrink: 0; min-height: 44px; }
.marketplace-item { container-type: inline-size; }
@container (max-width: 260px) {
 .marketplace-permissions > :is(summary,.marketplace-summary) { grid-template-columns: 38px minmax(0, 1fr); }
 .marketplace-permissions > :is(summary,.marketplace-summary) > .marketplace-pill { grid-column: 2; justify-self: start; }
}

.marketplace-connected-pill { min-width: 0; padding-inline: 2px; background: transparent; color: var(--accent); font-weight: 600; }



.marketplace-reason { font-size: .75rem; line-height: 1.4; color: var(--muted); }
.marketplace-summary > .button { min-width: 84px; min-height: 36px; border-radius: 999px; font-size: .8rem; }
.marketplace-summary > .button:disabled { cursor: default; opacity: .65; }
.marketplace-summary > .button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }



/* Share only the free space, so minimum button widths never stall the motion. */
.sidebar-footer { display: flex; min-width: 0; }
.footer-row { --rlly-footer-apps: 0; width: 100%; min-width: 0; contain: layout; }
.footer-row:has(.footer-connect:is(:hover, :focus-visible)),
.footer-row:not(:hover):has(.footer-connect:focus) { --rlly-footer-apps: 1; }
.footer-account { --rlly-footer-grow: calc(1 - var(--rlly-footer-apps)); }
.footer-connect { --rlly-footer-grow: var(--rlly-footer-apps); }
.sidebar-footer .footer-row > .nav-item {
 flex: var(--rlly-footer-grow) 0 var(--rlly-footer-control-size); min-width: 0; height: var(--rlly-footer-control-size); min-height: var(--rlly-footer-control-size);
 padding: var(--spacing-1); border-radius: var(--radius-full); border: 1px solid transparent;
 flex-wrap: nowrap; justify-content: flex-start; overflow: hidden; color: var(--text);
 transition: flex-grow var(--duration-medium-min) var(--ease-move), background-color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.footer-row > button:is(:hover, :focus-visible) { background: var(--subtle); border-color: var(--line); }
.footer-row > button > span { min-width: 0; width: 100%; }
.footer-row .footer-content { min-width: 0; width: 100%; }
.footer-row .footer-glyph { box-sizing: border-box; width: 32px; height: 32px; padding: var(--spacing-1); flex-shrink: 0; }
.footer-row .footer-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; opacity: var(--rlly-footer-grow); transition: opacity var(--duration-fast-min) var(--ease-move); transition-delay: calc(var(--rlly-footer-grow) * var(--duration-fast-min)); }
.footer-connect .footer-label { text-overflow: clip; }
.astryx-workspace-dialog.integrations-modal {
 width: min(var(--rlly-integrations-max-width), calc(100vw - 2 * var(--spacing-6)));
 height: calc(100dvh - 2 * var(--spacing-6));
 max-height: calc(100dvh - 2 * var(--spacing-6));
 max-width: calc(100vw - 2 * var(--spacing-6));
}
.integrations-modal :is(.astryx-panel-content, .astryx-panel-source) { flex: 1; min-height: 0; }
.marketplace-status-connected, .marketplace-connected-pill { color: var(--color-text-success); }
@container (width < 720px) {
 .footer-row { flex-direction: column; }
 .sidebar-footer .footer-row > .nav-item > span:has(.footer-content) { position: static; width: 100%; height: auto; overflow: visible; clip-path: none; }
 .sidebar-footer .nav-item:focus-visible:not([title])::after { content: none; }
 .footer-row .footer-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
 .sidebar-footer .footer-row > .nav-item, .footer-row .footer-label { transition: none; }
}
.astryx-panel-summary { flex-shrink: 0; }
.marketplace-connected-count:not(:disabled) { cursor: pointer; }
.marketplace-connected-count:is(:hover, :focus-visible) { background: var(--subtle); color: var(--text); }
.marketplace-connected-count:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
