| 1 |
/** |
| 2 |
* Mailchimp Analytics Page Styles |
| 3 |
* |
| 4 |
* @package Mailchimp |
| 5 |
*/ |
| 6 |
|
| 7 |
// ----------------------------------------------------------------------------- |
| 8 |
// Breakpoints. |
| 9 |
// ----------------------------------------------------------------------------- |
| 10 |
$mq-small: 782px; |
| 11 |
$mq-medium: 900px; |
| 12 |
$mq-xs: 600px; |
| 13 |
|
| 14 |
body.mailchimp_page_mailchimp_sf_analytics { |
| 15 |
background-color: #f6f7f7; |
| 16 |
} |
| 17 |
|
| 18 |
// ----------------------------------------------------------------------------- |
| 19 |
// Accessibility utilities |
| 20 |
// |
| 21 |
// `screen-reader-text` mirrors WP core's utility, visually hides content |
| 22 |
// while keeping it readable by assistive tech. Defined locally so the |
| 23 |
// styles still apply if WP core's stylesheet load order changes. |
| 24 |
// ----------------------------------------------------------------------------- |
| 25 |
.mailchimp_page_mailchimp_sf_analytics .screen-reader-text { |
| 26 |
border: 0; |
| 27 |
clip: rect(1px, 1px, 1px, 1px); |
| 28 |
clip-path: inset(50%); |
| 29 |
height: 1px; |
| 30 |
margin: -1px; |
| 31 |
overflow: hidden; |
| 32 |
padding: 0; |
| 33 |
position: absolute; |
| 34 |
width: 1px; |
| 35 |
word-wrap: normal !important; |
| 36 |
} |
| 37 |
|
| 38 |
.mailchimp-sf-analytics-filter-group__label { |
| 39 |
color: #1d2327; |
| 40 |
font-size: 14px; |
| 41 |
font-weight: 400; |
| 42 |
} |
| 43 |
|
| 44 |
// Consistent keyboard-only focus ring across every interactive control on the analytics page. |
| 45 |
.mailchimp_page_mailchimp_sf_analytics .mailchimp-sf-button:focus-visible, |
| 46 |
.mailchimp_page_mailchimp_sf_analytics button:focus-visible { |
| 47 |
box-shadow: 0 0 0 2px var(--mailchimp-color-link, #017e89); |
| 48 |
outline: 2px solid transparent; |
| 49 |
outline-offset: 2px; |
| 50 |
} |
| 51 |
|
| 52 |
// ----------------------------------------------------------------------------- |
| 53 |
// Filters toolbar |
| 54 |
// ----------------------------------------------------------------------------- |
| 55 |
.mailchimp-sf-analytics-filters { |
| 56 |
align-items: flex-end; |
| 57 |
display: flex; |
| 58 |
flex-wrap: wrap; |
| 59 |
gap: 16px; |
| 60 |
margin-bottom: 20px; |
| 61 |
} |
| 62 |
|
| 63 |
.mailchimp-sf-analytics-filter-group { |
| 64 |
display: flex; |
| 65 |
flex-direction: column; |
| 66 |
gap: 4px; |
| 67 |
|
| 68 |
> label { |
| 69 |
color: #1d2327; |
| 70 |
font-size: 14px; |
| 71 |
font-weight: 400; |
| 72 |
} |
| 73 |
|
| 74 |
select { |
| 75 |
background-color: #fff; |
| 76 |
border: 1px solid #8c8f94; |
| 77 |
border-radius: 4px; |
| 78 |
color: #1d2327; |
| 79 |
font-size: 14px; |
| 80 |
height: 36px; |
| 81 |
min-width: 180px; |
| 82 |
padding: 0 8px; |
| 83 |
|
| 84 |
&:focus-visible { |
| 85 |
border-color: var(--mailchimp-color-link, #017e89); |
| 86 |
box-shadow: 0 0 0 2px var(--mailchimp-color-link, #017e89); |
| 87 |
outline: 2px solid transparent; |
| 88 |
outline-offset: 2px; |
| 89 |
} |
| 90 |
} |
| 91 |
} |
| 92 |
|
| 93 |
// ----------------------------------------------------------------------------- |
| 94 |
// Date picker trigger + popover |
| 95 |
// ----------------------------------------------------------------------------- |
| 96 |
.mailchimp-sf-date-picker { |
| 97 |
position: relative; |
| 98 |
|
| 99 |
&.is-open .mailchimp-sf-date-picker-trigger { |
| 100 |
background-color: rgba(1, 126, 137, 0.08); |
| 101 |
border-color: var(--mailchimp-color-link, #017e89); |
| 102 |
box-shadow: 0 0 0 1px var(--mailchimp-color-link, #017e89); |
| 103 |
} |
| 104 |
} |
| 105 |
|
| 106 |
.mailchimp-sf-date-picker-trigger { |
| 107 |
align-items: center; |
| 108 |
background-color: #fff; |
| 109 |
border: 1px solid #c3ced5; |
| 110 |
border-radius: 6px; |
| 111 |
color: var(--mailchimp-color-text); |
| 112 |
cursor: pointer; |
| 113 |
display: inline-flex; |
| 114 |
font-size: 14px; |
| 115 |
gap: 8px; |
| 116 |
height: 40px; |
| 117 |
justify-content: space-between; |
| 118 |
min-width: 290px; |
| 119 |
padding-block: 0; |
| 120 |
padding-inline-start: 12px; |
| 121 |
padding-inline-end: 44px; /* room for the absolutely-positioned indicator */ |
| 122 |
text-align: start; /* RTL-aware */ |
| 123 |
transition: all 0.2s; |
| 124 |
white-space: nowrap; |
| 125 |
|
| 126 |
&:hover { |
| 127 |
border-color: var(--mailchimp-color-link, #017e89); |
| 128 |
} |
| 129 |
|
| 130 |
&:focus-visible { |
| 131 |
border-color: var(--mailchimp-color-link, #017e89); |
| 132 |
box-shadow: 0 0 0 2px var(--mailchimp-color-link, #017e89); |
| 133 |
outline: 2px solid transparent; |
| 134 |
outline-offset: 2px; |
| 135 |
} |
| 136 |
|
| 137 |
.dashicons { |
| 138 |
color: #50575e; |
| 139 |
font-size: 18px; |
| 140 |
height: 18px; |
| 141 |
line-height: 18px; |
| 142 |
width: 18px; |
| 143 |
} |
| 144 |
|
| 145 |
.indicator-date-picker { |
| 146 |
align-items: center; |
| 147 |
display: flex; |
| 148 |
position: absolute; |
| 149 |
top: 0; |
| 150 |
bottom: 0; |
| 151 |
inset-inline-end: 0; /* RTL-aware */ |
| 152 |
pointer-events: none; |
| 153 |
justify-content: center; |
| 154 |
padding: 0 10px; |
| 155 |
width: 36px; |
| 156 |
border-inline-start: 1px solid #c3ced5; /* visual separator between text and icon */ |
| 157 |
|
| 158 |
svg { |
| 159 |
display: block; |
| 160 |
fill: #50575e; |
| 161 |
height: 18px; |
| 162 |
width: 18px; |
| 163 |
} |
| 164 |
} |
| 165 |
|
| 166 |
#mailchimp-sf-date-picker-label { |
| 167 |
overflow: hidden; |
| 168 |
text-overflow: ellipsis; |
| 169 |
} |
| 170 |
} |
| 171 |
|
| 172 |
.mailchimp-sf-date-picker-popover { |
| 173 |
background: #fff; |
| 174 |
border: 1px solid #dcdcde; |
| 175 |
border-radius: 8px; |
| 176 |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
| 177 |
display: none; |
| 178 |
inset-inline-start: 0; /* RTL-aware */ |
| 179 |
min-width: 480px; |
| 180 |
padding: 20px; |
| 181 |
position: absolute; |
| 182 |
top: calc(100% + 6px); |
| 183 |
z-index: 100; |
| 184 |
|
| 185 |
&.is-open { |
| 186 |
display: block; |
| 187 |
} |
| 188 |
} |
| 189 |
|
| 190 |
.mailchimp-sf-date-picker-popover-row { |
| 191 |
display: flex; |
| 192 |
gap: 12px; |
| 193 |
margin-bottom: 16px; |
| 194 |
} |
| 195 |
|
| 196 |
.mailchimp-sf-date-picker-field { |
| 197 |
display: flex; |
| 198 |
flex: 1; |
| 199 |
flex-direction: column; |
| 200 |
gap: 6px; |
| 201 |
|
| 202 |
label { |
| 203 |
color: #4a5565; |
| 204 |
font-size: 14px; |
| 205 |
font-weight: 400; |
| 206 |
} |
| 207 |
} |
| 208 |
|
| 209 |
.mailchimp-sf-date-picker-input-wrap { |
| 210 |
position: relative; |
| 211 |
width: 100%; |
| 212 |
} |
| 213 |
|
| 214 |
.mailchimp-sf-date-picker-field-calendar { |
| 215 |
align-items: center; |
| 216 |
bottom: 0; |
| 217 |
display: flex; |
| 218 |
justify-content: center; |
| 219 |
padding: 0 6px; |
| 220 |
pointer-events: none; |
| 221 |
position: absolute; |
| 222 |
inset-inline-end: 0; /* RTL-aware */ |
| 223 |
top: 0; |
| 224 |
|
| 225 |
svg { |
| 226 |
display: block; |
| 227 |
fill: #50575e; |
| 228 |
height: 18px; |
| 229 |
width: 18px; |
| 230 |
} |
| 231 |
} |
| 232 |
|
| 233 |
#mailchimp-sf-settings-page .mailchimp-sf-date-picker-field { |
| 234 |
|
| 235 |
select, |
| 236 |
input[type="text"]="text""] { |
| 237 |
background-color: #fff; |
| 238 |
color: #1d2327; |
| 239 |
font-size: 14px; |
| 240 |
height: 36px; |
| 241 |
width: 100%; |
| 242 |
|
| 243 |
&:focus-visible { |
| 244 |
border-color: var(--mailchimp-color-link, #017e89); |
| 245 |
box-shadow: 0 0 0 2px var(--mailchimp-color-link, #017e89); |
| 246 |
outline: 2px solid transparent; |
| 247 |
outline-offset: 2px; |
| 248 |
} |
| 249 |
} |
| 250 |
|
| 251 |
.mailchimp-sf-date-picker-input-wrap input[type="text"]="text""] { |
| 252 |
padding-inline-start: 8px; |
| 253 |
padding-inline-end: 30px; /* RTL-aware: leave room for the calendar icon */ |
| 254 |
} |
| 255 |
} |
| 256 |
|
| 257 |
// Popover actions — pill shape to match design |
| 258 |
.mailchimp-sf-date-picker-actions { |
| 259 |
display: flex; |
| 260 |
gap: 8px; |
| 261 |
justify-content: flex-end; |
| 262 |
} |
| 263 |
|
| 264 |
// ----------------------------------------------------------------------------- |
| 265 |
// Content area |
| 266 |
// ----------------------------------------------------------------------------- |
| 267 |
.mailchimp-sf-analytics-content { |
| 268 |
background: #fff; |
| 269 |
border: 1px solid #d3d0c8; |
| 270 |
border-radius: 8px; |
| 271 |
box-sizing: border-box; |
| 272 |
margin-bottom: 20px; |
| 273 |
min-height: 200px; |
| 274 |
overflow: auto; |
| 275 |
padding: 24px; |
| 276 |
width: 100%; |
| 277 |
} |
| 278 |
|
| 279 |
.mailchimp-sf-analytics-placeholder { |
| 280 |
align-items: center; |
| 281 |
color: #8c8f94; |
| 282 |
display: flex; |
| 283 |
font-size: 15px; |
| 284 |
justify-content: center; |
| 285 |
min-height: 200px; |
| 286 |
} |
| 287 |
|
| 288 |
// ----------------------------------------------------------------------------- |
| 289 |
// Deep link |
| 290 |
// ----------------------------------------------------------------------------- |
| 291 |
.mailchimp-sf-analytics-deep-link { |
| 292 |
margin-top: 16px; |
| 293 |
|
| 294 |
a { |
| 295 |
align-items: center; |
| 296 |
display: inline-flex; |
| 297 |
gap: 6px; |
| 298 |
|
| 299 |
&:hover { |
| 300 |
color: #ffffff; |
| 301 |
} |
| 302 |
} |
| 303 |
|
| 304 |
.dashicons { |
| 305 |
font-size: 16px; |
| 306 |
height: 16px; |
| 307 |
line-height: 16px; |
| 308 |
width: 16px; |
| 309 |
} |
| 310 |
} |
| 311 |
|
| 312 |
// ----------------------------------------------------------------------------- |
| 313 |
// Datepicker calendar cell |
| 314 |
// ----------------------------------------------------------------------------- |
| 315 |
.datepicker-cell.selected, |
| 316 |
.datepicker-cell.selected:hover { |
| 317 |
background-color: var(--mailchimp-color-link, #017e89); |
| 318 |
color: #fff; |
| 319 |
} |
| 320 |
|
| 321 |
// ----------------------------------------------------------------------------- |
| 322 |
// Analytics card (shared shell for chart sections) |
| 323 |
// ----------------------------------------------------------------------------- |
| 324 |
.mailchimp-sf-analytics-card { |
| 325 |
// Color tokens are defined on the card so any descendant can reference them |
| 326 |
// and theming can override at the card level without leaking to the admin. |
| 327 |
--mc-sa-text-strong: #241c15; |
| 328 |
--mc-sa-text-muted: #464e54; |
| 329 |
--mc-sa-text-body: #374151; |
| 330 |
--mc-sa-border: #dddddd; |
| 331 |
--mc-sa-skeleton-grid: #F4F4F5; |
| 332 |
--mc-sa-blue: #2b72fb; |
| 333 |
--mc-sa-red: #fa4b42; |
| 334 |
--mc-sa-grey: #9ca3af; |
| 335 |
--mc-sa-notice-bg: #eff6ff; |
| 336 |
--mc-sa-notice-border: #bfdbfe; |
| 337 |
--mc-sa-notice-text: #1e3a8a; |
| 338 |
--mc-sa-error-bg: #fef2f2; |
| 339 |
--mc-sa-error-border: #f25f25; |
| 340 |
--mc-sa-error-text: #d03e04; |
| 341 |
--mc-sa-error-title: #d03e04; |
| 342 |
|
| 343 |
background: #fff; |
| 344 |
border: 1px solid var(--mc-sa-border); |
| 345 |
border-radius: 12px; |
| 346 |
box-sizing: border-box; |
| 347 |
margin-bottom: 20px; |
| 348 |
padding: 24px; |
| 349 |
position: relative; |
| 350 |
|
| 351 |
&__header { |
| 352 |
border-bottom: 1px solid var(--mc-sa-border); |
| 353 |
margin-bottom: 20px; |
| 354 |
padding-bottom: 16px; |
| 355 |
} |
| 356 |
|
| 357 |
&__title { |
| 358 |
color: var(--mc-sa-text-strong); |
| 359 |
font-size: 24px; |
| 360 |
font-weight: 500; |
| 361 |
line-height: 1.25; |
| 362 |
margin: 0 0 4px; |
| 363 |
} |
| 364 |
|
| 365 |
&__subtitle { |
| 366 |
color: var(--mc-sa-text-muted); |
| 367 |
font-size: 14px; |
| 368 |
line-height: 1.35; |
| 369 |
margin: 0; |
| 370 |
} |
| 371 |
} |
| 372 |
|
| 373 |
// ----------------------------------------------------------------------------- |
| 374 |
// Audience Overview KPI block |
| 375 |
// ----------------------------------------------------------------------------- |
| 376 |
.mailchimp-sf-ao { |
| 377 |
|
| 378 |
&__metrics { |
| 379 |
display: grid; |
| 380 |
gap: 24px; |
| 381 |
grid-template-columns: repeat(4, minmax(0, 1fr)); |
| 382 |
margin: 0 0 16px; |
| 383 |
} |
| 384 |
|
| 385 |
&__metric { |
| 386 |
display: flex; |
| 387 |
flex-direction: column; |
| 388 |
min-width: 0; |
| 389 |
} |
| 390 |
|
| 391 |
&__metric-label { |
| 392 |
align-self: flex-start; |
| 393 |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
| 394 |
color: var(--mc-sa-text-strong); |
| 395 |
font-size: 14px; |
| 396 |
font-weight: 600; |
| 397 |
margin: 0; |
| 398 |
|
| 399 |
&::after { |
| 400 |
background-image: linear-gradient( |
| 401 |
90deg, |
| 402 |
color-mix(in srgb, var(--mailchimp-color-link, #017e89) 45%, #ffffff) 5px, |
| 403 |
transparent 5px |
| 404 |
); |
| 405 |
background-repeat: repeat-x; |
| 406 |
background-size: 9px 2px; |
| 407 |
content: ""; |
| 408 |
display: block; |
| 409 |
height: 2px; |
| 410 |
margin-top: 6px; |
| 411 |
} |
| 412 |
} |
| 413 |
|
| 414 |
&__metric-value { |
| 415 |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
| 416 |
color: var(--mc-sa-text-strong); |
| 417 |
font-size: 32px; |
| 418 |
font-weight: 700; |
| 419 |
letter-spacing: -0.01em; |
| 420 |
line-height: 1.1; |
| 421 |
margin: 8px 0 0; |
| 422 |
} |
| 423 |
|
| 424 |
&.is-loading &__metric-value, |
| 425 |
&.is-error &__metric-value { |
| 426 |
color: #6b7280; |
| 427 |
} |
| 428 |
|
| 429 |
&__error-banner { |
| 430 |
align-items: center; |
| 431 |
background: var(--mc-sa-error-bg); |
| 432 |
border: 1px solid var(--mc-sa-error-border); |
| 433 |
border-radius: 8px; |
| 434 |
display: flex; |
| 435 |
gap: 12px; |
| 436 |
margin: 4px 0 16px; |
| 437 |
padding: 12px 14px; |
| 438 |
|
| 439 |
&[hidden]] { |
| 440 |
display: none; |
| 441 |
} |
| 442 |
} |
| 443 |
|
| 444 |
&__error-banner-icon { |
| 445 |
align-items: center; |
| 446 |
color: var(--mc-sa-error-text); |
| 447 |
display: inline-flex; |
| 448 |
flex-shrink: 0; |
| 449 |
justify-content: center; |
| 450 |
line-height: 0; |
| 451 |
} |
| 452 |
|
| 453 |
&__error-banner-body { |
| 454 |
flex: 1 1 auto; |
| 455 |
min-width: 0; |
| 456 |
} |
| 457 |
|
| 458 |
&__error-banner-title { |
| 459 |
color: var(--mc-sa-error-title); |
| 460 |
font-size: 13px; |
| 461 |
font-weight: 600; |
| 462 |
line-height: 1.3; |
| 463 |
margin: 0 0 2px; |
| 464 |
} |
| 465 |
|
| 466 |
&__error-banner-message { |
| 467 |
color: var(--mc-sa-error-text); |
| 468 |
font-size: 13px; |
| 469 |
line-height: 1.4; |
| 470 |
margin: 0; |
| 471 |
} |
| 472 |
|
| 473 |
&__error-banner-action { |
| 474 |
flex-shrink: 0; |
| 475 |
} |
| 476 |
|
| 477 |
button#mailchimp-sf-ao-error-retry { |
| 478 |
background-color: #fff; |
| 479 |
border: 1px solid #ccd6dc; |
| 480 |
|
| 481 |
&:hover, |
| 482 |
&:focus, |
| 483 |
&:active { |
| 484 |
background-color: #f6f7f7; |
| 485 |
} |
| 486 |
} |
| 487 |
} |
| 488 |
|
| 489 |
@media screen and (max-width: $mq-medium) { |
| 490 |
|
| 491 |
.mailchimp-sf-ao__metrics { |
| 492 |
grid-template-columns: repeat(2, minmax(0, 1fr)); |
| 493 |
} |
| 494 |
} |
| 495 |
|
| 496 |
@media screen and (max-width: $mq-xs) { |
| 497 |
|
| 498 |
.mailchimp-sf-ao__metrics { |
| 499 |
grid-template-columns: 1fr; |
| 500 |
} |
| 501 |
|
| 502 |
.mailchimp-sf-ao__metric-value { |
| 503 |
font-size: 28px; |
| 504 |
} |
| 505 |
} |
| 506 |
|
| 507 |
// ----------------------------------------------------------------------------- |
| 508 |
// Shared analytics chart-card |
| 509 |
// ----------------------------------------------------------------------------- |
| 510 |
.mailchimp-sf-fp, |
| 511 |
.mailchimp-sf-sa { |
| 512 |
|
| 513 |
&__chart { |
| 514 |
min-width: 0; |
| 515 |
} |
| 516 |
|
| 517 |
&__chart-title { |
| 518 |
color: var(--mc-sa-text-strong); |
| 519 |
font-size: 16px; |
| 520 |
font-weight: 500; |
| 521 |
margin: 0 0 4px; |
| 522 |
} |
| 523 |
|
| 524 |
&__chart-subtitle { |
| 525 |
color: var(--mc-sa-text-muted); |
| 526 |
font-size: 12px; |
| 527 |
font-weight: 400; |
| 528 |
line-height: 1.35; |
| 529 |
margin: 0 0 16px; |
| 530 |
} |
| 531 |
|
| 532 |
&__canvas-wrap { |
| 533 |
height: 340px; |
| 534 |
position: relative; |
| 535 |
width: 100%; |
| 536 |
|
| 537 |
canvas { |
| 538 |
display: block; |
| 539 |
height: 100% !important; |
| 540 |
width: 100% !important; |
| 541 |
} |
| 542 |
} |
| 543 |
|
| 544 |
&__canvas { |
| 545 |
position: relative; |
| 546 |
transition: opacity 150ms ease; |
| 547 |
z-index: 1; |
| 548 |
} |
| 549 |
|
| 550 |
&__skeleton-bars { |
| 551 |
align-items: flex-end; |
| 552 |
bottom: 42%; |
| 553 |
display: none; |
| 554 |
gap: 16px; |
| 555 |
justify-content: center; |
| 556 |
left: 0; |
| 557 |
padding: 4px 0 0; |
| 558 |
pointer-events: none; |
| 559 |
position: absolute; |
| 560 |
right: 0; |
| 561 |
top: 0; |
| 562 |
|
| 563 |
span { |
| 564 |
background: var(--mc-sa-border); |
| 565 |
border-radius: 2px; |
| 566 |
display: block; |
| 567 |
width: 18px; |
| 568 |
} |
| 569 |
|
| 570 |
span:nth-child(1) { height: 96px; } |
| 571 |
span:nth-child(2) { height: 53px; } |
| 572 |
span:nth-child(3) { height: 122px; } |
| 573 |
span:nth-child(4) { height: 80px; } |
| 574 |
span:nth-child(5) { height: 40px; } |
| 575 |
} |
| 576 |
|
| 577 |
&__error-banner { |
| 578 |
align-items: center; |
| 579 |
background: var(--mc-sa-error-bg); |
| 580 |
border: 1px solid var(--mc-sa-error-border); |
| 581 |
border-radius: 8px; |
| 582 |
display: flex; |
| 583 |
gap: 12px; |
| 584 |
margin: 4px 0 16px; |
| 585 |
padding: 12px 14px; |
| 586 |
|
| 587 |
&[hidden]] { |
| 588 |
display: none; |
| 589 |
} |
| 590 |
} |
| 591 |
|
| 592 |
&__error-banner-icon { |
| 593 |
align-items: center; |
| 594 |
color: var(--mc-sa-error-text); |
| 595 |
display: inline-flex; |
| 596 |
flex-shrink: 0; |
| 597 |
justify-content: center; |
| 598 |
line-height: 0; |
| 599 |
} |
| 600 |
|
| 601 |
&__error-banner-body { |
| 602 |
flex: 1 1 auto; |
| 603 |
min-width: 0; |
| 604 |
} |
| 605 |
|
| 606 |
&__error-banner-title { |
| 607 |
color: var(--mc-sa-error-title); |
| 608 |
font-size: 13px; |
| 609 |
font-weight: 600; |
| 610 |
line-height: 1.3; |
| 611 |
margin: 0 0 2px; |
| 612 |
} |
| 613 |
|
| 614 |
&__error-banner-message { |
| 615 |
color: var(--mc-sa-error-text); |
| 616 |
font-size: 13px; |
| 617 |
line-height: 1.4; |
| 618 |
margin: 0; |
| 619 |
} |
| 620 |
|
| 621 |
&__error-banner-action { |
| 622 |
flex-shrink: 0; |
| 623 |
} |
| 624 |
} |
| 625 |
|
| 626 |
// ----------------------------------------------------------------------------- |
| 627 |
// Form performance — card-specific rules |
| 628 |
// ----------------------------------------------------------------------------- |
| 629 |
.mailchimp-sf-fp { |
| 630 |
|
| 631 |
&__body { |
| 632 |
margin-top: 24px; |
| 633 |
|
| 634 |
&[hidden]] { |
| 635 |
display: none; |
| 636 |
} |
| 637 |
} |
| 638 |
|
| 639 |
&__chart-heading { |
| 640 |
margin-bottom: 8px; |
| 641 |
} |
| 642 |
|
| 643 |
// Centered overlay (used for empty / error). Loading state below |
| 644 |
// repositions it below the skeleton bars. |
| 645 |
&__overlay { |
| 646 |
align-items: center; |
| 647 |
bottom: 0; |
| 648 |
color: #666666; |
| 649 |
display: none; |
| 650 |
font-size: 14px; |
| 651 |
font-weight: 500; |
| 652 |
justify-content: center; |
| 653 |
left: 0; |
| 654 |
padding: 16px; |
| 655 |
pointer-events: none; |
| 656 |
position: absolute; |
| 657 |
right: 0; |
| 658 |
text-align: center; |
| 659 |
top: 0; |
| 660 |
z-index: 2; |
| 661 |
} |
| 662 |
|
| 663 |
&.is-loading, |
| 664 |
&.is-empty, |
| 665 |
&.is-error { |
| 666 |
|
| 667 |
.mailchimp-sf-fp__canvas { |
| 668 |
opacity: 0; |
| 669 |
} |
| 670 |
|
| 671 |
.mailchimp-sf-fp__canvas-wrap { |
| 672 |
background-image: |
| 673 |
linear-gradient(to right, var(--mc-sa-skeleton-grid) 1px, transparent 1px), |
| 674 |
linear-gradient(to bottom, var(--mc-sa-skeleton-grid) 1px, transparent 1px); |
| 675 |
background-position: 0 100%; |
| 676 |
background-size: calc(100% / 7) calc(100% / 8); |
| 677 |
} |
| 678 |
|
| 679 |
.mailchimp-sf-fp__skeleton-bars { |
| 680 |
display: flex; |
| 681 |
} |
| 682 |
} |
| 683 |
|
| 684 |
&.is-loading, |
| 685 |
&.is-empty { |
| 686 |
|
| 687 |
.mailchimp-sf-fp__overlay { |
| 688 |
align-items: flex-start; |
| 689 |
padding-top: 28px; |
| 690 |
top: 60%; |
| 691 |
display: flex; |
| 692 |
} |
| 693 |
} |
| 694 |
|
| 695 |
&.is-loading { |
| 696 |
|
| 697 |
.mailchimp-sf-fp__skeleton-bars span, |
| 698 |
.mailchimp-sf-fp__overlay { |
| 699 |
animation: mailchimp-sf-sa-pulse 1.4s ease-in-out infinite; |
| 700 |
} |
| 701 |
} |
| 702 |
|
| 703 |
button#mailchimp-sf-fp-error-retry { |
| 704 |
background-color: #fff; |
| 705 |
border: 1px solid #ccd6dc; |
| 706 |
|
| 707 |
&:hover, |
| 708 |
&:focus, |
| 709 |
&:active { |
| 710 |
background-color: #f6f7f7; |
| 711 |
} |
| 712 |
} |
| 713 |
} |
| 714 |
|
| 715 |
@media screen and (max-width: $mq-xs) { |
| 716 |
|
| 717 |
.mailchimp-sf-fp__canvas-wrap { |
| 718 |
height: 240px; |
| 719 |
} |
| 720 |
} |
| 721 |
|
| 722 |
// ----------------------------------------------------------------------------- |
| 723 |
// Subscriber activity section |
| 724 |
// ----------------------------------------------------------------------------- |
| 725 |
.mailchimp-sf-sa { |
| 726 |
|
| 727 |
// Body grid — chart column + totals column |
| 728 |
&__body { |
| 729 |
align-items: stretch; |
| 730 |
display: grid; |
| 731 |
gap: 32px; |
| 732 |
grid-template-columns: minmax(0, 1fr) 320px; |
| 733 |
margin-top: 32px; |
| 734 |
|
| 735 |
&[hidden]] { |
| 736 |
display: none; |
| 737 |
} |
| 738 |
} |
| 739 |
|
| 740 |
// Totals column |
| 741 |
&__totals { |
| 742 |
border-left: 1px solid var(--mc-sa-border); |
| 743 |
display: flex; |
| 744 |
flex-direction: column; |
| 745 |
padding-left: 32px; |
| 746 |
} |
| 747 |
|
| 748 |
&__totals-title { |
| 749 |
border-bottom: 1px solid var(--mc-sa-border); |
| 750 |
color: var(--mc-sa-text-strong); |
| 751 |
font-size: 14px; |
| 752 |
font-weight: 500; |
| 753 |
margin: 0 0 20px; |
| 754 |
padding-bottom: 12px; |
| 755 |
} |
| 756 |
|
| 757 |
&__donut-wrap { |
| 758 |
height: 160px; |
| 759 |
margin: 8px auto 24px; |
| 760 |
position: relative; |
| 761 |
width: 160px; |
| 762 |
|
| 763 |
canvas { |
| 764 |
display: block; |
| 765 |
height: 100% !important; |
| 766 |
width: 100% !important; |
| 767 |
} |
| 768 |
} |
| 769 |
|
| 770 |
&__donut-center { |
| 771 |
align-items: center; |
| 772 |
display: flex; |
| 773 |
inset: 0; |
| 774 |
justify-content: center; |
| 775 |
pointer-events: none; |
| 776 |
position: absolute; |
| 777 |
} |
| 778 |
|
| 779 |
&__net { |
| 780 |
color: var(--mc-sa-text-strong); |
| 781 |
font-size: 32px; |
| 782 |
font-weight: 700; |
| 783 |
letter-spacing: -0.02em; |
| 784 |
line-height: 1; |
| 785 |
} |
| 786 |
|
| 787 |
// Legend |
| 788 |
&__legend { |
| 789 |
display: flex; |
| 790 |
flex-direction: column; |
| 791 |
gap: 10px; |
| 792 |
list-style: none; |
| 793 |
margin: 0; |
| 794 |
padding: 0; |
| 795 |
} |
| 796 |
|
| 797 |
&__legend-item { |
| 798 |
align-items: center; |
| 799 |
color: var(--mc-sa-text-body); |
| 800 |
display: grid; |
| 801 |
font-size: 13px; |
| 802 |
gap: 10px; |
| 803 |
grid-template-columns: 14px 1fr auto; |
| 804 |
margin: 0; |
| 805 |
|
| 806 |
&.is-new .mailchimp-sf-sa__legend-swatch { |
| 807 |
background: var(--mc-sa-blue); |
| 808 |
} |
| 809 |
|
| 810 |
&.is-unsub .mailchimp-sf-sa__legend-swatch { |
| 811 |
background: var(--mc-sa-red); |
| 812 |
} |
| 813 |
} |
| 814 |
|
| 815 |
&__legend-swatch { |
| 816 |
background: var(--mc-sa-grey); |
| 817 |
border-radius: 3px; |
| 818 |
display: inline-block; |
| 819 |
height: 14px; |
| 820 |
width: 14px; |
| 821 |
} |
| 822 |
|
| 823 |
&__legend-label { |
| 824 |
color: var(--mc-sa-text-body); |
| 825 |
} |
| 826 |
|
| 827 |
&__legend-value { |
| 828 |
color: var(--mc-sa-text-strong); |
| 829 |
font-weight: 600; |
| 830 |
text-align: right; |
| 831 |
} |
| 832 |
|
| 833 |
// Notice (e.g. 180-day limited) |
| 834 |
&__notice { |
| 835 |
background: var(--mc-sa-notice-bg); |
| 836 |
border: 1px solid var(--mc-sa-notice-border); |
| 837 |
border-left-width: 4px; |
| 838 |
border-radius: 6px; |
| 839 |
color: var(--mc-sa-notice-text); |
| 840 |
font-size: 13px; |
| 841 |
line-height: 1.4; |
| 842 |
margin-bottom: 20px; |
| 843 |
padding: 10px 14px; |
| 844 |
} |
| 845 |
|
| 846 |
// Skeleton donut — outlined grey ring, same size as the real donut |
| 847 |
&__skeleton-donut { |
| 848 |
border: 20px solid var(--mc-sa-border); |
| 849 |
border-radius: 50%; |
| 850 |
box-sizing: border-box; |
| 851 |
display: none; |
| 852 |
height: 100%; |
| 853 |
inset: 0; |
| 854 |
pointer-events: none; |
| 855 |
position: absolute; |
| 856 |
width: 100%; |
| 857 |
} |
| 858 |
|
| 859 |
/* |
| 860 |
* Overlay message — sits in the bottom portion of the chart area, below |
| 861 |
* the skeleton bars. Top padding gives breathing room between the bars' |
| 862 |
* baseline and the copy. |
| 863 |
*/ |
| 864 |
&__overlay { |
| 865 |
align-items: flex-start; |
| 866 |
bottom: 0; |
| 867 |
color: #666666; |
| 868 |
display: none; |
| 869 |
font-size: 14px; |
| 870 |
font-weight: 500; |
| 871 |
height: 40%; |
| 872 |
justify-content: center; |
| 873 |
left: 0; |
| 874 |
padding: 28px 16px 0; |
| 875 |
pointer-events: none; |
| 876 |
position: absolute; |
| 877 |
right: 0; |
| 878 |
text-align: center; |
| 879 |
z-index: 2; |
| 880 |
} |
| 881 |
|
| 882 |
// ------------------------------------------------------------------------- |
| 883 |
// State modifiers: loading / empty / error |
| 884 |
// Loading + empty share the same skeleton presentation; error shows the |
| 885 |
// banner instead of the chart overlay but keeps the skeleton chrome. |
| 886 |
// ------------------------------------------------------------------------- |
| 887 |
&.is-loading, |
| 888 |
&.is-empty, |
| 889 |
&.is-error { |
| 890 |
|
| 891 |
// Fade the real canvases so skeletons show through. |
| 892 |
.mailchimp-sf-sa__canvas { |
| 893 |
opacity: 0; |
| 894 |
} |
| 895 |
|
| 896 |
// Full-width background grid on the canvas-wrap; visible across the |
| 897 |
// entire chart area (not only where the bars live). |
| 898 |
.mailchimp-sf-sa__canvas-wrap { |
| 899 |
background-image: |
| 900 |
linear-gradient(to right, var(--mc-sa-skeleton-grid) 1px, transparent 1px), |
| 901 |
linear-gradient(to bottom, var(--mc-sa-skeleton-grid) 1px, transparent 1px); |
| 902 |
background-position: 0 100%; |
| 903 |
background-size: calc(100% / 7) calc(100% / 8); |
| 904 |
} |
| 905 |
|
| 906 |
.mailchimp-sf-sa__skeleton-bars, |
| 907 |
.mailchimp-sf-sa__skeleton-donut { |
| 908 |
display: flex; |
| 909 |
} |
| 910 |
|
| 911 |
// Muted legend + center value while no real data is available. |
| 912 |
.mailchimp-sf-sa__net, |
| 913 |
.mailchimp-sf-sa__legend-label, |
| 914 |
.mailchimp-sf-sa__legend-value { |
| 915 |
color: #6b7280; |
| 916 |
} |
| 917 |
|
| 918 |
.mailchimp-sf-sa__legend-swatch { |
| 919 |
background: var(--mc-sa-border) !important; |
| 920 |
} |
| 921 |
} |
| 922 |
|
| 923 |
// The chart overlay is used for loading + empty messages only. In the |
| 924 |
// error state the banner above the body communicates the problem. |
| 925 |
&.is-loading, |
| 926 |
&.is-empty { |
| 927 |
|
| 928 |
.mailchimp-sf-sa__overlay { |
| 929 |
display: flex; |
| 930 |
} |
| 931 |
} |
| 932 |
|
| 933 |
// Pulse animation — skeleton + overlay "flash" while data is fetching. |
| 934 |
&.is-loading { |
| 935 |
|
| 936 |
.mailchimp-sf-sa__skeleton-bars span, |
| 937 |
.mailchimp-sf-sa__skeleton-donut, |
| 938 |
.mailchimp-sf-sa__overlay { |
| 939 |
animation: mailchimp-sf-sa-pulse 1.4s ease-in-out infinite; |
| 940 |
} |
| 941 |
} |
| 942 |
|
| 943 |
button#mailchimp-sf-sa-error-retry { |
| 944 |
background-color: #fff; |
| 945 |
border: 1px solid #ccd6dc; |
| 946 |
|
| 947 |
&:hover, |
| 948 |
&:focus, |
| 949 |
&:active { |
| 950 |
// color: var(--mailchimp-color-link); |
| 951 |
background-color: #f6f7f7; |
| 952 |
} |
| 953 |
} |
| 954 |
} |
| 955 |
|
| 956 |
@keyframes mailchimp-sf-sa-pulse { |
| 957 |
|
| 958 |
0%, |
| 959 |
100% { |
| 960 |
opacity: 1; |
| 961 |
} |
| 962 |
|
| 963 |
50% { |
| 964 |
opacity: 0.45; |
| 965 |
} |
| 966 |
} |
| 967 |
|
| 968 |
@media (prefers-reduced-motion: reduce) { |
| 969 |
|
| 970 |
.mailchimp-sf-fp.is-loading .mailchimp-sf-fp__skeleton-bars span, |
| 971 |
.mailchimp-sf-fp.is-loading .mailchimp-sf-fp__overlay, |
| 972 |
.mailchimp-sf-sa.is-loading .mailchimp-sf-sa__skeleton-bars span, |
| 973 |
.mailchimp-sf-sa.is-loading .mailchimp-sf-sa__skeleton-donut, |
| 974 |
.mailchimp-sf-sa.is-loading .mailchimp-sf-sa__overlay { |
| 975 |
animation: none; |
| 976 |
} |
| 977 |
} |
| 978 |
|
| 979 |
// ----------------------------------------------------------------------------- |
| 980 |
// Responsive |
| 981 |
// ----------------------------------------------------------------------------- |
| 982 |
@media screen and (max-width: $mq-small) { |
| 983 |
|
| 984 |
.mailchimp-sf-analytics-filters { |
| 985 |
align-items: stretch; |
| 986 |
flex-direction: column; |
| 987 |
} |
| 988 |
|
| 989 |
.mailchimp-sf-date-picker-popover { |
| 990 |
inset-inline-start: 0; /* RTL-aware */ |
| 991 |
min-width: auto; |
| 992 |
width: calc(100vw - 84px); |
| 993 |
} |
| 994 |
|
| 995 |
.mailchimp-sf-date-picker-popover-row { |
| 996 |
flex-direction: column; |
| 997 |
} |
| 998 |
|
| 999 |
.mailchimp-sf-date-picker-trigger { |
| 1000 |
min-width: auto; |
| 1001 |
width: 100%; |
| 1002 |
} |
| 1003 |
|
| 1004 |
.mailchimp-sf-analytics-filter-group select { |
| 1005 |
min-width: auto; |
| 1006 |
width: 100%; |
| 1007 |
} |
| 1008 |
} |
| 1009 |
|
| 1010 |
@media screen and (max-width: $mq-medium) { |
| 1011 |
|
| 1012 |
.mailchimp-sf-sa__body { |
| 1013 |
gap: 24px; |
| 1014 |
grid-template-columns: 1fr; |
| 1015 |
} |
| 1016 |
|
| 1017 |
.mailchimp-sf-sa__totals { |
| 1018 |
border-left: none; |
| 1019 |
border-top: 1px solid var(--mc-sa-border); |
| 1020 |
padding-left: 0; |
| 1021 |
padding-top: 24px; |
| 1022 |
} |
| 1023 |
} |
| 1024 |
|
| 1025 |
@media screen and (max-width: $mq-xs) { |
| 1026 |
|
| 1027 |
.mailchimp-sf-analytics-card { |
| 1028 |
padding: 16px; |
| 1029 |
} |
| 1030 |
|
| 1031 |
.mailchimp-sf-sa__canvas-wrap { |
| 1032 |
height: 240px; |
| 1033 |
} |
| 1034 |
|
| 1035 |
.mailchimp-sf-sa__donut-wrap { |
| 1036 |
height: 160px; |
| 1037 |
width: 160px; |
| 1038 |
} |
| 1039 |
|
| 1040 |
.mailchimp-sf-sa__net { |
| 1041 |
font-size: 28px; |
| 1042 |
} |
| 1043 |
} |
| 1044 |
|
| 1045 |
|
| 1046 |
/* RTL overrides */ |
| 1047 |
|
| 1048 |
[dir="rtl"]="rtl""] .mailchimp-sf-date-picker-trigger { |
| 1049 |
padding-inline-end: 44px; |
| 1050 |
padding-inline-start: 12px; |
| 1051 |
text-align: start; |
| 1052 |
} |
| 1053 |
|
| 1054 |
[dir="rtl"]="rtl""] .mailchimp-sf-date-picker-trigger .indicator-date-picker { |
| 1055 |
border-left: 0; |
| 1056 |
border-right: 1px solid #c3ced5; |
| 1057 |
left: 0; |
| 1058 |
right: auto; |
| 1059 |
} |
| 1060 |
|
| 1061 |
[dir="rtl"]="rtl""] .mailchimp-sf-date-picker-popover { |
| 1062 |
left: auto; |
| 1063 |
right: 0; |
| 1064 |
} |
| 1065 |
|
| 1066 |
[dir="rtl"]="rtl""] .mailchimp-sf-date-picker-field-calendar { |
| 1067 |
left: 0; |
| 1068 |
right: auto; |
| 1069 |
} |
| 1070 |
|
| 1071 |
[dir="rtl"]="rtl""] #mailchimp-sf-settings-page .mailchimp-sf-date-picker-field .mailchimp-sf-date-picker-input-wrap input[type="text"]="text""] { |
| 1072 |
padding-left: 30px; |
| 1073 |
padding-right: 8px; |
| 1074 |
} |
| 1075 |
|
| 1076 |
@media screen and (max-width: 782px) { |
| 1077 |
|
| 1078 |
[dir="rtl"]="rtl""] .mailchimp-sf-date-picker-popover { |
| 1079 |
left: auto; |
| 1080 |
right: 0; |
| 1081 |
} |
| 1082 |
} |
| 1083 |
|