/* ─────────────────────────────────────────────
     Floating Muscle Radar Widget
     ───────────────────────────────────────────── */
.muscle-radar-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 90;
}

body.rtl-layout .muscle-radar-wrapper {
    right: auto;
    left: 30px;
}

.radar-handle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--radar-bg, var(--accent-orange));
    color: var(--radar-icon-color, #ffffff);
    box-shadow: 0 4px 15px var(--radar-glow, var(--accent-orange-shadow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: none;
    position: relative;
    cursor: pointer;
}

.radar-handle-btn .handle-text {
    display: none;
}

.radar-handle-btn:hover {
    transform: scale(1.05);
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--radar-bg, var(--accent-orange));
    animation: radarPulse 2s infinite ease-out;
}

@keyframes radarPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.radar-window-card {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: var(--card-bg);
    border-radius: 20px;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.rtl-layout .radar-window-card {
    right: auto;
    left: 0;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.radar-window-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.radar-window-header h4 {
    font-size: 1.1rem;
    font-weight: 800;
}

.radar-close-btn {
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

.radar-instruction {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.anatomy-svg-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.anatomy-svg {
    width: 150px;
    height: 250px;
}

.body-silhouette {
    fill: rgba(0,0,0,0.05);
}

body.dark-theme .body-silhouette {
    fill: rgba(255,255,255,0.05);
}

.muscle-group {
    fill: rgba(0,0,0,0.15);
    stroke: var(--bg-color);
    stroke-width: 1.5px;
    cursor: pointer;
    transition: fill 0.2s ease, filter 0.2s ease;
}

body.dark-theme .muscle-group {
    fill: rgba(255,255,255,0.15);
}

.muscle-group:hover, .muscle-group.active {
    fill: var(--accent-orange);
    filter: drop-shadow(0 0 5px var(--accent-orange));
}

.muscle-info-card {
    background: rgba(0,0,0,0.04);
    border-radius: 12px;
    padding: 10px;
    font-size: 0.8rem;
}

body.dark-theme .muscle-info-card {
    background: rgba(255,255,255,0.04);
}

.muscle-info-card h5 {
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--accent-orange);
}

/* ─────────────────────────────────────────────
/* Radar widget entrance */
.muscle-radar-wrapper {
    animation: radarEntrance 0.6s 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes radarEntrance {
    from { transform: scale(0) rotate(-90deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

/* Move Radar icon slightly upward to clear footer buttons (logical inset positioning) */
.muscle-radar-wrapper {
    bottom: 100px !important;
    inset-inline-end: 30px !important;
}

/* 3. Muscle Radar Variable Transitions */
body {
    transition: background-color 0.3s ease, color 0.3s ease, --radar-bg 0.3s ease, --radar-glow 0.3s ease;
}
.radar-handle-btn {
    transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease !important;
}
.pulse-ring {
    transition: border-color 0.3s ease !important;
}

/* Restore clean Radar widget default positioning */
.muscle-radar-wrapper {
    bottom: 30px !important;
}
body.rtl-layout .muscle-radar-wrapper {
    bottom: 30px !important;
}

