80 lines
1.5 KiB
SCSS
80 lines
1.5 KiB
SCSS
:host {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.cart-icon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: transparent;
|
|
border: none;
|
|
padding: 4px;
|
|
margin: 0;
|
|
color: #666666;
|
|
cursor: pointer;
|
|
outline: none;
|
|
transition: color 0.15s ease-in-out, transform 0.1s ease-in-out;
|
|
border-radius: 4px;
|
|
|
|
// Active state subtle scale down
|
|
&:active:not(:disabled) {
|
|
transform: scale(0.92);
|
|
}
|
|
|
|
// Focus ring for accessibility
|
|
&:focus-visible {
|
|
outline: 2px solid var(--tenant-primary);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
// Disabled state
|
|
&:disabled {
|
|
color: #A0A0A0;
|
|
cursor: not-allowed;
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
// Hover/Active/Focus colors (non-disabled)
|
|
.cart-icon:hover:not(:disabled),
|
|
.cart-icon:focus-visible:not(:disabled),
|
|
.cart-icon.hover-preview:not(:disabled),
|
|
:host(.hover-preview) .cart-icon:not(:disabled) {
|
|
color: var(--tenant-primary);
|
|
}
|
|
|
|
.cart-icon__container {
|
|
position: relative;
|
|
display: inline-flex;
|
|
}
|
|
|
|
.cart-icon__glyph {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 23px;
|
|
height: 23px;
|
|
font-size: 23px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.cart-icon__badge {
|
|
position: absolute;
|
|
top: -8px;
|
|
right: -8px;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
border-radius: 9px;
|
|
background-color: var(--tenant-primary);
|
|
color: #ffffff;
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 4px;
|
|
line-height: 1;
|
|
box-sizing: border-box;
|
|
}
|