sw-fe/src/components/Map/RadialMenu.css

303 lines
5.5 KiB
CSS

/* Dual FAB Menu - Left (Categories) + Right (Time/Actions) */
/* Backdrop */
.fab-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.15);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
z-index: 398; /* Below search dropdown (500) */
animation: fab-fade-in 0.2s ease;
}
@keyframes fab-fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* FAB Containers */
.fab-left,
.fab-right {
position: fixed;
top: 180px;
z-index: 399; /* Below search dropdown (500) */
}
.fab-left {
left: 24px;
}
.fab-right {
right: 12px;
}
/* Main FAB Button */
.fab-btn {
width: 48px;
height: 48px;
border-radius: 50%;
border: none;
background: linear-gradient(135deg, var(--fab-color, #6366f1) 0%, color-mix(in srgb, var(--fab-color, #6366f1) 80%, #000) 100%);
color: #fff;
font-size: 18px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
transition: transform 0.2s ease, box-shadow 0.2s ease;
-webkit-tap-highlight-color: transparent;
position: relative;
z-index: 400; /* Below search dropdown (500) */
}
.fab-btn-right {
--fab-color: #6366f1;
}
.fab-btn-split {
border: 2px solid rgba(255,255,255,0.3);
}
.fab-count {
font-size: 16px;
font-weight: 800;
}
.fab-btn:hover {
transform: scale(1.06);
}
.fab-btn:active {
transform: scale(0.94);
}
/* FAB Label */
.fab-label {
position: absolute;
top: 54px;
left: 50%;
transform: translateX(-50%);
font-size: 10px;
font-weight: 700;
color: #e2e8f0;
text-shadow: 0 1px 4px rgba(0,0,0,0.8);
white-space: nowrap;
pointer-events: none;
}
.fab-label-time {
background: rgba(15, 23, 42, 0.85);
padding: 2px 6px;
border-radius: 4px;
}
/* Ring containers */
.fab-ring {
position: absolute;
top: 0;
left: 0;
width: 48px;
height: 48px;
pointer-events: none;
}
/* Individual items */
.fab-item {
position: absolute;
top: 4px;
left: 4px;
width: 40px;
height: 40px;
border-radius: 50%;
border: 1.5px solid rgba(255, 255, 255, 0.15);
background: rgba(15, 23, 42, 0.92);
color: #cbd5e1;
font-size: 14px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
opacity: 0;
transform: translate(0, 0) scale(0.3);
pointer-events: none;
transition:
transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
opacity 0.2s ease,
background 0.15s ease,
border-color 0.15s ease,
color 0.15s ease;
-webkit-tap-highlight-color: transparent;
}
.fab-item.is-visible {
opacity: 1;
transform: translate(var(--x), var(--y)) scale(1);
pointer-events: auto;
transition-delay: var(--delay);
}
.fab-item:hover {
background: var(--color, #3b82f6);
border-color: var(--color, #3b82f6);
color: #fff;
}
.fab-item:active {
transform: translate(var(--x), var(--y)) scale(0.9) !important;
}
.fab-item.is-active {
background: var(--color, #3b82f6);
border-color: var(--color, #3b82f6);
color: #fff;
box-shadow: 0 4px 16px color-mix(in srgb, var(--color, #3b82f6) 50%, transparent);
}
/* Time chips - smaller text */
.fab-time {
font-size: 11px;
font-weight: 700;
--color: #f59e0b;
}
/* Subcategory items */
.fab-sub {
width: 36px;
height: 36px;
font-size: 13px;
opacity: 1;
transform: translate(var(--x), var(--y)) scale(1);
pointer-events: auto;
animation: fab-pop-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
animation-delay: var(--delay);
--color: #64748b;
}
.fab-sub.is-active {
--color: #3b82f6;
}
.fab-sub.is-excluded {
opacity: 0.35;
filter: grayscale(0.8);
transform: translate(var(--x), var(--y)) scale(0.85);
}
@keyframes fab-pop-in {
from {
opacity: 0;
transform: translate(calc(var(--x) * 0.3), calc(var(--y) * 0.3)) scale(0.5);
}
to {
opacity: 1;
transform: translate(var(--x), var(--y)) scale(1);
}
}
/* Action items */
.fab-action {
width: 42px;
height: 42px;
font-size: 16px;
}
/* ========== LIGHT THEME ========== */
body[data-theme="light"] .fab-backdrop {
background: rgba(255, 255, 255, 0.2);
}
body[data-theme="light"] .fab-btn {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
body[data-theme="light"] .fab-label {
color: #1e293b;
text-shadow: 0 1px 4px rgba(255,255,255,0.8);
}
body[data-theme="light"] .fab-label-time {
background: rgba(255, 255, 255, 0.9);
color: #1e293b;
}
body[data-theme="light"] .fab-item {
background: rgba(255, 255, 255, 0.95);
border-color: rgba(148, 163, 184, 0.4);
color: #475569;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}
body[data-theme="light"] .fab-item:hover,
body[data-theme="light"] .fab-item.is-active {
color: #fff;
}
/* ========== MOBILE ========== */
@media (max-width: 480px) {
.fab-left,
.fab-right {
top: 160px;
}
.fab-left {
left: 18px;
}
.fab-right {
right: 8px;
}
.fab-btn {
width: 44px;
height: 44px;
font-size: 16px;
}
.fab-item {
width: 36px;
height: 36px;
font-size: 12px;
}
.fab-sub {
width: 32px;
height: 32px;
font-size: 11px;
}
.fab-action {
width: 38px;
height: 38px;
font-size: 14px;
}
.fab-time {
font-size: 10px;
}
.fab-label {
font-size: 9px;
top: 50px;
}
}
/* Safe area */
@supports (padding-top: env(safe-area-inset-top)) {
.fab-left,
.fab-right {
top: calc(180px + env(safe-area-inset-top));
}
.fab-left {
left: calc(24px + env(safe-area-inset-left));
}
.fab-right {
right: calc(12px + env(safe-area-inset-right));
}
}