The card header gets the same chevron a folded card has, right while shut and down while open. The outline for an opened card goes: the sections say it is open.
76 lines
2 KiB
CSS
76 lines
2 KiB
CSS
/* <AgentCard> content layout — the clickable/selectable container
|
|
itself is `Card`'s (`ui/card/`); this is just the name/badges/
|
|
message arrangement inside one. */
|
|
.ui-agent-card-line1 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.6em;
|
|
}
|
|
.ui-agent-card-name {
|
|
font-weight: 600;
|
|
}
|
|
/* Pushes the wanted-state control to the row's trailing edge regardless
|
|
of how wide the status badge next to it ends up. */
|
|
.ui-agent-card-wanted {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
margin-left: auto;
|
|
}
|
|
/* The "login needed" badge and its "log in" button, kept together; the
|
|
wrapper also keeps their clicks, and the dialog's, off the card. */
|
|
.ui-agent-card-login {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
}
|
|
.ui-agent-card-message {
|
|
color: var(--muted);
|
|
white-space: normal;
|
|
word-break: break-word;
|
|
}
|
|
/* Icon (`AgentIcon`) beside the name/message. */
|
|
.ui-agent-card-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 0.7em;
|
|
}
|
|
.ui-agent-card-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.35em;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* The header is what opens the card: it reads as a control without a box. */
|
|
.ui-agent-card-row[role="button"] {
|
|
cursor: pointer;
|
|
}
|
|
/* The opened body, set off from the header by a rule. */
|
|
.ui-agent-card-detail {
|
|
margin-block-start: 0.75em;
|
|
padding-block-start: 0.75em;
|
|
border-block-start: 1px solid var(--border);
|
|
}
|
|
|
|
/* The same chevron as a folded card's (`ui/disclosure/`): right while shut,
|
|
down while open, so the header reads as something that unfolds. */
|
|
.ui-agent-card-chevron {
|
|
align-self: center;
|
|
width: 0.55em;
|
|
height: 0.55em;
|
|
flex: none;
|
|
border-right: 2px solid var(--muted);
|
|
border-bottom: 2px solid var(--muted);
|
|
transform: rotate(-45deg);
|
|
transition: transform 0.15s ease;
|
|
}
|
|
.ui-agent-card-row[aria-expanded="true"] .ui-agent-card-chevron {
|
|
transform: rotate(45deg);
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.ui-agent-card-chevron {
|
|
transition: none;
|
|
}
|
|
}
|