/* ── Mobile theme — warm "paper" palette, aligned with the desktop ─────────── Consumes the shared design tokens from variables.css (loaded first): --accent*, --radius-*, --card-*, --sidebar-*, --msg-*, --placeholder-color and the --bs-* overrides all flip with [data-bs-theme]. Only mobile-specific derivations are declared here. */ :root { --mobile-nav-height: 64px; --mobile-bg: var(--bs-body-bg); --mobile-text: var(--sidebar-brand-color); --mobile-text-soft: var(--sidebar-text); --mobile-nav-color: var(--placeholder-color); --mobile-nav-active: var(--accent); /* Raised surfaces (nav bar, section headers) — the warm cream the desktop uses for its sidebar. */ --mobile-chrome-bg: var(--sidebar-bg); --mobile-chrome-border: var(--sidebar-divider); /* Grouped-list well + cards. */ --mobile-list-bg: var(--bs-body-bg); --mobile-card-bg: var(--card-bg); --mobile-card-border: var(--card-border); --mobile-card-shadow: var(--card-shadow); /* Chat surfaces. */ --mobile-bubble-bg: var(--msg-assistant-bg); --mobile-bubble-text: var(--msg-assistant-text); /* Semantic actions. */ --mobile-ok: #3d9a63; --mobile-danger: #c94a3c; } [data-bs-theme="dark"] { --mobile-ok: #4db87a; --mobile-danger: #e8836f; } body { background: var(--mobile-bg); color: var(--mobile-text); color-scheme: light dark; } /* Account for iOS status bar overlay (black-translucent) */ #mobile-root { padding-top: env(safe-area-inset-top); } /* Native shell (?native=true): the HTML bottom nav is hidden and the native chrome owns the status bar + tab bar, so drop the web-side safe-area insets it would otherwise double-apply. */ mobile-app[data-native] #mobile-root { padding-top: 0; } mobile-app[data-native] .chat-page-input-area { padding-bottom: 10px; } #mobile-root { display: flex; flex-direction: column; height: 100%; height: 100dvh; } .mobile-content { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; } /* ── Section header ───────────────────────────────────────────────────────── */ .mobile-section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; background: var(--mobile-chrome-bg); border-bottom: 1px solid var(--mobile-chrome-border); flex-shrink: 0; } .mobile-section-title { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; color: var(--mobile-text); display: flex; align-items: center; gap: 9px; min-width: 0; } .mobile-section-title > i { color: var(--accent); font-size: 1.05rem; } .mobile-alert-error { margin: 12px 16px; padding: 10px 14px; background: rgba(var(--accent-rgb), 0.1); color: var(--mobile-danger); border: 1px solid rgba(var(--accent-rgb), 0.25); border-radius: var(--radius-md); font-size: 0.85rem; } /* Round ghost button in section headers (refresh, back, actions). */ .inbox-refresh-btn, .chat-page-back { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--mobile-card-border); border-radius: 50%; background: var(--mobile-card-bg); color: var(--mobile-text-soft); font-size: 1rem; cursor: pointer; box-shadow: var(--mobile-card-shadow); -webkit-tap-highlight-color: transparent; transition: transform 0.12s, color 0.12s, border-color 0.12s; } .inbox-refresh-btn:active, .chat-page-back:active { transform: scale(0.92); color: var(--accent); border-color: var(--accent); } .chat-page-back { font-size: 1.1rem; } /* ── Empty states ─────────────────────────────────────────────────────────── */ .mobile-inbox .inbox-empty, .mobile-projects .inbox-empty { flex: 1; height: auto; padding: 40px 20px; background: transparent; color: var(--mobile-text-soft); } .inbox-empty i { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); font-size: 1.9rem; opacity: 1; margin-bottom: 14px; } .inbox-empty p { font-size: 0.92rem; font-weight: 500; } /* ── Inbox ────────────────────────────────────────────────────────────────── */ .mobile-inbox { display: flex; flex-direction: column; height: 100%; } .mobile-inbox-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--mobile-list-bg); display: flex; flex-direction: column; gap: 12px; } .inbox-section-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--mobile-nav-color); display: flex; align-items: center; gap: 8px; margin-top: 6px; } /* Warm badges inside the mobile inbox (Bootstrap defaults are too cold). */ .mobile-inbox .badge.bg-warning { background: rgba(217, 158, 46, 0.16) !important; color: #a5720f; } .mobile-inbox .badge.bg-info { background: rgba(var(--accent-rgb), 0.12) !important; color: var(--accent); } .mobile-inbox .badge.bg-danger { background: var(--accent) !important; } [data-bs-theme="dark"] .mobile-inbox .badge.bg-warning { background: rgba(234, 179, 8, 0.18) !important; color: #e8b93e; } /* Inbox cards on mobile: radius from the shared scale, warm surface. */ .mobile-inbox .inbox-card { border-radius: var(--radius-lg); background: var(--mobile-card-bg); border-color: var(--mobile-card-border); box-shadow: var(--mobile-card-shadow); } .mobile-inbox .inbox-card-header, .mobile-inbox .inbox-card-footer { background: var(--bs-tertiary-bg); } .mobile-inbox .approval-card { border-left: 4px solid #d99e2e; } .mobile-inbox .clarification-card { border-left: 4px solid var(--accent); } /* ── Inbox footer buttons ─────────────────────────────────────────────────── */ .inbox-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; font-size: 0.92rem; font-weight: 600; border-radius: var(--radius-md); border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.12s, filter 0.12s; } .inbox-btn:active { transform: scale(0.97); } .inbox-btn-approve { background: var(--mobile-ok); color: #fff; } .inbox-btn-reject { background: transparent; color: var(--mobile-danger); border: 1.5px solid var(--mobile-danger); } /* Clarification answer send button + chips: warm accent instead of cold cyan. */ .mobile-inbox .inbox-answer-send { background: var(--accent); color: #fff; border-radius: var(--radius-md); } .mobile-inbox .inbox-chip:hover, .mobile-inbox .inbox-chip:active { background: var(--accent); border-color: var(--accent); color: #fff; } .mobile-inbox .inbox-answer-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); } /* ── Coming soon ──────────────────────────────────────────────────────────── */ .mobile-coming-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; color: var(--mobile-text-soft); } .mobile-coming-soon i { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); font-size: 1.9rem; } .mobile-coming-soon p { margin: 0; font-size: 0.95rem; font-weight: 500; } /* ── Bottom nav ───────────────────────────────────────────────────────────── */ .mobile-nav { display: flex; align-items: stretch; justify-content: space-around; height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); background: var(--mobile-chrome-bg); border-top: 1px solid var(--mobile-chrome-border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); position: relative; z-index: 100; } .mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; flex: 1; cursor: pointer; color: var(--mobile-nav-color); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.01em; user-select: none; -webkit-tap-highlight-color: transparent; transition: color 0.15s; } .mobile-nav-item .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 30px; border-radius: 999px; transition: background 0.18s, color 0.18s; } .mobile-nav-item i { font-size: 1.25rem; line-height: 1; } .mobile-nav-item.active { color: var(--mobile-nav-active); } .mobile-nav-item.active .nav-icon { background: var(--accent-soft); } /* ── Chat page ────────────────────────────────────────────────────────────── */ .chat-page { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; background: var(--mobile-bg); } .chat-page-header-actions { display: flex; align-items: center; gap: 8px; } /* Warm ghost style for the header action buttons (new session). */ .chat-page-header-actions .btn-outline-secondary, .chat-page-attach-btn.btn-outline-secondary { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--mobile-card-border); border-radius: 50%; background: var(--mobile-card-bg); color: var(--mobile-text-soft); box-shadow: var(--mobile-card-shadow); } .chat-page-header-actions .btn-outline-secondary:active, .chat-page-attach-btn.btn-outline-secondary:active { color: var(--accent); border-color: var(--accent); transform: scale(0.92); } .chat-page-messages { flex: 1; min-height: 0; overflow-y: auto; /* Clip horizontally: wide content (code blocks, tables, diffs) scrolls inside its own bubble box, so the message list itself never pans sideways. Without this, `overflow-y: auto` makes the unset x-axis compute to `auto` too. */ overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 14px 14px; display: flex; flex-direction: column; gap: 8px; } /* Wider bubbles on narrow screens */ .chat-page .copilot-msg { max-width: 88%; /* Allow the bubble to shrink below its content's intrinsic width so inner scroll containers (code/diff/table) collapse and scroll internally instead of widening the bubble past the viewport. */ min-width: 0; font-size: 0.95rem; border-radius: 1.15rem; } .chat-page .copilot-msg.assistant { background: var(--mobile-bubble-bg); color: var(--mobile-bubble-text); border-bottom-left-radius: 0.25rem; } .chat-page .copilot-msg.user { border-bottom-right-radius: 0.25rem; } /* ── Chat hero (empty state) ──────────────────────────────────────────────── */ .chat-page-hero { margin: auto; width: 100%; max-width: 420px; padding: 2rem 0.75rem; display: flex; flex-direction: column; align-items: center; text-align: center; } .chat-page-hero-logo { width: 84px; height: 84px; border-radius: 24px; box-shadow: var(--mobile-card-shadow); } .chat-page-hero-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; color: var(--mobile-text); margin: 1rem 0 0.25rem; } .chat-page-hero-sub { color: var(--mobile-nav-color); font-size: 0.95rem; margin: 0 0 1.5rem; } .chat-page-suggestions { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; } .chat-page-suggestion { display: flex; align-items: center; gap: 12px; width: 100%; border: 1px solid var(--mobile-card-border); background: var(--mobile-card-bg); color: var(--mobile-text); border-radius: var(--radius-lg); padding: 12px 14px; font-size: 0.92rem; font-weight: 500; cursor: pointer; box-shadow: var(--mobile-card-shadow); -webkit-tap-highlight-color: transparent; transition: border-color 0.15s, transform 0.12s; } .chat-page-suggestion i { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 0.95rem; flex-shrink: 0; } .chat-page-suggestion:active { border-color: var(--accent); transform: scale(0.98); } /* ── Composer ─────────────────────────────────────────────────────────────── */ .chat-page-input-area { padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--mobile-chrome-border); background: var(--mobile-chrome-bg); flex-shrink: 0; } /* Unified composer: a single card wrapping the textarea and the toolbar below it, mirroring the desktop copilot (.copilot-composer). */ .chat-page-composer { display: flex; flex-direction: column; border: 1px solid var(--mobile-card-border); border-radius: var(--radius-lg); background: var(--mobile-card-bg); box-shadow: var(--mobile-card-shadow); transition: border-color 0.15s, box-shadow 0.15s; } .chat-page-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); } .chat-page-textarea { display: block; width: 100%; box-sizing: border-box; resize: none; border: none; outline: none; background: transparent; color: var(--mobile-text); font-size: 1rem; line-height: 1.45; padding: 13px 14px 6px; min-height: 46px; max-height: 120px; overflow-y: auto; } .chat-page-textarea::placeholder { color: var(--placeholder-color); } /* ── Composer toolbar (below the textarea) ────────────────────────────────── */ .chat-page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; padding: 6px 8px; } .chat-page-toolbar-left, .chat-page-toolbar-right { display: flex; align-items: center; gap: 6px; } /* Model selector — a native