Files
frontend/src/widgets/wallet-header/ui/WalletHeader.module.css
2026-06-29 19:11:45 +03:00

293 lines
5.4 KiB
CSS

.nav {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32px;
height: 60px;
border-bottom: 1px solid var(--glass-border);
flex-shrink: 0;
}
.logo img {
height: 32px;
display: block;
}
/* ── Центральное меню (desktop) ───────────────────────────── */
.menu {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
gap: 8px;
}
.menuLink {
position: relative;
padding: 8px 14px;
font-size: 14px;
font-weight: 500;
color: var(--text-secondary);
text-decoration: none;
border-radius: 8px;
transition: color 0.15s, background 0.15s;
}
.menuLink:hover {
color: var(--text-primary);
background: var(--glass-bg);
}
.menuLinkActive {
color: var(--text-primary);
}
.menuLinkActive::after {
content: '';
position: absolute;
left: 14px;
right: 14px;
bottom: 0;
height: 2px;
border-radius: 2px;
background: var(--interactive);
}
/* ── Правая часть ─────────────────────────────────────────── */
.right {
display: flex;
align-items: center;
gap: 12px;
}
.accountWrapper {
position: relative;
}
.account {
display: flex;
align-items: center;
gap: 10px;
background: none;
border: none;
cursor: pointer;
padding: 0;
}
.account span {
color: var(--text-secondary);
font-size: 14px;
font-weight: 500;
}
.avatar {
width: 34px;
height: 34px;
border-radius: 50%;
background: linear-gradient(135deg, #3d2a8e, #5b3db8);
flex-shrink: 0;
}
.dropdown {
position: absolute;
top: calc(100% + 12px);
right: 0;
background: var(--bg-card, #1a1a2e);
border: 1px solid var(--glass-border);
border-radius: 10px;
overflow: hidden;
min-width: 160px;
z-index: 100;
display: flex;
flex-direction: column;
animation: dropdownIn 0.16s ease;
}
@keyframes dropdownIn {
from {
opacity: 0;
transform: translateY(-6px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dropdownItem {
display: block;
padding: 12px 16px;
font-size: 14px;
color: var(--text-secondary);
text-decoration: none;
background: none;
border: none;
cursor: pointer;
text-align: left;
width: 100%;
transition: background 0.15s, color 0.15s;
}
.dropdownItem:hover {
background: var(--glass-border);
color: var(--text-primary);
}
.dropdownItem.danger:hover {
color: var(--error);
}
/* ── Бургер ───────────────────────────────────────────────── */
.burger {
display: none;
position: relative;
width: 28px;
height: 22px;
background: none;
border: none;
cursor: pointer;
padding: 0;
}
.burger span {
position: absolute;
left: 0;
width: 100%;
height: 2px;
border-radius: 2px;
background: var(--text-primary);
transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}
.burger span:nth-child(1) {
top: 2px;
}
.burger span:nth-child(2) {
top: 50%;
transform: translateY(-50%);
}
.burger span:nth-child(3) {
top: 18px;
}
.burgerOpen span:nth-child(1) {
top: 50%;
transform: translateY(-50%) rotate(45deg);
}
.burgerOpen span:nth-child(2) {
opacity: 0;
}
.burgerOpen span:nth-child(3) {
top: 50%;
transform: translateY(-50%) rotate(-45deg);
}
/* ── Мобильное меню ───────────────────────────────────────── */
.mobileOverlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 90;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.mobileOverlayOpen {
opacity: 1;
pointer-events: auto;
}
.mobileMenu {
display: none;
position: fixed;
top: 60px;
right: 0;
bottom: 0;
width: min(78vw, 320px);
flex-direction: column;
gap: 4px;
padding: 24px 20px;
background: var(--bg-mid, #1b1547);
border-left: 1px solid var(--glass-border);
z-index: 95;
transform: translateX(100%);
transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobileMenuOpen {
transform: translateX(0);
}
.mobileLink {
display: block;
padding: 14px 16px;
font-size: 16px;
font-weight: 500;
color: var(--text-secondary);
text-decoration: none;
background: none;
border: none;
border-radius: 10px;
cursor: pointer;
text-align: left;
width: 100%;
opacity: 0;
transform: translateX(20px);
transition: opacity 0.3s ease, transform 0.3s ease, background 0.15s, color 0.15s;
}
.mobileMenuOpen .mobileLink {
opacity: 1;
transform: translateX(0);
}
.mobileLink:hover {
background: var(--glass-bg);
color: var(--text-primary);
}
.mobileLinkActive {
color: var(--text-primary);
background: var(--glass-bg);
}
.mobileLink.danger {
margin-top: 8px;
color: var(--error);
}
/* ── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 900px) {
.nav {
padding: 0 16px;
}
}
@media (max-width: 768px) {
.menu {
display: none;
}
.account span {
display: none;
}
.burger {
display: block;
}
.mobileOverlay,
.mobileMenu {
display: flex;
}
}