Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 68 additions & 108 deletions components/analytics/AnalyticsModal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,118 +10,106 @@
z-index: 1000;
}

/* ── Modal shell ─────────────────────────────────────────── */
/* ── Modal shell ─────────────────────────────────────────────
Same box as the dashboard modal (see DashboardModal.module.css): sized off the
viewport on both axes so the two modals keep the same footprint through a
rotation and read as one family. */
.modal {
width: calc(100vw - 80px);
max-width: 1200px;
height: calc(100vh - 80px);
max-height: 900px;
width: min(1100px, 92vw);
height: min(840px, 90vh);
display: flex;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
/* ── Content area ────────────────────────────────────────────
The single pane: there is no nav sidebar, every section is stacked in the
scroll area below the header. */
.content {
flex: 1;
background: var(--editor-sidebar);
padding: 32px 0;
border-right: 1px solid var(--separator);
display: flex;
flex-direction: column;
padding: 30px;
background: var(--main-bg);
min-height: 0;
min-width: 0;
}

.sidebarTitle {
font-size: 1.2rem;
padding: 0 24px;
margin-bottom: 18px;
color: var(--primary-text);
}

.groupLabel {
font-family: var(--font-inter);
font-size: 0.7rem;
text-transform: uppercase;
color: var(--secondary-text);
margin-bottom: 5px;
margin-top: 14px;
padding: 0 12px;
opacity: 0.6;
}

.navMenu {
padding: 0 12px;
.contentHeader {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
flex-shrink: 0;
}

.navItem {
.title {
display: flex;
align-items: center;
width: 100%;
padding: 8px 12px;
gap: 12px;
gap: 8px;
color: var(--primary-text);
}

background: transparent;
border: none;
border-radius: 8px;
.title svg {
color: var(--secondary-text);
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s ease;
}

.navItem.active {
background: var(--editor-tab-active);
color: var(--primary-text);
font-weight: 600;
.scrollArea {
overflow-y: auto;
flex: 1;
min-height: 0;
scrollbar-gutter: stable;
padding-right: 20px;
}

.iconWrapper {
/* Same size/hover as the dashboard's close button. */
.close_btn {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 36px;
height: 36px;
border: none;
border-radius: 10px;
background: none;
color: var(--secondary-text);
cursor: pointer;
}

.iconWrapper.active svg {
.close_btn:hover {
background-color: var(--secondary-hover);
color: var(--primary-text);
}

.iconWrapper svg {
color: var(--secondary-text);
/* ── Sections ────────────────────────────────────────────────
All the analytics coexist in one scroll; the title is the only separator, with
a rule between consecutive sections to group each title with its own cards. */
.section + .section {
margin-top: 32px;
padding-top: 28px;
border-top: 1px solid var(--separator);
}

/* Content Area (2/3 Width) */
.content {
flex: 2;
.sectionTitle {
display: flex;
flex-direction: column;
padding: 30px;
background: var(--main-bg);
align-items: center;
gap: 8px;
margin-bottom: 14px;
font-size: 1rem;
font-weight: 600;
color: var(--primary-text);
}

.contentHeader {
.iconWrapper {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}

.scrollArea {
overflow-y: auto;
flex: 1;
scrollbar-gutter: stable;
padding-right: 20px;
justify-content: center;
}

.close_btn {
height: 22px;
width: 22px;
.iconWrapper svg {
color: var(--secondary-text);
cursor: pointer;
}

.close_btn:hover {
color: var(--primary-text);
}

/* ── Stats page layout ───────────────────────────────────── */
Expand Down Expand Up @@ -190,13 +178,15 @@
padding: 40px 0;
}

/* ── Reports placeholder ────────────────────────────────── */
/* ── Reports placeholder ────────────────────────────────────
Padded rather than `height: 100%`: it is now one block in a stacked scroll,
not a pane filling the modal on its own. */
.comingSoon {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
padding: 40px 0;
gap: 12px;
color: var(--secondary-text);
opacity: 0.5;
Expand All @@ -214,13 +204,11 @@
/* ── Phone ────────────────────────────────────────────────────
A dedicated layout (rendered via a JS fork on phone viewports — see
AnalyticsModal) that matches the other navbar tool sheets: a full-width
panel pinned below the navbar with a compact header, a section dropdown,
and a scrollable body. These classes are only mounted on phone, so no
media query is needed to gate them. */
panel pinned below the navbar with a compact header and a scrollable body.
These classes are only mounted on phone, so no media query is needed to gate
them. */

/* Transparent full-screen catcher for outside taps. Its z-index sits below
the portaled dropdown menu (.portal_menu, z-index 300) so the section
picker's menu renders above the sheet rather than behind it. */
/* Transparent full-screen catcher for outside taps. */
.mobileOverlay {
position: fixed;
inset: 0;
Expand Down Expand Up @@ -283,34 +271,6 @@
color: var(--primary-text);
}

/* Section picker row. */
.mobileToolbar {
padding: 12px 16px;
border-bottom: 1px solid var(--separator);
flex-shrink: 0;
}

/* Constrains the dropdown so it doesn't stretch the full panel width. */
.mobileTabField {
width: 200px;
max-width: 100%;
}

.tabSelectTrigger {
padding: 8px 12px;
background: var(--primary);
border: 1px solid var(--separator);
border-radius: 8px;
color: var(--primary-text);
font-size: 0.9rem;
}

.tabOption {
display: flex;
align-items: center;
gap: 12px;
}

/* Scrollable body — padded on the right so content clears the scrollbar. */
.mobileScroll {
flex: 1;
Expand Down
Loading
Loading