SyncMadeEasy/force-app/main/default/lwc/setup/setup.css

659 lines
15 KiB
CSS

:host {
--smepro-green: #5fa832;
--smepro-teal: #3f9a86;
}
/* ============================================================
Custom in-component toasts (replaces ShowToastEvent). Success uses the
brand green→teal gradient reference; error uses red. Fixed to the top-
center of the viewport, above the modals (z-index above .sw-modal-overlay).
============================================================ */
.sw-toast-container {
position: fixed;
top: 16px;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
width: 100%;
max-width: 420px;
pointer-events: none;
}
.sw-toast {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 14px 16px;
border-radius: 10px;
box-shadow: 0 12px 30px -10px rgba(23,43,32,.45);
color: #fff;
width: 100%;
box-sizing: border-box;
pointer-events: auto;
animation: sw-toast-in 180ms ease;
}
@keyframes sw-toast-in {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
.sw-toast-icon {
flex-shrink: 0;
font-size: 15px;
line-height: 1.3;
font-weight: 700;
}
.sw-toast-body {
flex: 1;
min-width: 0;
}
.sw-toast-title {
font-weight: 800;
font-size: 13.5px;
line-height: 1.3;
}
.sw-toast-message {
font-size: 12.5px;
line-height: 1.4;
opacity: .95;
margin-top: 2px;
word-break: break-word;
}
.sw-toast-close {
flex-shrink: 0;
background: transparent;
border: none;
color: inherit;
opacity: .85;
cursor: pointer;
font-size: 18px;
line-height: 1;
padding: 0;
font-family: inherit;
}
.sw-toast-close:hover { opacity: 1; }
/* Success → brand green→teal gradient (reference). */
.sw-toast-success {
background: linear-gradient(120deg, var(--smepro-green), var(--smepro-teal));
}
/* Error → red (reference). */
.sw-toast-error {
background: linear-gradient(120deg, #e9923d, #b56a1f);
}
/* Warning → amber; dark text for contrast. */
.sw-toast-warning {
background: #f59e0b;
color: #1f2937;
}
/* Info → blue. */
.sw-toast-info {
background: #3b7ec4;
}
:host {
font-family: 'Inter', system-ui, sans-serif;
color: #1c2b23;
display: block;
/* Stretch to whatever height home.css's .tall-column gives this
component, so .sw-card below can fill it and match the left
nav bar's height instead of only being as tall as its own content. */
height: 100%;
display: flex;
flex-direction: column;
}
/* Loading gif — sized so it doesn't render at native (huge) size before
the card appears. */
.pageLoading-Gif {
width: 30%;
margin-top: 2%;
}
.sw-loading-wrap {
height: 100%;
min-height: 75vh;
position: relative;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(180deg, #f4faee 0%, #eaf3fb 100%);
border-radius: 16px;
}
a {
color: #2f7d32;
text-decoration: none;
}
a:hover {
color: #1f5a22;
text-decoration: underline;
}
@keyframes sw-spin {
to { transform: rotate(360deg); }
}
/* Card */
.sw-card {
border: 1px solid #e6ebe6;
border-radius: 16px;
box-shadow: 0 10px 26px -16px rgba(23,43,32,.28);
overflow: hidden;
background: #fff;
/* Fill the full height handed down from :host (which matches the nav
bar's height); the footer is pushed to the bottom via margin-top:auto
below instead of sitting right after the checklist. */
height: 100%;
display: flex;
flex-direction: column;
}
.sw-card-header {
padding: 22px 26px;
border-bottom: 1px solid #e4ebe6;
background: linear-gradient(120deg,#f4faee 0%,#eaf3fb 100%);
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.sw-title {
margin: 0;
font-size: 19px;
font-weight: 800;
letter-spacing: -.01em;
color: #1c2b23;
}
.sw-subtitle {
margin: 6px 0 0;
font-size: 13px;
color: #6b786f;
max-width: 520px;
}
.sw-subtitle strong {
color: rgb(55, 69, 61);
}
/* Status pill */
.status-pill {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 7px;
font-size: 12px;
font-weight: 600;
padding: 6px 12px;
border-radius: 20px;
}
.status-pill_verified { background: #eef7e3; color: #4f8a24; }
.status-pill_ready { background: #fff8e6; color: #8a6d00; }
.status-pill_progress { background: #fdeaea; color: #c23934; }
.status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: currentColor;
display: inline-block;
}
/* Checklist */
.sw-checklist {
padding: 12px 22px 8px;
/* Absorb the extra height .sw-card now gets from :host, so the footer
below stays pinned to the bottom instead of trailing right after
the last task row. Laid out as a flex column (gap instead of each
row's margin-bottom) so the task rows below can flex-grow and share
that extra space between them instead of leaving one big blank
strip after the last row. */
flex: 1 1 auto;
overflow: auto;
display: flex;
flex-direction: column;
gap: 10px;
}
.task-row {
display: flex;
align-items: center;
gap: 14px;
padding: 16px 14px;
border-radius: 11px;
transition: background .15s, border-color .15s;
background: linear-gradient(120deg,#f4faee 0%,#eaf3fb 100%);
border: 1px solid #dce8dd;
box-shadow: 0 6px 18px -12px rgba(23,43,32,.22);
/* Grow to fill any extra height in .sw-checklist instead of staying at
min-content height and leaving blank space below the last row. */
flex: 1 1 0;
min-height: 74px;
}
.task-box {
flex-shrink: 0;
width: 22px;
height: 22px;
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
transition: all .15s;
background: #fff;
border: 2px solid #c8c8c8;
}
.task-box_done {
background: #5fa832;
border: 2px solid #5fa832;
}
.task-body {
flex: 1;
min-width: 0;
}
.task-title {
font-size: 14.5px;
font-weight: 700;
color: #26332b;
margin-bottom: 2px;
}
.task-desc {
font-size: 13px;
color: #6b786f;
line-height: 1.45;
}
.task-action {
display: inline-flex;
align-items: center;
gap: 5px;
margin-top: 7px;
font-size: 12.5px;
font-weight: 600;
cursor: pointer;
}
.task-action_disabled {
pointer-events: none;
opacity: .55;
cursor: default;
}
.task-tag-wrap {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 10px;
}
.task-tag {
font-size: 11px;
font-weight: 700;
padding: 3px 10px;
border-radius: 20px;
}
.task-tag_done { background: #e6f3d5; color: #4f8a24; }
.task-tag_required { background: #fdeaea; color: #c23934; }
/* Footer */
.sw-footer {
padding: 16px 26px 20px;
border-top: 1px solid #f0f2f0;
margin-top: 8px;
/* Keep pinned to the bottom of the now-taller .sw-card (flex column)
regardless of how much extra height the checklist above absorbs. */
flex-shrink: 0;
}
.sw-footer-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
}
.sw-footnote {
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
color: #6b786f;
}
.sw-required-note {
margin: 10px 0 0;
font-size: 12.5px;
color: #c23934;
text-align: right;
}
.sw-actions {
display: flex;
align-items: center;
gap: 10px;
}
.btn-check {
display: flex;
align-items: center;
gap: 8px;
background: #fff;
color: #37453d;
border: 1px solid #d4d9d4;
border-radius: 9px;
padding: 10px 18px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
font-family: inherit;
}
.btn-check_done {
color: #4f8a24;
border-color: #cfe3bd;
background: #f6faf1;
cursor: default;
}
.check-icon_spin {
animation: sw-spin .8s linear infinite;
transform-origin: center;
}
.btn-next {
display: flex;
align-items: center;
gap: 8px;
background: #c3ddb0;
color: #fff;
border: none;
border-radius: 9px;
padding: 10px 20px;
font-size: 13px;
font-weight: 700;
cursor: not-allowed;
font-family: inherit;
}
.btn-next_active {
background: linear-gradient(120deg,#5fa832,#2f8fb0);
cursor: pointer;
}
.btn-next:disabled {
cursor: not-allowed;
}
/* Modals (shared: site + certificate) */
.sw-modal-overlay {
position: fixed;
inset: 0;
z-index: 60;
background: rgba(23,43,32,.42);
backdrop-filter: blur(3px);
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.sw-modal {
width: min(720px, 100%);
background: #fff;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 24px 60px -18px rgba(23,43,32,.55), 0 0 0 1px rgba(95,168,50,.12);
}
.sw-modal_narrow {
width: min(420px, 100%);
text-align: center;
}
.sw-modal-accent {
height: 6px;
background: linear-gradient(90deg,#5fa832 0%,#3f9a86 50%,#2f8fb0 100%);
}
.sw-modal-body {
padding: 30px 34px 34px;
}
/* Create Certificate modal body only */
.sw-cert-body {
background: linear-gradient(120deg, rgb(244, 250, 238) 0%, rgb(234, 243, 251) 100%);
border: 1px solid rgb(220, 232, 226);
}
.sw-modal-body_center {
text-align: center;
padding-top: 16px;
}
.sw-modal-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
margin-bottom: 6px;
}
.sw-modal-title {
margin: 0;
font-size: 26px;
font-weight: 800;
letter-spacing: -.02em;
background: linear-gradient(100deg,#5fa832,#2f8fb0);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.sw-modal-close {
background: none;
border: none;
font-size: 22px;
line-height: 1;
cursor: pointer;
color: #6b786f;
}
.sw-modal-field {
margin-top: 22px;
}
.sw-modal-label {
display: block;
font-size: 13px;
font-weight: 600;
margin-bottom: 8px;
color: #37453d;
}
/* Site URL select: soft green-to-blue gradient fill with a green border,
matching the app's other gradient input treatments.
Uses a dedicated custom class (.sw-site-field) instead of reaching into
SLDS's own standard classes (.slds-input, .slds-combobox__input, etc.) —
those belong to <lightning-combobox>'s internal markup and live inside
its OWN shadow DOM anyway, so descendant selectors targeting them from
here could never actually match (they'd be silent no-ops). SLDS styling
hooks (CSS custom properties) are the supported way to reach in: custom
properties inherit through the shadow boundary, and lightning-combobox
reads these specific ones internally for its input's background/border/
radius. Setting them here on our own class (applied via class="sw-site-field"
on the <lightning-combobox> tag) is what actually paints the field. */
.sw-site-field {
--slds-c-input-color-background: linear-gradient(120deg, rgb(244, 250, 238) 0%, rgb(234, 243, 251) 100%);
--slds-c-input-color-background-focus: linear-gradient(120deg, rgb(244, 250, 238) 0%, rgb(234, 243, 251) 100%);
--slds-c-input-color-border: rgb(220, 232, 226);
--slds-c-input-color-border-focus: rgb(220, 232, 226);
--slds-c-input-radius-border: 11px;
}
.sw-site-field{
background: linear-gradient(120deg, rgb(244, 250, 238) 0%, rgb(234, 243, 251) 100%) !important;
border: 1px solid rgb(220, 232, 226) !important;
border-radius: 11px !important;
}
.req {
color: #c23934;
}
.sw-modal-note {
font-size: 12.5px;
color: #c23934;
margin-top: 8px;
}
.sw-modal-footnote {
font-size: 12.5px;
color: #6b786f;
margin-top: 10px;
}
.sw-modal-actions {
display: flex;
align-items: center;
gap: 14px;
margin-top: 26px;
flex-wrap: wrap;
}
.sw-modal-link {
font-size: 12.5px;
font-weight: 600;
margin-right: auto;
}
/* Notification/hint text, centered below the actions row (How-to link +
Success/Site Page buttons) to match the reference mockup. */
.sw-modal-setup-hint {
font-size: 12.5px;
color: #BE0000;
font-weight: 500;
/* color: #e0574f; */
text-align: center;
margin-top: 14px;
}
.btn-success {
display: inline-flex;
align-items: center;
gap: 7px;
background: linear-gradient(120deg,#5fa832,#3f9a86);
color: #fff;
border: none;
border-radius: 10px;
padding: 12px 24px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
box-shadow: 0 8px 20px -8px rgba(58,150,120,.6);
}
/* Before a site is selected the Success button is washed out / blurred;
once a site is chosen the class drops and the full gradient shows. */
.btn-success_disabled {
background: #9cbf82;
cursor: not-allowed;
opacity: .45;
box-shadow: none;
filter: blur(0.6px) saturate(.5);
}
.sw-modal-secondary {
display: inline-flex;
align-items: center;
gap: 7px;
/* background: #fff; */
/* background: rgb(55, 99, 58); */
color: rgb(55, 69, 61);
border: 1px solid rgb(226, 230, 226);
background: rgb(241, 243, 241);
/* color: rgb(255, 255, 255); */
/* color: #37453d; */
/* border: 1px solid #d4d9d4; */
border-radius: 10px;
padding: 12px 24px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
font-family: inherit;
}
/* Site Page: solid dark-green primary treatment with an external-link arrow */
.sw-sitepage-btn {
background: #1f5c28;
color: #ffffff;
border: 1px solid #1f5c28;
font-weight: 700;
box-shadow: 0 8px 20px -10px rgba(23,43,32,.55);
transition: background-color .15s, box-shadow .15s;
}
.sw-sitepage-btn:hover {
background: #17491f;
border-color: #17491f;
}
.sw-sitepage-arrow {
flex-shrink: 0;
}
/* Certificate modal specifics */
.sw-cert-header {
background: linear-gradient(125deg, rgb(95, 168, 50) 0%, rgb(63, 154, 134) 55%, rgb(47, 143, 176) 100%);
height: 90px;
display: flex;
align-items: center;
justify-content: center;
}
.sw-cert-icon {
--sds-c-icon-color-foreground: #ffffff;
--sds-c-icon-color-foreground-default: #ffffff;
--slds-c-icon-color-foreground: #ffffff;
--slds-c-icon-color-foreground-default: #ffffff;
color: #ffffff;
fill: #ffffff;
}
/* utility icons render as an <svg> inside the component's shadow root;
force the fill white so it doesn't stay the default dark slate. */
.sw-cert-icon svg,
.sw-cert-icon lightning-primitive-icon svg {
fill: #ffffff !important;
}
.sw-cert-title {
font-size: 22px;
font-weight: 800;
margin: 4px 0 12px;
color: #1c2b23;
}
.sw-cert-text {
font-size: 13.5px;
color: #37453d;
line-height: 1.5;
}
.sw-cert-actions {
display: flex;
justify-content: center;
gap: 12px;
margin-top: 20px;
}