360 lines
8.2 KiB
CSS
360 lines
8.2 KiB
CSS
/* Dawn palette + command-card / about-modal vocabulary — a faithful subset of
|
|
* apps/widget-telegram/src/styles.css so the Vojo AI widget reads as the same
|
|
* surface as the bridge widgets (same palette, sections, command cards, and
|
|
* the «about» modal pattern for detailed copy). */
|
|
|
|
:root {
|
|
--bg: #181a20;
|
|
--bg2: #0d0e11;
|
|
--surface: #21232b;
|
|
--surface2: #2a2d36;
|
|
--divider: rgba(255, 255, 255, 0.06);
|
|
--hairline: rgba(255, 255, 255, 0.08);
|
|
--text: #e6e6e9;
|
|
--muted: rgba(230, 230, 233, 0.55);
|
|
--faint: rgba(230, 230, 233, 0.32);
|
|
--fleet: #9580ff;
|
|
--fleet-soft: #a59cff;
|
|
--green: #7dd3a8;
|
|
--rose: #c08e7b;
|
|
--section-pad-x: 40px;
|
|
}
|
|
|
|
[data-theme='light'] {
|
|
/* Light theme is intentionally a thin remap. Vojo is dark-default. */
|
|
--bg: #f5f5f7;
|
|
--bg2: #ffffff;
|
|
--surface: #f0f0f2;
|
|
--surface2: #e8e8ec;
|
|
--divider: rgba(0, 0, 0, 0.08);
|
|
--hairline: rgba(0, 0, 0, 0.1);
|
|
--text: #1a1a1d;
|
|
--muted: rgba(26, 26, 29, 0.62);
|
|
--faint: rgba(26, 26, 29, 0.4);
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
:root {
|
|
--section-pad-x: 20px;
|
|
}
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
/* Kills the translucent grey overlay iOS/Android WebViews paint over a
|
|
* tapped element (read as «button stuck on grey»). Web browsers ignore it. */
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
html,
|
|
body,
|
|
#app {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 14px/1.45 -apple-system, 'Segoe UI', 'Inter', system-ui, sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
text-rendering: optimizeLegibility;
|
|
}
|
|
|
|
.app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 100%;
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
/* The hero (avatar + name + handle + description + three-dots menu) is OWNED
|
|
* BY THE HOST — see src/app/features/bots/BotShell.tsx. The widget body starts
|
|
* with the action/privacy section directly. */
|
|
|
|
/* ── Section ──────────────────────────────────────────────────────── */
|
|
|
|
.section {
|
|
padding: 24px var(--section-pad-x) 20px;
|
|
}
|
|
|
|
.section + .section {
|
|
padding-top: 4px;
|
|
}
|
|
|
|
/* Section label — dark-bg pill, uppercase letter-spaced caption. */
|
|
.section-label {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
font-size: 13px;
|
|
line-height: 20px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1.4px;
|
|
font-weight: 600;
|
|
color: var(--muted);
|
|
background: var(--bg2);
|
|
border: 1px solid var(--divider);
|
|
border-radius: 8px;
|
|
padding: 8px 14px;
|
|
margin: 0 0 14px;
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
}
|
|
|
|
/* ── Command card (action card with lead icon + name + desc + chevron) ─ */
|
|
/* Lifted verbatim from the bridge widget so «Добавить в чат» / «Конфиденци-
|
|
* альность» are pixel-identical to the Telegram login/about cards. */
|
|
|
|
.command-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
grid-auto-rows: 1fr;
|
|
gap: 10px;
|
|
}
|
|
|
|
.command-card {
|
|
/* The widget runs in an iframe and does NOT inherit the host's
|
|
* `button { -webkit-appearance: button }` rule, so on iOS/Android WebView a
|
|
* <button> draws a native focus/active overlay ON TOP of our background
|
|
* (the «greys out and doesn't snap back» bug). appearance:none makes our CSS
|
|
* the sole source of truth. Web browsers ignore appearance for <button>. */
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
background: var(--bg2);
|
|
border: 1px solid var(--divider);
|
|
border-radius: 10px;
|
|
padding: 14px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
cursor: pointer;
|
|
text-align: left;
|
|
font: inherit;
|
|
color: inherit;
|
|
transition: border-color 0.12s, background 0.12s;
|
|
}
|
|
|
|
/* Hover scoped to mouse-mode sessions only — Capacitor Android WebView reports
|
|
* `(hover: hover)` TRUE on pure-touch devices, so a media query alone would
|
|
* leave a sticky synthesised :hover after tap. `[data-input]` is set in
|
|
* main.tsx from the real `pointerdown.pointerType`. */
|
|
:root[data-input='mouse'] .command-card:hover:not(:disabled) {
|
|
background: var(--surface);
|
|
border-color: var(--hairline);
|
|
}
|
|
|
|
.command-card:focus {
|
|
outline: none;
|
|
}
|
|
:root[data-input='mouse'] .command-card:focus-visible {
|
|
outline: 2px solid var(--fleet);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.command-card-lead-icon {
|
|
flex-shrink: 0;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--muted);
|
|
}
|
|
.command-card-lead-icon svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
display: block;
|
|
}
|
|
|
|
.command-card-body {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.command-card-name {
|
|
font-size: 15px;
|
|
color: var(--text);
|
|
font-weight: 600;
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
.command-card-desc {
|
|
font-size: 14px;
|
|
color: var(--muted);
|
|
line-height: 19px;
|
|
}
|
|
|
|
.command-card-chevron {
|
|
color: var(--muted);
|
|
font-size: 18px;
|
|
flex-shrink: 0;
|
|
line-height: 1;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.command-grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
.command-card {
|
|
padding: 12px 14px;
|
|
border-radius: 8px;
|
|
}
|
|
.command-card-name {
|
|
font-size: 14px;
|
|
margin-bottom: 2px;
|
|
}
|
|
.command-card-desc {
|
|
font-size: 13px;
|
|
line-height: 17px;
|
|
}
|
|
}
|
|
|
|
/* ── Buttons ─────────────────────────────────────────────────────────── */
|
|
|
|
.btn-primary {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
background: var(--fleet);
|
|
color: #0c0c0e;
|
|
border: none;
|
|
border-radius: 8px;
|
|
padding: 10px 18px;
|
|
font: inherit;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
.btn-primary:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ── About / policy modal ───────────────────────────────────────────── */
|
|
/* Lightweight modal — fixed inside the widget iframe, not crossing into the
|
|
* host. Backdrop click + Escape close; no focus-trap library (small surface).
|
|
* Identical chrome to the Telegram widget's «О боте» modal. */
|
|
|
|
.about-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(13, 14, 17, 0.72);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
padding: 20px;
|
|
animation: about-fade 0.15s ease-out;
|
|
}
|
|
|
|
@keyframes about-fade {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.about-panel {
|
|
background: var(--bg);
|
|
border: 1px solid var(--hairline);
|
|
border-radius: 14px;
|
|
width: 100%;
|
|
max-width: 520px;
|
|
max-height: 90vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.about-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 16px 18px;
|
|
border-bottom: 1px solid var(--divider);
|
|
}
|
|
|
|
.about-title {
|
|
flex: 1;
|
|
font-size: 17px;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
margin: 0;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.about-close-x {
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--muted);
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
font: inherit;
|
|
font-size: 24px;
|
|
line-height: 1;
|
|
transition: background 0.12s, color 0.12s;
|
|
}
|
|
.about-close-x:hover {
|
|
background: var(--surface);
|
|
color: var(--text);
|
|
}
|
|
|
|
.about-body {
|
|
padding: 16px 18px;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
.about-body p {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
line-height: 1.55;
|
|
color: var(--text);
|
|
}
|
|
.about-body a {
|
|
color: var(--fleet-soft);
|
|
text-decoration: underline;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.about-body a:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.about-footer {
|
|
padding: 12px 18px 16px;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
border-top: 1px solid var(--divider);
|
|
}
|
|
|
|
/* ── Diagnostic banner (pre-bootstrap failure) ────────────────────── */
|
|
|
|
.error-banner {
|
|
margin: var(--section-pad-x);
|
|
padding: 14px 16px;
|
|
background: rgba(192, 142, 123, 0.08);
|
|
border: 1px solid var(--rose);
|
|
border-radius: 10px;
|
|
color: var(--rose);
|
|
font-size: 13px;
|
|
line-height: 19px;
|
|
}
|
|
|
|
.error-banner strong {
|
|
display: block;
|
|
margin-bottom: 4px;
|
|
color: var(--rose);
|
|
font-weight: 600;
|
|
}
|