pkg-components
Version:
233 lines (212 loc) • 5.23 kB
CSS
/* Cleaned & optimized CSS (no :root definitions) */
/* Layout */
.container {
display: grid;
width: 100%;
height: 100%;
max-width: 100%;
max-height: 100%;
grid-template-rows: 50px 50px 20px 1fr 50px;
grid-template-columns: 3fr 1fr;
grid-template-areas:
"header header-info"
"header-query header-info"
"product scroll"
"product scroll"
"action_product action";
gap: 0;
overflow: hidden;
}
/* Shared panel border */
.header,
.header-info,
.filter,
.content__action,
.content__action_product,
.content__categorie__aside,
.content__scrolling,
.content__products {
border: 1px solid var(--color-neutral-gray-light);
}
/* Header */
.header {
grid-area: header;
display: flex;
align-items: center;
justify-content: space-between;
overflow: hidden;
position: relative;
}
/* Header info */
.header-info {
grid-area: header-info;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
border-radius: 4px;
}
.header-info_content {
display: flex;
align-items: center;
justify-content: space-between;
width: 150px;
}
/* Client pill */
.header-info__client-info_payment {
display: flex;
align-items: center;
padding: 8px 12px;
border-radius: 200px;
transition: background-color .3s ease-in-out;
border: 0;
cursor: pointer;
background-color: var(--color-background-primary-light);
-webkit-tap-highlight-color: transparent;
}
/* Truncated name */
.header-info__client-name {
display: block;
font-size: 15px;
font-weight: 500;
line-height: 1.2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
}
/* Header query controls */
.header-query {
grid-area: header-query;
display: grid;
grid-template-columns: 30% min-content min-content;
align-items: center;
gap: 20px;
overflow: hidden;
justify-content: flex-start;
}
/* Filter/action button */
.header__actions_filter {
height: 40px;
border-radius: 20px;
padding: 9px 20px;
min-width: 7rem;
width: 7rem;
display: flex;
align-items: center;
cursor: pointer;
touch-action: manipulation;
}
/* Products grid (left column) */
.content__products {
grid-area: product;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
column-gap: 15px;
row-gap: 60px;
padding-left: 20px;
overflow-y: auto;
overflow-x: hidden;
justify-content: center;
}
/* Right scrolling area */
.content__scrolling {
grid-area: scroll;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
row-gap: 20px;
padding-top: var(--spacing-2xl);
overflow-y: auto;
overflow-x: hidden;
position: relative;
}
/* Action areas */
.content__action {
grid-area: action;
display: flex;
align-items: center;
justify-content: space-between;
}
.content__action_product {
grid-area: action_product;
display: flex;
align-items: center;
justify-content: flex-start;
}
/* Counter / badge */
.content__counter {
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
margin-right: 10px;
position: relative;
border-radius: 4px;
width: min-content;
}
.counter {
position: absolute;
top: -6px;
right: 0;
width: 32px;
height: 32px;
line-height: 32px;
border-radius: 50%;
display: inline-block;
text-align: center;
font-size: 13px;
background-color: var(--color-primary-red);
color: var(--color-text-white);
}
/* Small circular indicator */
.container_circle {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: var(--color-background-primary);
margin-right: 8px;
z-index: var(--z-index-50);
}
/* Category aside indicator with lightweight pulse (no expensive box-shadow) */
.content__categorie__aside {
position: absolute;
left: 5px;
top: 0;
bottom: 0;
margin: auto;
height: 60px;
width: 10px;
background-color: var(--color-background-gray);
border-radius: 30px;
overflow: visible;
}
/* visual pulse via pseudo-element (transform & opacity only) */
.content__categorie__aside::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
width: 80px;
height: 80px;
transform: translate(-50%, -50%) scale(0);
border-radius: 50%;
background: rgba(59, 58, 58, 0.06);
pointer-events: none;
will-change: transform, opacity;
animation: pulse 1.5s infinite;
}
/* Pulse animation (GPU-friendly: transform + opacity) */
@keyframes pulse {
0% {
transform: translate(-50%, -50%) scale(0);
opacity: 0.6;
}
70% {
transform: translate(-50%, -50%) scale(1.2);
opacity: 0;
}
100% {
transform: translate(-50%, -50%) scale(1.2);
opacity: 0;
}
}