- ModelOnboardingModal: the desktop base set min-width: 640px / min-height: 480px and the mobile media query only reset max-width — but min-width always wins over max-width in size resolution, so the modal stayed pinned at 640px and overflowed any phone narrower than that. Compounding it, useModalResizePersist writes inline width/height from saved desktop sessions (e.g. 1100px), and inline styles beat the media query. Reset min-width/min-height to 0 in the mobile rule and force fullscreen (100vw/100dvh) with !important so the persisted desktop size cannot re-pin the modal off-screen. Also disable resize on mobile. - NewAgentDialog: had no mobile media query at all. Added a max-width: 768px block that drops the overlay padding, fills 100vw/100dvh, removes the border-radius, tightens header/footer/steps padding, locks body scroll with overscroll-behavior: contain + -webkit-overflow-scrolling: touch (so iOS doesn't bubble the scroll up and trap users above the footer), and stacks the footer buttons full-width. Also switched the desktop max-height from 100vh to 100dvh so iOS Safari's collapsing URL bar doesn't push the footer under the address bar. - SettingsModal auth panel: reduced .auth-panel-body padding-inline from --space-xl (24px) to --space-md (12px) so each provider card gets more horizontal room — the cards are dense enough that the wider gutter wasted visible width without any visual benefit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
599 lines
14 KiB
CSS
599 lines
14 KiB
CSS
/* === New Agent Dialog === */
|
|
.agent-dialog-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: color-mix(in srgb, var(--bg) 60%, transparent);
|
|
backdrop-filter: blur(var(--space-xs));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 100;
|
|
padding: calc(var(--space-lg) + var(--space-xs));
|
|
}
|
|
|
|
.agent-dialog {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
width: 100%;
|
|
max-width: calc(var(--space-xl) * 21 + var(--space-md));
|
|
/* Use dvh so iOS Safari's collapsing URL bar doesn't push the footer
|
|
under the address bar. The vh fallback keeps older browsers working. */
|
|
max-height: calc(100vh - (var(--space-xl) + var(--space-lg)));
|
|
max-height: calc(100dvh - (var(--space-xl) + var(--space-lg)));
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.agent-dialog-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-lg) calc(var(--space-lg) + var(--space-xs));
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.agent-dialog-header-title {
|
|
font-weight: 600;
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.75);
|
|
}
|
|
|
|
.agent-dialog-body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: calc(var(--space-lg) + var(--space-xs));
|
|
}
|
|
|
|
.agent-dialog-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-lg) calc(var(--space-lg) + var(--space-xs));
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.agent-dialog-steps {
|
|
display: flex;
|
|
gap: calc(var(--space-sm) - var(--space-xs) * 0.5);
|
|
padding: var(--space-md) calc(var(--space-lg) + var(--space-xs));
|
|
justify-content: center;
|
|
}
|
|
|
|
.agent-dialog-step {
|
|
width: calc(var(--space-2xl) + var(--space-sm));
|
|
height: var(--space-xs);
|
|
border-radius: calc(var(--space-xs) * 0.5);
|
|
background: var(--border);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.agent-dialog-step.active {
|
|
background: var(--todo);
|
|
}
|
|
|
|
.agent-dialog-step.completed {
|
|
background: var(--color-success);
|
|
}
|
|
|
|
.agent-dialog-field {
|
|
margin-bottom: var(--space-lg);
|
|
}
|
|
|
|
.agent-dialog-field label {
|
|
display: block;
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
font-weight: 500;
|
|
margin-bottom: calc(var(--space-sm) - var(--space-xs) * 0.5);
|
|
}
|
|
|
|
.agent-dialog-field .input,
|
|
.agent-dialog-field .select {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.agent-dialog-section {
|
|
margin-bottom: var(--space-lg);
|
|
}
|
|
|
|
.agent-dialog-section-header {
|
|
font-size: calc(var(--space-sm) + var(--space-xs));
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted);
|
|
margin-bottom: var(--space-md);
|
|
padding-bottom: var(--space-xs);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.agent-dialog-tabs {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: var(--space-sm);
|
|
margin-bottom: var(--space-lg);
|
|
}
|
|
|
|
.agent-dialog-tab {
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
background: var(--card);
|
|
color: var(--text-muted);
|
|
padding: var(--space-sm) var(--space-md);
|
|
font-size: calc(var(--space-sm) + var(--space-xs));
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.agent-dialog-tab:hover {
|
|
border-color: var(--todo);
|
|
color: var(--text);
|
|
background: var(--card-hover);
|
|
}
|
|
|
|
.agent-dialog-tab:focus-visible {
|
|
outline: none;
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.agent-dialog-tab.active {
|
|
border-color: var(--todo);
|
|
color: var(--text);
|
|
background: color-mix(in srgb, var(--todo) 12%, transparent);
|
|
}
|
|
|
|
.agent-dialog-tab-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.agent-runtime-mode-toggle {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.agent-runtime-mode-option {
|
|
position: relative;
|
|
margin: 0;
|
|
}
|
|
|
|
.agent-runtime-mode-option input {
|
|
position: absolute;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.agent-runtime-mode-option span {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: calc(var(--space-xl) + var(--space-lg));
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
background: var(--card);
|
|
color: var(--text-muted);
|
|
font-size: calc(var(--space-sm) + var(--space-xs));
|
|
font-weight: 600;
|
|
padding: var(--space-sm) var(--space-md);
|
|
cursor: pointer;
|
|
transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
.agent-runtime-mode-option span:hover {
|
|
border-color: var(--todo);
|
|
color: var(--text);
|
|
background: var(--card-hover);
|
|
}
|
|
|
|
.agent-runtime-mode-option input:focus-visible + span {
|
|
outline: none;
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.agent-runtime-mode-option--active span {
|
|
border-color: var(--todo);
|
|
color: var(--text);
|
|
background: color-mix(in srgb, var(--todo) 12%, transparent);
|
|
}
|
|
|
|
.agent-role-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(calc(var(--space-xl) * 3 + var(--space-sm)), 1fr));
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.agent-role-option {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: var(--space-md) var(--space-sm);
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
transition: border-color var(--transition-fast), background var(--transition-fast);
|
|
font-family: var(--font-primary);
|
|
color: var(--text);
|
|
}
|
|
|
|
.agent-role-option:hover {
|
|
border-color: var(--text-muted);
|
|
background: var(--card-hover);
|
|
}
|
|
|
|
.agent-role-option:focus-visible {
|
|
outline: none;
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.agent-role-option.selected {
|
|
border-color: var(--todo);
|
|
background: color-mix(in srgb, var(--todo) 12%, transparent);
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.agent-role-option-icon {
|
|
font-size: calc(var(--space-lg) + var(--space-xs));
|
|
line-height: 1;
|
|
}
|
|
|
|
.agent-role-option-label {
|
|
font-size: calc(var(--space-sm) + var(--space-xs));
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
/* AI-assisted generation section */
|
|
.agent-dialog-icon-prefix {
|
|
margin-right: calc(var(--space-sm) - var(--space-xs) * 0.5);
|
|
}
|
|
|
|
.agent-dialog-ai-generate {
|
|
margin-top: var(--space-sm);
|
|
border-top: 1px solid var(--border);
|
|
padding-top: var(--space-md);
|
|
}
|
|
|
|
.btn--ai-generate {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: calc(var(--space-sm) - var(--space-xs) * 0.5);
|
|
background: var(--cta-bg, var(--todo));
|
|
color: var(--cta-text, var(--text));
|
|
font-weight: 600;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.btn--ai-generate:hover {
|
|
opacity: 0.9;
|
|
filter: brightness(1.1);
|
|
}
|
|
|
|
.agent-dialog-ai-hint {
|
|
color: var(--text-muted);
|
|
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
|
|
text-align: center;
|
|
margin: calc(var(--space-sm) - var(--space-xs) * 0.5) 0 0;
|
|
}
|
|
|
|
.agent-dialog-summary {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.agent-dialog-summary-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--space-sm) 0;
|
|
border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
|
|
}
|
|
|
|
.agent-dialog-summary-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.agent-dialog-summary-row-label {
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.agent-dialog-summary-row-label--fixed {
|
|
flex: 0 0 calc(var(--space-xl) * 4 - var(--space-xs) * 1.5);
|
|
}
|
|
|
|
.agent-dialog-summary-row-value {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.agent-dialog-summary-row-value--body {
|
|
font-weight: 400;
|
|
}
|
|
|
|
.agent-dialog-summary--spaced {
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.agent-dialog-summary-row-value--muted {
|
|
font-style: italic;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.agent-dialog-summary-row-value--capitalize {
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
/* Agent preset quick-start cards */
|
|
.agent-presets {
|
|
margin-bottom: var(--space-lg);
|
|
}
|
|
|
|
.agent-presets-header {
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.5);
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
margin-bottom: var(--space-md);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.agent-presets-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(calc(var(--space-xl) * 5 + var(--space-lg) + var(--space-xs)), 1fr));
|
|
gap: var(--space-sm);
|
|
margin-bottom: var(--space-lg);
|
|
max-height: calc(var(--space-xl) * 16 + var(--space-lg));
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.agent-preset-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: var(--space-md);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
cursor: pointer;
|
|
transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
|
|
background: var(--bg-secondary);
|
|
font-family: var(--font-primary);
|
|
color: var(--text);
|
|
}
|
|
|
|
.agent-preset-card:hover {
|
|
border-color: var(--todo);
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.agent-preset-card:focus-visible {
|
|
outline: none;
|
|
border-color: var(--todo);
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.agent-preset-card.selected {
|
|
border-color: var(--todo);
|
|
background: color-mix(in srgb, var(--todo) 12%, transparent);
|
|
}
|
|
|
|
.agent-preset-icon {
|
|
font-size: var(--space-xl);
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.agent-preset-name {
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
font-weight: 500;
|
|
text-align: center;
|
|
margin-bottom: var(--space-xs);
|
|
}
|
|
|
|
.agent-preset-role {
|
|
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
|
|
color: var(--text-muted);
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.agent-preset-description {
|
|
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
|
|
color: var(--text-muted);
|
|
line-height: 1.3;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
margin-top: calc(var(--space-xs) * 0.5);
|
|
}
|
|
|
|
|
|
.agent-dialog-header-sparkle {
|
|
margin-right: var(--space-sm);
|
|
}
|
|
|
|
.agent-dialog-error-banner {
|
|
color: var(--color-error);
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
padding: var(--space-sm) var(--space-md);
|
|
background: color-mix(in srgb, var(--color-error) 10%, transparent);
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.agent-dialog-textarea {
|
|
resize: vertical;
|
|
}
|
|
|
|
.agent-dialog-hint {
|
|
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
|
|
color: var(--text-muted);
|
|
margin-top: var(--space-xs);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.agent-dialog-loading-center {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: var(--space-2xl) var(--space-lg);
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.agent-dialog-spinner {
|
|
width: var(--space-2xl);
|
|
height: var(--space-2xl);
|
|
border: calc(var(--space-xs) * 0.75) solid var(--border);
|
|
border-top-color: var(--todo);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.agent-dialog-loading-text {
|
|
color: var(--text-muted);
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
margin: 0;
|
|
}
|
|
|
|
.agent-dialog-expand-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--todo);
|
|
cursor: pointer;
|
|
font-size: calc(var(--space-sm) + var(--space-xs));
|
|
margin-left: var(--space-sm);
|
|
padding: 0;
|
|
}
|
|
|
|
.agent-dialog-expand-btn:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.agent-generation-prompt-box {
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--space-md);
|
|
font-size: calc(var(--space-sm) + var(--space-xs));
|
|
font-family: var(--font-mono);
|
|
line-height: 1.5;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
overflow: auto;
|
|
position: relative;
|
|
}
|
|
|
|
.agent-generation-prompt-box--collapsed {
|
|
max-height: calc(var(--space-xl) * 6 + var(--space-sm) + var(--space-xs) * 0.5);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.agent-generation-prompt-fade {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: calc(var(--space-lg) + var(--space-xl));
|
|
background: linear-gradient(transparent, var(--bg-secondary));
|
|
pointer-events: none;
|
|
}
|
|
|
|
.agent-dialog-required {
|
|
color: var(--color-error);
|
|
}
|
|
|
|
.agent-dialog-optional {
|
|
color: var(--text-muted);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.agent-dialog-error {
|
|
color: var(--color-error);
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
margin-top: var(--space-md);
|
|
}
|
|
|
|
.agent-dialog-info {
|
|
color: var(--text-muted);
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
margin-top: 0;
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.agent-dialog-loading {
|
|
color: var(--text-muted);
|
|
font-size: calc(var(--space-md) + var(--space-xs) * 0.25);
|
|
padding: var(--space-sm) 0;
|
|
}
|
|
|
|
/* === Mobile: fullscreen + scroll === */
|
|
@media (max-width: 768px) {
|
|
/* Drop the overlay padding so the dialog can fill the viewport edge-to-edge.
|
|
The desktop padding (20px on all sides) + max-height clamp left ~40px of
|
|
unusable gutter on phones and pushed the body content off-screen on
|
|
small devices when the URL bar was visible. */
|
|
.agent-dialog-overlay {
|
|
padding: 0;
|
|
align-items: stretch;
|
|
justify-content: stretch;
|
|
}
|
|
|
|
.agent-dialog {
|
|
width: 100vw;
|
|
max-width: 100vw;
|
|
height: 100dvh;
|
|
max-height: 100dvh;
|
|
border-radius: 0;
|
|
border-left: 0;
|
|
border-right: 0;
|
|
}
|
|
|
|
/* Tighter chrome leaves more room for the scrollable body. */
|
|
.agent-dialog-header,
|
|
.agent-dialog-footer {
|
|
padding: var(--space-md) var(--space-md);
|
|
}
|
|
|
|
.agent-dialog-steps {
|
|
padding: var(--space-sm) var(--space-md);
|
|
/* Allow the step rail to scroll horizontally on very narrow phones
|
|
instead of overflowing the dialog. */
|
|
overflow-x: auto;
|
|
flex-wrap: nowrap;
|
|
}
|
|
|
|
.agent-dialog-body {
|
|
padding: var(--space-md);
|
|
/* Already overflow-y: auto, but lock the scroll inside the body so iOS
|
|
doesn't bubble it up to the page and trap the user above the footer. */
|
|
overscroll-behavior: contain;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
/* Stack the footer buttons full-width — primary on top, cancel below.
|
|
On phones the side-by-side layout truncates labels and pushes Cancel
|
|
off-screen when the dialog edge meets the safe-area inset. */
|
|
.agent-dialog-footer {
|
|
flex-wrap: wrap;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.agent-dialog-footer > .btn {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
}
|
|
}
|