Files
bntbudownictwopl-web/components/ui/PillNav.css
T
2026-08-09 16:08:50 +02:00

202 lines
3.6 KiB
CSS

.pill-nav-container {
position: relative;
z-index: 99;
}
.pill-nav {
--nav-h: 44px;
--pill-pad-x: 18px;
--pill-gap: 3px;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
.pill-logo {
display: inline-flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
text-decoration: none;
padding: 0;
}
.pill-nav-items {
position: relative;
display: flex;
align-items: center;
height: var(--nav-h);
background: var(--base, #000);
border-radius: 9999px;
}
.pill-list {
list-style: none;
display: flex;
align-items: stretch;
gap: var(--pill-gap);
margin: 0;
padding: 3px;
height: 100%;
}
.pill-list > li {
display: flex;
height: 100%;
}
.pill {
display: inline-flex;
align-items: center;
justify-content: center;
height: 100%;
padding: 0 var(--pill-pad-x);
background: var(--pill-bg, #fff);
color: var(--pill-text, var(--base, #000));
text-decoration: none;
border-radius: 9999px;
box-sizing: border-box;
font-weight: 500;
font-size: 14px;
line-height: 0;
letter-spacing: 0.2px;
white-space: nowrap;
cursor: pointer;
position: relative;
overflow: hidden;
}
.pill .hover-circle {
position: absolute;
left: 50%;
bottom: 0;
border-radius: 50%;
background: var(--base, #000);
z-index: 1;
display: block;
pointer-events: none;
will-change: transform;
}
.pill .label-stack {
position: relative;
display: inline-block;
line-height: 1;
z-index: 2;
}
.pill .pill-label {
position: relative;
z-index: 2;
display: inline-block;
line-height: 1;
will-change: transform;
}
.pill .pill-label-hover {
position: absolute;
left: 0;
top: 0;
color: var(--hover-text, #fff);
z-index: 3;
display: inline-block;
will-change: transform, opacity;
}
.pill.is-active::after {
content: '';
position: absolute;
bottom: -6px;
left: 50%;
transform: translateX(-50%);
width: 5px;
height: 5px;
background: var(--base, #000);
border-radius: 50px;
z-index: 4;
}
.desktop-only { display: block; }
.mobile-only { display: none; }
@media (max-width: 768px) {
.desktop-only { display: none; }
.mobile-only { display: flex; }
}
.mobile-menu-button {
width: var(--nav-h);
height: var(--nav-h);
border-radius: 50%;
background: var(--base, #000);
border: none;
align-items: center;
justify-content: center;
gap: 4px;
cursor: pointer;
padding: 0;
position: relative;
}
.hamburger-line {
width: 16px;
height: 2px;
background: var(--pill-bg, #fff);
border-radius: 1px;
transition: all 0.2s ease;
transform-origin: center;
}
.mobile-menu-popover {
position: absolute;
top: 3.5em;
left: 1rem;
right: 1rem;
background: var(--base, #f0f0f0);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
z-index: 998;
opacity: 0;
transform-origin: top center;
visibility: hidden;
}
.mobile-menu-list {
list-style: none;
margin: 0;
padding: 8px;
display: flex;
flex-direction: column;
gap: 4px;
}
.mobile-menu-popover .mobile-menu-link {
display: block;
padding: 12px 16px;
color: var(--pill-text, #fff);
background-color: transparent;
text-decoration: none;
font-size: 15px;
font-weight: 500;
border-radius: 10px;
transition: all 0.2s ease;
}
.mobile-menu-popover .mobile-menu-link:hover,
.mobile-menu-popover .mobile-menu-link.is-active {
background-color: var(--pill-bg);
color: var(--hover-text, #fff);
}
.mobile-menu-actions {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
gap: 16px;
}