Files
CodeNomad/packages/ui/src/styles/messaging/prompt-input.css
2025-11-24 14:16:25 +00:00

207 lines
3.9 KiB
CSS

/* Prompt input & attachment styles */
.prompt-input-container {
@apply flex flex-col border-t;
border-color: var(--border-base);
background-color: var(--surface-base);
}
.prompt-input-wrapper {
@apply flex items-end gap-2 p-3;
}
.prompt-input-field {
position: relative;
width: 100%;
}
.prompt-input {
@apply flex-1 w-full min-h-[56px] max-h-[96px] px-3 pt-2.5 pb-12 border rounded-md text-sm resize-none outline-none transition-colors;
font-family: inherit;
background-color: var(--surface-base);
color: inherit;
border-color: var(--border-base);
line-height: var(--line-height-normal);
}
.prompt-input-overlay {
position: absolute;
bottom: 1rem;
left: 0.75rem;
right: 0.75rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
font-size: 0.75rem;
line-height: 1.3;
color: var(--text-muted);
pointer-events: none;
z-index: 1;
}
.prompt-input-overlay.shell-mode {
color: var(--text-primary);
}
.prompt-overlay-text {
display: inline-flex;
align-items: center;
gap: 0.35rem;
}
.prompt-overlay-warning {
color: var(--status-warning);
font-weight: 500;
}
.prompt-overlay-shell-active {
color: var(--status-success);
font-weight: 600;
}
.prompt-overlay-muted {
color: var(--text-muted);
}
.prompt-input.shell-mode {
border-color: var(--status-success);
box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.4);
}
.prompt-input:focus {
border-color: var(--accent-primary);
}
.prompt-input.shell-mode:focus {
border-color: var(--status-success);
box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.4);
}
.prompt-input:disabled {
@apply opacity-60 cursor-not-allowed;
}
.prompt-input::placeholder {
color: var(--text-muted);
}
.send-button {
@apply w-10 h-10 rounded-md border-none cursor-pointer flex items-center justify-center transition-all flex-shrink-0;
background-color: var(--accent-primary);
color: var(--text-inverted);
}
.send-button.shell-mode {
background-color: var(--status-success);
}
.send-button.shell-mode:hover:not(:disabled) {
filter: brightness(1.05);
}
.send-button.shell-mode:active:not(:disabled) {
filter: brightness(0.95);
}
.send-button:hover:not(:disabled) {
@apply opacity-90 scale-105;
}
.send-button:active:not(:disabled) {
@apply scale-95;
}
.send-button:disabled {
@apply opacity-40 cursor-not-allowed;
}
.send-icon {
@apply text-base;
}
.shell-icon {
width: 1rem;
height: 1rem;
}
.hint {
@apply text-xs;
color: var(--text-muted);
}
.hint kbd {
@apply inline-block px-1.5 py-0.5 text-xs font-mono rounded mx-0.5;
background-color: var(--surface-secondary);
border: 1px solid var(--border-base);
border-radius: 3px;
}
.attachment-chip {
@apply px-2.5 py-1 text-xs font-medium ring-1 ring-inset;
background-color: var(--attachment-chip-bg);
color: var(--attachment-chip-text);
ring-color: var(--attachment-chip-ring);
}
.attachment-chip-image {
position: relative;
}
.attachment-chip-preview {
display: none;
position: absolute;
bottom: calc(100% + 6px);
left: 0;
padding: 8px;
background-color: var(--surface-base);
border: 1px solid var(--border-base);
border-radius: 10px;
box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
z-index: 20;
}
.attachment-chip-preview img {
display: block;
max-width: 320px;
max-height: 320px;
border-radius: 8px;
object-fit: contain;
}
.attachment-chip-image:hover .attachment-chip-preview {
display: block;
}
.attachment-remove,
.attachment-download {
@apply ml-0.5 flex h-4 w-4 items-center justify-center rounded transition-colors;
}
.attachment-remove:hover,
.attachment-download:hover {
background-color: var(--attachment-chip-ring);
}
@media (pointer: coarse) {
.prompt-input-overlay {
display: none;
}
.prompt-input {
padding-bottom: 1.5rem;
}
}
@media (max-width: 640px) {
.prompt-input {
min-height: 64px;
padding: 0.5rem 0.75rem;
padding-bottom: 2.25rem;
}
.prompt-input-wrapper {
gap: 0.75rem;
padding: 0.75rem;
}
}